summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-06-12 09:47:46 -0500
committerGitHub <noreply@github.com>2017-06-12 09:47:46 -0500
commit0de653ff016003c62b5e491646f62b3d644b835f (patch)
tree51e078ae8098025f0c9812a21e7bf9ab0a60df4b /lib
parentab9155eb377137e76986bfbd430909a2b461871f (diff)
downloadspack-0de653ff016003c62b5e491646f62b3d644b835f.tar.gz
spack-0de653ff016003c62b5e491646f62b3d644b835f.tar.bz2
spack-0de653ff016003c62b5e491646f62b3d644b835f.tar.xz
spack-0de653ff016003c62b5e491646f62b3d644b835f.zip
Add an installcheck phase to MakefilePackage (#4476)
* Add an installcheck phase to MakefilePackage * Minor changes to ESMF
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/makefile.py12
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)