Skip to content

Commit

Permalink
Trying to set environ variable some other way
Browse files Browse the repository at this point in the history
  • Loading branch information
muellch committed Jan 7, 2025
1 parent 843c075 commit 1d73f02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions repos/c2sm/packages/py-icon4py/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,20 @@ def patch(self):

# cmake in unit-tests needs this path
def setup_build_environment(self, env):
"""Wrapper until spack has a real implementation of setup_test_environment()"""
if self.run_tests:
self.setup_test_environment(env)

env.set("CMAKE_INCLUDE_PATH", self.spec['boost'].prefix.include)

def setup_test_environment(self, env):
"""Configure the regression test suite like Debian's openssh-tests package"""
env.set("GT4PY_BUILD_CACHE_DIR", self.build_directory)

def test(self):
# check if all installed module can be imported
super().test()
# unit tests
os.environ['GT4PY_BUILD_CACHE_DIR'] = self.build_directory

python('-m', 'pytest', '-v', '-s', '-n', 'auto', '-m',
'not slow_tests')

Expand Down

0 comments on commit 1d73f02

Please sign in to comment.