Add an installcheck phase to MakefilePackage (#4476)

* Add an installcheck phase to MakefilePackage

* Minor changes to ESMF
This commit is contained in:
Adam J. Stewart
2017-06-12 09:47:46 -05:00
committed by GitHub
parent ab9155eb37
commit 0de653ff01
2 changed files with 21 additions and 17 deletions

View File

@@ -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 @@ def check(self):
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)