Add an installcheck phase to MakefilePackage (#4476)
* Add an installcheck phase to MakefilePackage * Minor changes to ESMF
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user