parsec: old to new test API (#45122)
* parsec: old to new test API * parsec: restore stand-alone test subparts; preliminary test build fixes --------- Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
This commit is contained in:
parent
c624088a7b
commit
b1b0c108bb
@ -104,17 +104,29 @@ def check(self):
|
|||||||
warn += "https://bitbucket.org/icldistcomp/parsec/issues"
|
warn += "https://bitbucket.org/icldistcomp/parsec/issues"
|
||||||
tty.msg(warn)
|
tty.msg(warn)
|
||||||
|
|
||||||
def test(self):
|
contrib_dir = join_path("contrib", "build_with_parsec")
|
||||||
"""Compile and run a user program with the installed library"""
|
|
||||||
with working_dir(join_path(self.install_test_root, "contrib/build_with_parsec")):
|
def test_contrib(self):
|
||||||
self.run_test(
|
"""build and run contrib examples"""
|
||||||
"cmake", options=["."], purpose="Check if CMake can find PaRSEC and its targets"
|
with working_dir(join_path(self.test_suite.current_test_cache_dir, self.contrib_dir)):
|
||||||
)
|
cmake = self.spec["cmake"].command
|
||||||
self.run_test("make", purpose="Check if tests can compile")
|
args = [
|
||||||
self.run_test("./dtd_test_allreduce")
|
"-Wno-dev",
|
||||||
self.run_test("./write_check")
|
f"-DCMAKE_C_COMPILER={self.spec['mpi'].mpicc}",
|
||||||
|
f"-DCMAKE_PREFIX_PATH={self.prefix}",
|
||||||
|
".",
|
||||||
|
]
|
||||||
|
if "+cuda" in self.spec:
|
||||||
|
args.append("-DCUDA_TOOLKIT_ROOT_DIR:STRING=" + self.spec["cuda"].prefix)
|
||||||
|
|
||||||
|
cmake(*args)
|
||||||
|
make()
|
||||||
|
|
||||||
|
for name in ["dtd_test_allreduce", "write_check"]:
|
||||||
|
with test_part(self, f"test_contrib_{name}", f"run {name}"):
|
||||||
|
exe = which(name)
|
||||||
|
exe()
|
||||||
|
|
||||||
@run_after("install")
|
@run_after("install")
|
||||||
def cache_test_sources(self):
|
def cache_test_sources(self):
|
||||||
srcs = ["contrib/build_with_parsec"]
|
cache_extra_test_sources(self, self.contrib_dir)
|
||||||
self.cache_extra_test_sources(srcs)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user