Skip to content
Snippets Groups Projects
Commit 8a9a7659 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

feat(arbor): install tests/examples

parent 407893ff
No related branches found
No related tags found
No related merge requests found
......@@ -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")()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment