From ecd6604a2cde71bb46ed59acfd6e4887e31bcc6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Wed, 11 Dec 2024 14:28:40 +0100 Subject: [PATCH] p7zip: fix test package (#26156) * Ensure p7zip test_package works successfuly in all cases * test executable, remove redundant properties in test_package --------- Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com> --- recipes/p7zip/all/conanfile.py | 1 + recipes/p7zip/all/test_package/conanfile.py | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/recipes/p7zip/all/conanfile.py b/recipes/p7zip/all/conanfile.py index 0923c8b9413a3..c92b9abd32ef7 100644 --- a/recipes/p7zip/all/conanfile.py +++ b/recipes/p7zip/all/conanfile.py @@ -18,6 +18,7 @@ class PSevenZipConan(ConanFile): homepage = "https://sourceforge.net/projects/p7zip/" topics = ("7zip", "zip", "compression", "decompression") settings = "os", "arch", "compiler", "build_type" + package_type = "application" def export_sources(self): export_conandata_patches(self) diff --git a/recipes/p7zip/all/test_package/conanfile.py b/recipes/p7zip/all/test_package/conanfile.py index 45e5a32aba828..439215ce47919 100644 --- a/recipes/p7zip/all/test_package/conanfile.py +++ b/recipes/p7zip/all/test_package/conanfile.py @@ -1,15 +1,16 @@ +import os.path + from conan import ConanFile from conan.tools.build import can_run class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "VirtualRunEnv" - 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): + assert os.path.exists(os.path.join(self.dependencies[self.tested_reference_str].cpp_info.bindir, "7za")) if can_run(self): self.run("7za", env="conanrun")