diff --git a/var/spack/repos/builtin/packages/atlas/package.py b/var/spack/repos/builtin/packages/atlas/package.py index 68a91c964b..525701c57b 100644 --- a/var/spack/repos/builtin/packages/atlas/package.py +++ b/var/spack/repos/builtin/packages/atlas/package.py @@ -110,7 +110,8 @@ def install(self, spec, prefix): make('shared_all') make("install") - self.install_test() + if self.run_tests: + self.install_test() @property def libs(self): diff --git a/var/spack/repos/builtin/packages/cosmomc/package.py b/var/spack/repos/builtin/packages/cosmomc/package.py index a6a4409b25..261115d575 100644 --- a/var/spack/repos/builtin/packages/cosmomc/package.py +++ b/var/spack/repos/builtin/packages/cosmomc/package.py @@ -108,7 +108,7 @@ def install(self, spec, prefix): else: wantmpi = 'BUILD=NOMPI' mpif90 = 'MPIF90C=' - + # Choose BLAS and LAPACK lapack = ("LAPACKL=%s" % (spec['lapack'].libs + spec['blas'].libs).ld_flags) @@ -158,8 +158,8 @@ def install(self, spec, prefix): for filename in fnmatch.filter(filenames, '*~'): os.remove(os.path.join(dirpath, filename)) - @on_package_attributes(run_tests=True) @run_after('install') + @on_package_attributes(run_tests=True) def check_install(self): prefix = self.prefix spec = self.spec diff --git a/var/spack/repos/builtin/packages/fftw/package.py b/var/spack/repos/builtin/packages/fftw/package.py index 555fbb91f7..3a283e7eb0 100644 --- a/var/spack/repos/builtin/packages/fftw/package.py +++ b/var/spack/repos/builtin/packages/fftw/package.py @@ -138,7 +138,8 @@ def build(self, spec, prefix): with working_dir('quad'): make() - def check(self, spec, prefix): + def check(self): + spec = self.spec if '+double' in spec: with working_dir('double'): make("check") diff --git a/var/spack/repos/builtin/packages/hdf5-blosc/package.py b/var/spack/repos/builtin/packages/hdf5-blosc/package.py index eb63d08dfd..79f23d7d92 100644 --- a/var/spack/repos/builtin/packages/hdf5-blosc/package.py +++ b/var/spack/repos/builtin/packages/hdf5-blosc/package.py @@ -111,7 +111,8 @@ def install(self, spec, prefix): "-L%s" % spec["hdf5"].prefix.lib, "-lhdf5") _install_shlib("libblosc_plugin", ".libs", prefix.lib) - self.check_install(spec) + if self.run_tests: + self.check_install(spec) def check_install(self, spec): "Build and run a small program to test the installed HDF5 Blosc plugin" diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 27ec1b3bc4..4da24dd7f1 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -79,11 +79,11 @@ class Hdf5(AutotoolsPackage): @property def libs(self): """Hdf5 can be queried for the following parameters: - + - "hl": high-level interface - "cxx": C++ APIs - "fortran": fortran APIs - + :return: list of matching libraries """ query_parameters = self.spec.last_query.extra_parameters @@ -228,6 +228,7 @@ def patch_postdeps(self): 'libtool') @run_after('install') + @on_package_attributes(run_tests=True) def check_install(self): # Build and run a small program to test the installed HDF5 library spec = self.spec diff --git a/var/spack/repos/builtin/packages/nfft/package.py b/var/spack/repos/builtin/packages/nfft/package.py index a137dcf019..daedcff22f 100644 --- a/var/spack/repos/builtin/packages/nfft/package.py +++ b/var/spack/repos/builtin/packages/nfft/package.py @@ -63,7 +63,8 @@ def build(self, spec, prefix): with working_dir('long-double'): make() - def check(self, spec, prefix): + def check(self): + spec = self.spec if '+double' in spec['fftw']: with working_dir('double'): make("check") diff --git a/var/spack/repos/builtin/packages/openblas/package.py b/var/spack/repos/builtin/packages/openblas/package.py index f3b1d4d23f..647cbb121a 100644 --- a/var/spack/repos/builtin/packages/openblas/package.py +++ b/var/spack/repos/builtin/packages/openblas/package.py @@ -123,8 +123,8 @@ def build_targets(self): return self.make_defs + targets - @on_package_attributes(run_tests=True) @run_after('build') + @on_package_attributes(run_tests=True) def check_build(self): make('tests', *self.make_defs) @@ -136,8 +136,8 @@ def install_targets(self): ] return make_args + self.make_defs - @on_package_attributes(run_tests=True) @run_after('install') + @on_package_attributes(run_tests=True) def check_install(self): spec = self.spec # Openblas may pass its own test but still fail to compile Lapack diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index 4ae140454d..5ca5f42492 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -47,7 +47,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package # Maintenance releases (recommended) version('5.24.1', '765ef511b5b87a164e2531403ee16b3c', preferred=True) version('5.22.3', 'aa4f236dc2fc6f88b871436b8d0fda95') - + # Misc releases that people need version('5.22.2', '5767e2a10dd62a46d7b57f74a90d952b') @@ -98,6 +98,7 @@ def configure(self, spec, prefix): def build(self, spec, prefix): make() + @run_after('build') @on_package_attributes(run_tests=True) def test(self): make('test') diff --git a/var/spack/repos/builtin/packages/pfft/package.py b/var/spack/repos/builtin/packages/pfft/package.py index f46526be37..3d05a834e9 100644 --- a/var/spack/repos/builtin/packages/pfft/package.py +++ b/var/spack/repos/builtin/packages/pfft/package.py @@ -67,7 +67,8 @@ def build(self, spec, prefix): with working_dir('long-double'): make() - def check(self, spec, prefix): + def check(self): + spec = self.spec if '+double' in spec['fftw']: with working_dir('double'): make("check") diff --git a/var/spack/repos/builtin/packages/planck-likelihood/package.py b/var/spack/repos/builtin/packages/planck-likelihood/package.py index c5c5cac6cf..8d7b9c5e34 100644 --- a/var/spack/repos/builtin/packages/planck-likelihood/package.py +++ b/var/spack/repos/builtin/packages/planck-likelihood/package.py @@ -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_PLUGIN', 'rel2015') - @on_package_attributes(run_tests=True) @run_after('install') + @on_package_attributes(run_tests=True) def check_install(self): prefix = self.prefix clik_example_C = Executable(join_path(prefix.bin, 'clik_example_C')) diff --git a/var/spack/repos/builtin/packages/pnfft/package.py b/var/spack/repos/builtin/packages/pnfft/package.py index 772bd8f195..3e56b9be4e 100644 --- a/var/spack/repos/builtin/packages/pnfft/package.py +++ b/var/spack/repos/builtin/packages/pnfft/package.py @@ -64,7 +64,8 @@ def build(self, spec, prefix): with working_dir('long-double'): make() - def check(self, spec, prefix): + def check(self): + spec = self.spec if '+double' in spec['fftw']: with working_dir('double'): make("check") diff --git a/var/spack/repos/builtin/packages/pocl/package.py b/var/spack/repos/builtin/packages/pocl/package.py index b64ae22837..b6baee7e07 100644 --- a/var/spack/repos/builtin/packages/pocl/package.py +++ b/var/spack/repos/builtin/packages/pocl/package.py @@ -95,6 +95,7 @@ def symlink_opencl(self): os.symlink("OpenCL", join_path(self.prefix.include, "CL")) @run_after('install') + @on_package_attributes(run_tests=True) def check_install(self): # Build and run a small program to test the installed OpenCL library spec = self.spec diff --git a/var/spack/repos/builtin/packages/py-yt/package.py b/var/spack/repos/builtin/packages/py-yt/package.py index ff50c269a2..cefef2e1d3 100644 --- a/var/spack/repos/builtin/packages/py-yt/package.py +++ b/var/spack/repos/builtin/packages/py-yt/package.py @@ -78,6 +78,7 @@ def prep_yt(self): rockstar_cfg.write(self.spec['rockstar'].prefix) @run_after('install') + @on_package_attributes(run_tests=True) def check_install(self): # The Python interpreter path can be too long for this # yt = Executable(join_path(prefix.bin, "yt"))