Skip to content

Commit

Permalink
shaderc: restore VirtualRunEnv in test_package
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Jul 26, 2023
1 parent fd0336f commit 3467bc7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions recipes/shaderc/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

def requirements(self):
Expand All @@ -17,9 +17,7 @@ def layout(self):

def build(self):
tc = CMakeToolchain(self)

Check failure on line 19 in recipes/shaderc/all/test_package/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed test_package/conanfile.py (v2 migration)

Undefined variable 'CMakeToolchain'

Check failure on line 19 in recipes/shaderc/all/test_package/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed test_package/conanfile.py (v2 migration)

Undefined variable 'CMakeToolchain'
tc.variables["SHADERC_WITH_SPVC"] = (
self.options["shaderc"].spvc if "spvc" in self.options["shaderc"] else False
)
tc.variables["SHADERC_WITH_SPVC"] = self.dependencies["shaderc"].options.get_safe("spvc", False)
cmake.configure()

Check failure on line 21 in recipes/shaderc/all/test_package/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed test_package/conanfile.py (v2 migration)

Undefined variable 'cmake'

Check failure on line 21 in recipes/shaderc/all/test_package/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed test_package/conanfile.py (v2 migration)

Undefined variable 'cmake'
cmake.build()

Check failure on line 22 in recipes/shaderc/all/test_package/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed test_package/conanfile.py (v2 migration)

Undefined variable 'cmake'

Check failure on line 22 in recipes/shaderc/all/test_package/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed test_package/conanfile.py (v2 migration)

Undefined variable 'cmake'

Expand All @@ -35,7 +33,7 @@ def test(self):
spv_name = "test_package.spv"
self.run(f'glslc "{in_glsl_name}" -o {spv_name}', env="conanrun")

if "spvc" in self.options["shaderc"] and self.options["shaderc"].spvc:
if "spvc" in self.options["shaderc"] and self.dependencies["shaderc"].options.spvc:
# Test programs consuming shaderc_spvc lib
bin_path_spvc_c = os.path.join(self.cpp.build.bindir, "test_package_spvc_c")
self.run(bin_path_spvc_c, env="conanrun")
Expand Down

0 comments on commit 3467bc7

Please sign in to comment.