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,6 +110,7 @@ def install(self, spec, prefix):
|
||||||
make('shared_all')
|
make('shared_all')
|
||||||
|
|
||||||
make("install")
|
make("install")
|
||||||
|
if self.run_tests:
|
||||||
self.install_test()
|
self.install_test()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
|
@ -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,6 +111,7 @@ 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)
|
||||||
|
|
||||||
|
if self.run_tests:
|
||||||
self.check_install(spec)
|
self.check_install(spec)
|
||||||
|
|
||||||
def check_install(self, spec):
|
def check_install(self, spec):
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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