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>
This commit is contained in:
parent
e2b6eca420
commit
2ca733bbc1
@ -14,6 +14,8 @@ class RocmClangOcl(CMakePackage):
|
|||||||
url = "https://github.com/ROCm/clang-ocl/archive/rocm-6.1.2.tar.gz"
|
url = "https://github.com/ROCm/clang-ocl/archive/rocm-6.1.2.tar.gz"
|
||||||
tags = ["rocm"]
|
tags = ["rocm"]
|
||||||
|
|
||||||
|
test_requires_compiler = True
|
||||||
|
|
||||||
license("MIT")
|
license("MIT")
|
||||||
|
|
||||||
maintainers("srekolam", "renjithravindrankannath")
|
maintainers("srekolam", "renjithravindrankannath")
|
||||||
@ -83,12 +85,11 @@ def cache_test_sources(self):
|
|||||||
install test subdirectory for use during `spack test run`."""
|
install test subdirectory for use during `spack test run`."""
|
||||||
self.cache_extra_test_sources([self.test_src_dir])
|
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)
|
test_dir = join_path(self.test_suite.current_test_cache_dir, self.test_src_dir)
|
||||||
with working_dir(test_dir, create=True):
|
with working_dir(test_dir):
|
||||||
cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
|
cmake = self.spec["cmake"].command
|
||||||
prefixes = ";".join([self.spec["rocm-clang-ocl"].prefix])
|
cmake("-DCMAKE_PREFIX_PATH=" + self.spec["rocm-clang-ocl"].prefix, ".")
|
||||||
cc_options = ["-DCMAKE_PREFIX_PATH=" + prefixes, "."]
|
make = which("make")
|
||||||
self.run_test(cmake_bin, cc_options)
|
|
||||||
make()
|
make()
|
||||||
make("clean")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user