From 0de653ff016003c62b5e491646f62b3d644b835f Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Mon, 12 Jun 2017 09:47:46 -0500 Subject: Add an installcheck phase to MakefilePackage (#4476) * Add an installcheck phase to MakefilePackage * Minor changes to ESMF --- lib/spack/spack/build_systems/makefile.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib') 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) -- cgit v1.2.3-60-g2f50