Skip to content

Commit 46e3877

Browse files
authored
Merge pull request #2101 from jjotero/tests/hip
[test] Test `HIP` build on the `main` branch
2 parents a88e933 + 0b43dfe commit 46e3877

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cscs-checks/prgenv/hip/build_hip.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class BuildHip(rfm.RegressionTest):
2121
valid_prog_environs = ['PrgEnv-gnu']
2222
sourcesdir = 'https://github.com/ROCm-Developer-Tools/HIP.git'
2323
build_system = 'CMake'
24+
prebuild_cmds = ['git checkout main']
2425
postbuild_cmds = ['make install']
2526
executable = f'{hip_path}/bin/hipcc'
2627
executable_opts = ['--version']
@@ -38,9 +39,9 @@ def set_compile_options(self):
3839
f'-DHIP_PLATFORM={self.hip_platform}',
3940
]
4041

41-
@run_before('sanity')
42+
@sanity_function
4243
def set_sanity_patterns(self):
43-
self.sanity_patterns = sn.assert_found(r'nvcc:\s+NVIDIA', self.stdout)
44+
return sn.assert_found(r'nvcc:\s+NVIDIA', self.stdout)
4445

4546

4647
@rfm.simple_test
@@ -75,6 +76,6 @@ def set_env(self):
7576
self.variables = {'HIP_PATH': f'{self.hip_path}'}
7677
self.build_system.cxx = os.path.join(self.hip_path, 'bin', 'hipcc')
7778

78-
@run_before('sanity')
79+
@sanity_function
7980
def set_sanity(self):
80-
self.sanity_patterns = sn.assert_found(r'HelloWorld', self.stdout)
81+
return sn.assert_found(r'HelloWorld', self.stdout)

0 commit comments

Comments
 (0)