From 2ca733bbc148d1ecf27a40ecde294cb8a6e922eb Mon Sep 17 00:00:00 2001 From: AcriusWinter <152348900+AcriusWinter@users.noreply.github.com> Date: Fri, 12 Jul 2024 14:56:38 -0700 Subject: rocm-clang-ocl: old to new test API (#44938) * rocm-ocl-clang: old to new test format * Minor cleanup --------- Co-authored-by: Tamara Dahlgren --- .../repos/builtin/packages/rocm-clang-ocl/package.py | 15 ++++++++------- 1 file 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") -- cgit v1.2.3-70-g09d2