diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/build_systems/makefile.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/spack/spack/build_systems/makefile.py b/lib/spack/spack/build_systems/makefile.py index a014ed7c15..2311158bfe 100644 --- a/lib/spack/spack/build_systems/makefile.py +++ b/lib/spack/spack/build_systems/makefile.py @@ -75,6 +75,9 @@ class MakefilePackage(PackageBase): #: Callback names for build-time test build_time_test_callbacks = ['check'] + #: Callback names for install-time test + install_time_test_callbacks = ['installcheck'] + @property def build_directory(self): """Returns the directory containing the main Makefile @@ -113,5 +116,14 @@ class MakefilePackage(PackageBase): self._if_make_target_execute('test') self._if_make_target_execute('check') + run_after('install')(PackageBase._run_default_install_time_test_callbacks) + + def installcheck(self): + """Searches the Makefile for an ``installcheck`` target + and runs it if found. + """ + with working_dir(self.build_directory): + self._if_make_target_execute('installcheck') + # Check that self.prefix is there after installation run_after('install')(PackageBase.sanity_check_prefix) |