diff options
author | AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> | 2024-07-12 14:56:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-12 15:56:38 -0600 |
commit | 2ca733bbc148d1ecf27a40ecde294cb8a6e922eb (patch) | |
tree | 5779fbd17a56e794a31349f6a8a3c192b716b32d | |
parent | e2b6eca42000e8091f63edd5fd93324568ef6be9 (diff) | |
download | spack-2ca733bbc148d1ecf27a40ecde294cb8a6e922eb.tar.gz spack-2ca733bbc148d1ecf27a40ecde294cb8a6e922eb.tar.bz2 spack-2ca733bbc148d1ecf27a40ecde294cb8a6e922eb.tar.xz spack-2ca733bbc148d1ecf27a40ecde294cb8a6e922eb.zip |
rocm-clang-ocl: old to new test API (#44938)
* rocm-ocl-clang: old to new test format
* Minor cleanup
---------
Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
-rw-r--r-- | var/spack/repos/builtin/packages/rocm-clang-ocl/package.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py index eee6de7976..4197bf2289 100644 --- a/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py +++ b/var/spack/repos/builtin/packages/rocm-clang-ocl/package.py @@ -14,6 +14,8 @@ class RocmClangOcl(CMakePackage): url = "https://github.com/ROCm/clang-ocl/archive/rocm-6.1.2.tar.gz" tags = ["rocm"] + test_requires_compiler = True + license("MIT") maintainers("srekolam", "renjithravindrankannath") @@ -83,12 +85,11 @@ class RocmClangOcl(CMakePackage): install test subdirectory for use during `spack test run`.""" self.cache_extra_test_sources([self.test_src_dir]) - def test(self): + def test_make(self): + """Test make""" test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir) - with working_dir(test_dir, create=True): - cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake") - prefixes = ";".join([self.spec["rocm-clang-ocl"].prefix]) - cc_options = ["-DCMAKE_PREFIX_PATH=" + prefixes, "."] - self.run_test(cmake_bin, cc_options) + with working_dir(test_dir): + cmake = self.spec["cmake"].command + cmake("-DCMAKE_PREFIX_PATH=" + self.spec["rocm-clang-ocl"].prefix, ".") + make = which("make") make() - make("clean") |