Skip to content

Commit

Permalink
parsec: new test API
Browse files Browse the repository at this point in the history
  • Loading branch information
AcriusWinter committed Jul 8, 2024
1 parent a04b12a commit 7bd50e7
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions var/spack/repos/builtin/packages/parsec/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,25 @@ def check(self):
warn += "https://bitbucket.org/icldistcomp/parsec/issues"
tty.msg(warn)

def test(self):
def test_parsec(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")

with test_part(
self, "test_parsec_cmake", purpose="Check if CMake can find PaRSEC and its targets"
):
cmake = which("cmake")
cmake(".")

with test_part(self, "test_parsec_make", purpose="Check if tests can compile"):
make = which("make")
make()

programs = ["dtd_test_allreduce", "write_check"]
for program in programs:
with test_part(self, "test_parsec_" + program, purpose="Run " + program):
exe = which("./" + program)
exe()

@run_after("install")
def cache_test_sources(self):
Expand Down

0 comments on commit 7bd50e7

Please sign in to comment.