Ensure that tests are optional (#3922)
This commit is contained in:
parent
5250e8ee89
commit
46d0ca9d01
13 changed files with 24 additions and 14 deletions
|
@ -110,7 +110,8 @@ def install(self, spec, prefix):
|
||||||
make('shared_all')
|
make('shared_all')
|
||||||
|
|
||||||
make("install")
|
make("install")
|
||||||
self.install_test()
|
if self.run_tests:
|
||||||
|
self.install_test()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def libs(self):
|
def libs(self):
|
||||||
|
|
|
@ -108,7 +108,7 @@ def install(self, spec, prefix):
|
||||||
else:
|
else:
|
||||||
wantmpi = 'BUILD=NOMPI'
|
wantmpi = 'BUILD=NOMPI'
|
||||||
mpif90 = 'MPIF90C='
|
mpif90 = 'MPIF90C='
|
||||||
|
|
||||||
# Choose BLAS and LAPACK
|
# Choose BLAS and LAPACK
|
||||||
lapack = ("LAPACKL=%s" %
|
lapack = ("LAPACKL=%s" %
|
||||||
(spec['lapack'].libs + spec['blas'].libs).ld_flags)
|
(spec['lapack'].libs + spec['blas'].libs).ld_flags)
|
||||||
|
@ -158,8 +158,8 @@ def install(self, spec, prefix):
|
||||||
for filename in fnmatch.filter(filenames, '*~'):
|
for filename in fnmatch.filter(filenames, '*~'):
|
||||||
os.remove(os.path.join(dirpath, filename))
|
os.remove(os.path.join(dirpath, filename))
|
||||||
|
|
||||||
@on_package_attributes(run_tests=True)
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_install(self):
|
def check_install(self):
|
||||||
prefix = self.prefix
|
prefix = self.prefix
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
|
@ -138,7 +138,8 @@ def build(self, spec, prefix):
|
||||||
with working_dir('quad'):
|
with working_dir('quad'):
|
||||||
make()
|
make()
|
||||||
|
|
||||||
def check(self, spec, prefix):
|
def check(self):
|
||||||
|
spec = self.spec
|
||||||
if '+double' in spec:
|
if '+double' in spec:
|
||||||
with working_dir('double'):
|
with working_dir('double'):
|
||||||
make("check")
|
make("check")
|
||||||
|
|
|
@ -111,7 +111,8 @@ def install(self, spec, prefix):
|
||||||
"-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
|
"-L%s" % spec["hdf5"].prefix.lib, "-lhdf5")
|
||||||
_install_shlib("libblosc_plugin", ".libs", prefix.lib)
|
_install_shlib("libblosc_plugin", ".libs", prefix.lib)
|
||||||
|
|
||||||
self.check_install(spec)
|
if self.run_tests:
|
||||||
|
self.check_install(spec)
|
||||||
|
|
||||||
def check_install(self, spec):
|
def check_install(self, spec):
|
||||||
"Build and run a small program to test the installed HDF5 Blosc plugin"
|
"Build and run a small program to test the installed HDF5 Blosc plugin"
|
||||||
|
|
|
@ -79,11 +79,11 @@ class Hdf5(AutotoolsPackage):
|
||||||
@property
|
@property
|
||||||
def libs(self):
|
def libs(self):
|
||||||
"""Hdf5 can be queried for the following parameters:
|
"""Hdf5 can be queried for the following parameters:
|
||||||
|
|
||||||
- "hl": high-level interface
|
- "hl": high-level interface
|
||||||
- "cxx": C++ APIs
|
- "cxx": C++ APIs
|
||||||
- "fortran": fortran APIs
|
- "fortran": fortran APIs
|
||||||
|
|
||||||
:return: list of matching libraries
|
:return: list of matching libraries
|
||||||
"""
|
"""
|
||||||
query_parameters = self.spec.last_query.extra_parameters
|
query_parameters = self.spec.last_query.extra_parameters
|
||||||
|
@ -228,6 +228,7 @@ def patch_postdeps(self):
|
||||||
'libtool')
|
'libtool')
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_install(self):
|
def check_install(self):
|
||||||
# Build and run a small program to test the installed HDF5 library
|
# Build and run a small program to test the installed HDF5 library
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
|
@ -63,7 +63,8 @@ def build(self, spec, prefix):
|
||||||
with working_dir('long-double'):
|
with working_dir('long-double'):
|
||||||
make()
|
make()
|
||||||
|
|
||||||
def check(self, spec, prefix):
|
def check(self):
|
||||||
|
spec = self.spec
|
||||||
if '+double' in spec['fftw']:
|
if '+double' in spec['fftw']:
|
||||||
with working_dir('double'):
|
with working_dir('double'):
|
||||||
make("check")
|
make("check")
|
||||||
|
|
|
@ -123,8 +123,8 @@ def build_targets(self):
|
||||||
|
|
||||||
return self.make_defs + targets
|
return self.make_defs + targets
|
||||||
|
|
||||||
@on_package_attributes(run_tests=True)
|
|
||||||
@run_after('build')
|
@run_after('build')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_build(self):
|
def check_build(self):
|
||||||
make('tests', *self.make_defs)
|
make('tests', *self.make_defs)
|
||||||
|
|
||||||
|
@ -136,8 +136,8 @@ def install_targets(self):
|
||||||
]
|
]
|
||||||
return make_args + self.make_defs
|
return make_args + self.make_defs
|
||||||
|
|
||||||
@on_package_attributes(run_tests=True)
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_install(self):
|
def check_install(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
# Openblas may pass its own test but still fail to compile Lapack
|
# Openblas may pass its own test but still fail to compile Lapack
|
||||||
|
|
|
@ -47,7 +47,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
|
||||||
# Maintenance releases (recommended)
|
# Maintenance releases (recommended)
|
||||||
version('5.24.1', '765ef511b5b87a164e2531403ee16b3c', preferred=True)
|
version('5.24.1', '765ef511b5b87a164e2531403ee16b3c', preferred=True)
|
||||||
version('5.22.3', 'aa4f236dc2fc6f88b871436b8d0fda95')
|
version('5.22.3', 'aa4f236dc2fc6f88b871436b8d0fda95')
|
||||||
|
|
||||||
# Misc releases that people need
|
# Misc releases that people need
|
||||||
version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b')
|
version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b')
|
||||||
|
|
||||||
|
@ -98,6 +98,7 @@ def configure(self, spec, prefix):
|
||||||
def build(self, spec, prefix):
|
def build(self, spec, prefix):
|
||||||
make()
|
make()
|
||||||
|
|
||||||
|
@run_after('build')
|
||||||
@on_package_attributes(run_tests=True)
|
@on_package_attributes(run_tests=True)
|
||||||
def test(self):
|
def test(self):
|
||||||
make('test')
|
make('test')
|
||||||
|
|
|
@ -67,7 +67,8 @@ def build(self, spec, prefix):
|
||||||
with working_dir('long-double'):
|
with working_dir('long-double'):
|
||||||
make()
|
make()
|
||||||
|
|
||||||
def check(self, spec, prefix):
|
def check(self):
|
||||||
|
spec = self.spec
|
||||||
if '+double' in spec['fftw']:
|
if '+double' in spec['fftw']:
|
||||||
with working_dir('double'):
|
with working_dir('double'):
|
||||||
make("check")
|
make("check")
|
||||||
|
|
|
@ -137,8 +137,8 @@ def setup_environment(self, spack_env, run_env):
|
||||||
run_env.set('CLIK_DATA', join_path(prefix, 'share', 'clik'))
|
run_env.set('CLIK_DATA', join_path(prefix, 'share', 'clik'))
|
||||||
run_env.set('CLIK_PLUGIN', 'rel2015')
|
run_env.set('CLIK_PLUGIN', 'rel2015')
|
||||||
|
|
||||||
@on_package_attributes(run_tests=True)
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_install(self):
|
def check_install(self):
|
||||||
prefix = self.prefix
|
prefix = self.prefix
|
||||||
clik_example_C = Executable(join_path(prefix.bin, 'clik_example_C'))
|
clik_example_C = Executable(join_path(prefix.bin, 'clik_example_C'))
|
||||||
|
|
|
@ -64,7 +64,8 @@ def build(self, spec, prefix):
|
||||||
with working_dir('long-double'):
|
with working_dir('long-double'):
|
||||||
make()
|
make()
|
||||||
|
|
||||||
def check(self, spec, prefix):
|
def check(self):
|
||||||
|
spec = self.spec
|
||||||
if '+double' in spec['fftw']:
|
if '+double' in spec['fftw']:
|
||||||
with working_dir('double'):
|
with working_dir('double'):
|
||||||
make("check")
|
make("check")
|
||||||
|
|
|
@ -95,6 +95,7 @@ def symlink_opencl(self):
|
||||||
os.symlink("OpenCL", join_path(self.prefix.include, "CL"))
|
os.symlink("OpenCL", join_path(self.prefix.include, "CL"))
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_install(self):
|
def check_install(self):
|
||||||
# Build and run a small program to test the installed OpenCL library
|
# Build and run a small program to test the installed OpenCL library
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
|
|
|
@ -78,6 +78,7 @@ def prep_yt(self):
|
||||||
rockstar_cfg.write(self.spec['rockstar'].prefix)
|
rockstar_cfg.write(self.spec['rockstar'].prefix)
|
||||||
|
|
||||||
@run_after('install')
|
@run_after('install')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
def check_install(self):
|
def check_install(self):
|
||||||
# The Python interpreter path can be too long for this
|
# The Python interpreter path can be too long for this
|
||||||
# yt = Executable(join_path(prefix.bin, "yt"))
|
# yt = Executable(join_path(prefix.bin, "yt"))
|
||||||
|
|
Loading…
Reference in a new issue