diff --git a/packages/arbor/package.py b/packages/arbor/package.py index 9b0cb883f320b0c2fb75b8ff2d2446e2e6126e66..e22c547c23cb9c5f6556a07d70a60efae71a28ee 100644 --- a/packages/arbor/package.py +++ b/packages/arbor/package.py @@ -131,7 +131,30 @@ class Arbor(CMakePackage, CudaPackage): return args + # install tests and examples for post-deployment testing + @run_after("install") + def install_all_the_binaries(self): + mkdirp(prefix.bin.arbor_extra) + install(join_path(self.build_directory, "bin", "*"), prefix.bin.arbor_extra) + @run_after("install", when="+python") @on_package_attributes(run_tests=True) - def install_test(self): + def install_test_python(self): + # something like python -m unittest discover -v -s python + # also for MPI: mpirun -n 4 -oversubscribe python -m unittest discover -v -s python python("-c", "import arbor") + + @run_after('install') + @on_package_attributes(run_tests=True) + def install_test(self): + with working_dir(self.build_directory): + # Unit tests + Executable("bin/unit")() + Executable("bin/unit_modcc")() + # MPI tests + # => there's also unit-mpi requiring mpi + # Examples + examples = Executable("scripts/run_cpp_examples.sh") + examples() + # examples("\"mpirun -n 4 -oversubscribe\"") + Executable("scripts/test_executables.sh")()