Skip to content

Commit

Permalink
Fix poppler-data settings clearance. Add test to check if data is act…
Browse files Browse the repository at this point in the history
…ually there
  • Loading branch information
ViliusSutkus89 committed Aug 2, 2024
1 parent 92139eb commit 7b6f6f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 2 additions & 4 deletions recipes/poppler-data/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,21 @@ def export_sources(self):

def package_id(self):
self.info.settings.clear()
self.info.clear()

def layout(self):
cmake_layout(self)

def package_id(self):
self.info.clear()

def source(self):
get(self, **self.conan_data["sources"][self.version],
destination=self.source_folder, strip_root=True)
apply_conandata_patches(self)

def generate(self):
tc = CMakeToolchain(self)
tc.generate()

def build(self):
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand Down
13 changes: 9 additions & 4 deletions recipes/poppler-data/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import os.path

from conan import ConanFile


class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
test_type = "explicit"

def build_requirements(self):
self.tool_requires(self.tested_reference_str)
def requirements(self):
self.requires(self.tested_reference_str)

def test(self):
# @TODO: actually test
yield
resdir = self.dependencies['poppler-data'].cpp_info.resdirs[0]
for i in ["cMap", "cidToUnicode", "nameToUnicode", "unicodeMap"]:
d = os.path.join(resdir, i)
assert os.path.exists(d)
assert len(os.listdir(d)) != 0
1 change: 0 additions & 1 deletion recipes/poppler-data/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
versions:
"0.4.12-odr":
folder: all

0 comments on commit 7b6f6f6

Please sign in to comment.