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"
|
||||
tty.msg(warn)
|
||||
|
||||
def test(self):
|
||||
"""Compile and run a user program with the installed library"""
|
||||
with working_dir(join_path(self.install_test_root, "contrib/build_with_parsec")):
|
||||
self.run_test(
|
||||
"cmake", options=["."], purpose="Check if CMake can find PaRSEC and its targets"
|
||||
)
|
||||
self.run_test("make", purpose="Check if tests can compile")
|
||||
self.run_test("./dtd_test_allreduce")
|
||||
self.run_test("./write_check")
|
||||
contrib_dir = join_path("contrib", "build_with_parsec")
|
||||
|
||||
def test_contrib(self):
|
||||
"""build and run contrib examples"""
|
||||
with working_dir(join_path(self.test_suite.current_test_cache_dir, self.contrib_dir)):
|
||||
cmake = self.spec["cmake"].command
|
||||
args = [
|
||||
"-Wno-dev",
|
||||
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")
|
||||
def cache_test_sources(self):
|
||||
srcs = ["contrib/build_with_parsec"]
|
||||
self.cache_extra_test_sources(srcs)
|
||||
cache_extra_test_sources(self, self.contrib_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user