summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAcriusWinter <152348900+AcriusWinter@users.noreply.github.com>2024-08-19 12:20:54 -0700
committerGitHub <noreply@github.com>2024-08-19 12:20:54 -0700
commit0d668e4e92b8bf9ee76daa761a3c9e455e3e253e (patch)
treeaad9cc28f1bf5cd81c2c44e6b2a6cca69efc6f25
parentad6c7380c57b359facff4143463e637f7271d71b (diff)
downloadspack-0d668e4e92b8bf9ee76daa761a3c9e455e3e253e.tar.gz
spack-0d668e4e92b8bf9ee76daa761a3c9e455e3e253e.tar.bz2
spack-0d668e4e92b8bf9ee76daa761a3c9e455e3e253e.tar.xz
spack-0d668e4e92b8bf9ee76daa761a3c9e455e3e253e.zip
hsakmt-roct: remove use of deprecated run_test method (#45763)
* hsakmt-roct: new test API * hsakmt-roct: minor change to check_install script variable name --------- Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/hsakmt-roct/package.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/hsakmt-roct/package.py b/var/spack/repos/builtin/packages/hsakmt-roct/package.py
index fe256e8625..8ef1d97e1d 100644
--- a/var/spack/repos/builtin/packages/hsakmt-roct/package.py
+++ b/var/spack/repos/builtin/packages/hsakmt-roct/package.py
@@ -89,9 +89,9 @@ class HsakmtRoct(CMakePackage):
@run_after("install")
@on_package_attributes(run_tests=True)
def check_install(self):
- test_dir = "tests/kfdtest"
+ """Check if package is installed correctly"""
+ test_dir = join_path("tests", "kfdtest")
with working_dir(test_dir, create=True):
- cmake_bin = join_path(self.spec["cmake"].prefix.bin, "cmake")
prefixes = ";".join(
[
self.spec["libdrm"].prefix,
@@ -109,9 +109,12 @@ class HsakmtRoct(CMakePackage):
"-DLIBHSAKMT_PATH=" + hsakmt_path,
".",
]
- self.run_test(cmake_bin, cc_options)
+ cmake = self.spec["cmake"].command
+ cmake(*cc_options)
+ make = which("make")
make()
os.environ["LD_LIBRARY_PATH"] = hsakmt_path
os.environ["BIN_DIR"] = os.getcwd()
- self.run_test("scripts/run_kfdtest.sh")
+ run_kfdtest = which(join_path("scripts", "run_kfdtest.sh"))
+ run_kfdtest()
make("clean")