From f83280cb58de998556e9232d18f0e9ff5aa59617 Mon Sep 17 00:00:00 2001 From: Gregory Becker Date: Fri, 27 Mar 2020 10:35:38 -0700 Subject: [PATCH] standardize names for configure_test, build_test, install_test --- lib/spack/spack/build_systems/python.py | 4 ++-- lib/spack/spack/build_systems/scons.py | 4 ++-- lib/spack/spack/build_systems/waf.py | 8 ++++---- var/spack/repos/builtin/packages/bazel/package.py | 2 +- var/spack/repos/builtin/packages/cantera/package.py | 2 +- var/spack/repos/builtin/packages/cmake/package.py | 2 +- var/spack/repos/builtin/packages/conduit/package.py | 2 +- var/spack/repos/builtin/packages/jq/package.py | 2 +- var/spack/repos/builtin/packages/ninja-fortran/package.py | 2 +- var/spack/repos/builtin/packages/ninja/package.py | 2 +- var/spack/repos/builtin/packages/node-js/package.py | 2 +- var/spack/repos/builtin/packages/perl/package.py | 2 +- .../repos/builtin/packages/py-cloudpickle/package.py | 2 +- var/spack/repos/builtin/packages/py-cython/package.py | 2 +- var/spack/repos/builtin/packages/py-fiona/package.py | 2 +- var/spack/repos/builtin/packages/py-matplotlib/package.py | 2 +- var/spack/repos/builtin/packages/py-numpy/package.py | 2 +- var/spack/repos/builtin/packages/py-py/package.py | 2 +- var/spack/repos/builtin/packages/py-py2cairo/package.py | 2 +- var/spack/repos/builtin/packages/py-pybind11/package.py | 2 +- var/spack/repos/builtin/packages/py-pygments/package.py | 2 +- .../repos/builtin/packages/py-python-dateutil/package.py | 2 +- var/spack/repos/builtin/packages/py-scipy/package.py | 2 +- var/spack/repos/builtin/packages/py-setuptools/package.py | 2 +- .../packages/py-sphinxcontrib-applehelp/package.py | 2 +- .../builtin/packages/py-sphinxcontrib-devhelp/package.py | 2 +- .../builtin/packages/py-sphinxcontrib-htmlhelp/package.py | 2 +- .../builtin/packages/py-sphinxcontrib-jsmath/package.py | 2 +- .../builtin/packages/py-sphinxcontrib-qthelp/package.py | 2 +- .../packages/py-sphinxcontrib-serializinghtml/package.py | 2 +- .../packages/py-sphinxcontrib-websupport/package.py | 2 +- .../repos/builtin/packages/py-statsmodels/package.py | 2 +- var/spack/repos/builtin/packages/serf/package.py | 2 +- 33 files changed, 38 insertions(+), 38 deletions(-) diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py index 757458ccff9..ee16148e381 100644 --- a/lib/spack/spack/build_systems/python.py +++ b/lib/spack/spack/build_systems/python.py @@ -91,7 +91,7 @@ def configure(self, spec, prefix): build_system_class = 'PythonPackage' #: Callback names for build-time test - build_time_test_callbacks = ['buildtest'] + build_time_test_callbacks = ['build_test'] #: Callback names for install-time test install_time_test_callbacks = ['import_module_test'] @@ -361,7 +361,7 @@ def check_args(self, spec, prefix): # Testing - def buildtest(self): + def build_test(self): """Run unit tests after in-place build. These tests are only run if the package actually has a 'test' command. diff --git a/lib/spack/spack/build_systems/scons.py b/lib/spack/spack/build_systems/scons.py index f769d2410d3..5e17666b71c 100644 --- a/lib/spack/spack/build_systems/scons.py +++ b/lib/spack/spack/build_systems/scons.py @@ -33,7 +33,7 @@ class SConsPackage(PackageBase): build_system_class = 'SConsPackage' #: Callback names for build-time test - build_time_test_callbacks = ['buildtest'] + build_time_test_callbacks = ['build_test'] depends_on('scons', type='build') @@ -59,7 +59,7 @@ def install(self, spec, prefix): # Testing - def buildtest(self): + def build_test(self): """Run unit tests after build. By default, does nothing. Override this if you want to diff --git a/lib/spack/spack/build_systems/waf.py b/lib/spack/spack/build_systems/waf.py index e15ffdc4b82..a6dbbbdb352 100644 --- a/lib/spack/spack/build_systems/waf.py +++ b/lib/spack/spack/build_systems/waf.py @@ -47,10 +47,10 @@ class WafPackage(PackageBase): build_system_class = 'WafPackage' # Callback names for build-time test - build_time_test_callbacks = ['buildtest'] + build_time_test_callbacks = ['build_test'] # Callback names for install-time test - install_time_test_callbacks = ['installtest'] + install_time_test_callbacks = ['install_test'] # Much like AutotoolsPackage does not require automake and autoconf # to build, WafPackage does not require waf to build. It only requires @@ -106,7 +106,7 @@ def install_args(self): # Testing - def buildtest(self): + def build_test(self): """Run unit tests after build. By default, does nothing. Override this if you want to @@ -116,7 +116,7 @@ def buildtest(self): run_after('build')(PackageBase._run_default_build_time_test_callbacks) - def installtest(self): + def install_test(self): """Run unit tests after install. By default, does nothing. Override this if you want to diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py index 3f2446a4bbe..3ef4c676fd4 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -178,7 +178,7 @@ def install(self, spec, prefix): @run_after('install') @on_package_attributes(run_tests=True) - def installtest(self): + def install_test(self): # https://github.com/Homebrew/homebrew-core/blob/master/Formula/bazel.rb # Bazel does not work properly on NFS, switch to /tmp diff --git a/var/spack/repos/builtin/packages/cantera/package.py b/var/spack/repos/builtin/packages/cantera/package.py index 5476a51e0be..9846fff48df 100644 --- a/var/spack/repos/builtin/packages/cantera/package.py +++ b/var/spack/repos/builtin/packages/cantera/package.py @@ -146,7 +146,7 @@ def build_args(self, spec, prefix): return args - def buildtest(self): + def build_test(self): if '+python' in self.spec: # Tests will always fail if Python dependencies aren't built # In addition, 3 of the tests fail when run in parallel diff --git a/var/spack/repos/builtin/packages/cmake/package.py b/var/spack/repos/builtin/packages/cmake/package.py index 43e446d21d2..27bb94bd827 100644 --- a/var/spack/repos/builtin/packages/cmake/package.py +++ b/var/spack/repos/builtin/packages/cmake/package.py @@ -241,7 +241,7 @@ def build(self, spec, prefix): @run_after('build') @on_package_attributes(run_tests=True) - def buildtest(self): + def build_test(self): # Some tests fail, takes forever make('test') diff --git a/var/spack/repos/builtin/packages/conduit/package.py b/var/spack/repos/builtin/packages/conduit/package.py index 93e68d7eec5..56703c8bb30 100644 --- a/var/spack/repos/builtin/packages/conduit/package.py +++ b/var/spack/repos/builtin/packages/conduit/package.py @@ -217,7 +217,7 @@ def build(self, spec, prefix): @run_after('build') @on_package_attributes(run_tests=True) - def buildtest(self): + def build_test(self): with working_dir('spack-build'): print("Running Conduit Unit Tests...") make("test") diff --git a/var/spack/repos/builtin/packages/jq/package.py b/var/spack/repos/builtin/packages/jq/package.py index 13d3d939a2e..9f67ce5bbed 100644 --- a/var/spack/repos/builtin/packages/jq/package.py +++ b/var/spack/repos/builtin/packages/jq/package.py @@ -21,7 +21,7 @@ class Jq(AutotoolsPackage): @run_after('install') @on_package_attributes(run_tests=True) - def installtest(self): + def install_test(self): jq = self.spec['jq'].command f = os.path.join(os.path.dirname(__file__), 'input.json') diff --git a/var/spack/repos/builtin/packages/ninja-fortran/package.py b/var/spack/repos/builtin/packages/ninja-fortran/package.py index 0b93dfd27c6..d85a5b45427 100644 --- a/var/spack/repos/builtin/packages/ninja-fortran/package.py +++ b/var/spack/repos/builtin/packages/ninja-fortran/package.py @@ -51,7 +51,7 @@ def configure(self, spec, prefix): @run_after('configure') @on_package_attributes(run_tests=True) - def configuretest(self): + def configure_test(self): ninja = Executable('./ninja') ninja('-j{0}'.format(make_jobs), 'ninja_test') ninja_test = Executable('./ninja_test') diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py index 9d097c7dce2..a0ba8083aad 100644 --- a/var/spack/repos/builtin/packages/ninja/package.py +++ b/var/spack/repos/builtin/packages/ninja/package.py @@ -34,7 +34,7 @@ def configure(self, spec, prefix): @run_after('configure') @on_package_attributes(run_tests=True) - def configuretest(self): + def configure_test(self): ninja = Executable('./ninja') ninja('-j{0}'.format(make_jobs), 'ninja_test') ninja_test = Executable('./ninja_test') diff --git a/var/spack/repos/builtin/packages/node-js/package.py b/var/spack/repos/builtin/packages/node-js/package.py index 909d76d2aaa..c7b0b9a3f5e 100644 --- a/var/spack/repos/builtin/packages/node-js/package.py +++ b/var/spack/repos/builtin/packages/node-js/package.py @@ -120,7 +120,7 @@ def build(self, spec, prefix): @run_after('build') @on_package_attributes(run_tests=True) - def buildtest(self): + def build_test(self): make('test') make('test-addons') diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index bee78e19fef..ebdfa38b9f8 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -198,7 +198,7 @@ def build(self, spec, prefix): @run_after('build') @on_package_attributes(run_tests=True) - def buildtest(self): + def build_test(self): make('test') def install(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/py-cloudpickle/package.py b/var/spack/repos/builtin/packages/py-cloudpickle/package.py index 453defb6d14..0f7e5252903 100644 --- a/var/spack/repos/builtin/packages/py-cloudpickle/package.py +++ b/var/spack/repos/builtin/packages/py-cloudpickle/package.py @@ -19,6 +19,6 @@ class PyCloudpickle(PythonPackage): depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # PyPI tarball does not come with unit tests pass diff --git a/var/spack/repos/builtin/packages/py-cython/package.py b/var/spack/repos/builtin/packages/py-cython/package.py index a4c39b430cf..7025b360305 100644 --- a/var/spack/repos/builtin/packages/py-cython/package.py +++ b/var/spack/repos/builtin/packages/py-cython/package.py @@ -47,6 +47,6 @@ def command(self): """Returns the Cython command""" return Executable(self.prefix.bin.cython) - def buildtest(self): + def build_test(self): # Warning: full suite of unit tests takes a very long time python('runtests.py', '-j', str(make_jobs)) diff --git a/var/spack/repos/builtin/packages/py-fiona/package.py b/var/spack/repos/builtin/packages/py-fiona/package.py index 5a0789522b6..b4213d5f61a 100644 --- a/var/spack/repos/builtin/packages/py-fiona/package.py +++ b/var/spack/repos/builtin/packages/py-fiona/package.py @@ -34,6 +34,6 @@ class PyFiona(PythonPackage): depends_on('py-ordereddict', type=('build', 'run'), when='^python@:2.6') depends_on('py-enum34', type=('build', 'run'), when='^python@:3.3') - def buildtest(self): + def build_test(self): # PyPI tarball does not come with unit tests pass diff --git a/var/spack/repos/builtin/packages/py-matplotlib/package.py b/var/spack/repos/builtin/packages/py-matplotlib/package.py index 28dd923014d..ff812f8b27e 100644 --- a/var/spack/repos/builtin/packages/py-matplotlib/package.py +++ b/var/spack/repos/builtin/packages/py-matplotlib/package.py @@ -167,6 +167,6 @@ def configure(self): setup.write('system_freetype = True\n') setup.write('system_qhull = True\n') - def buildtest(self): + def build_test(self): pytest = which('pytest') pytest() diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 3df620e11ff..b31664c0090 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -298,7 +298,7 @@ def build_args(self, spec, prefix): return args - def buildtest(self): + def build_test(self): # `setup.py test` is not supported. Use one of the following # instead: # diff --git a/var/spack/repos/builtin/packages/py-py/package.py b/var/spack/repos/builtin/packages/py-py/package.py index 687d3fb6122..995612d20ac 100644 --- a/var/spack/repos/builtin/packages/py-py/package.py +++ b/var/spack/repos/builtin/packages/py-py/package.py @@ -28,6 +28,6 @@ class PyPy(PythonPackage): depends_on('py-setuptools', type='build') depends_on('py-setuptools-scm', type='build') - def buildtest(self): + def build_test(self): # Tests require pytest, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-py2cairo/package.py b/var/spack/repos/builtin/packages/py-py2cairo/package.py index 1427c7e45c3..5c492a9167d 100644 --- a/var/spack/repos/builtin/packages/py-py2cairo/package.py +++ b/var/spack/repos/builtin/packages/py-py2cairo/package.py @@ -23,7 +23,7 @@ class PyPy2cairo(WafPackage): depends_on('py-pytest', type='test') - def installtest(self): + def install_test(self): with working_dir('test'): pytest = which('py.test') pytest() diff --git a/var/spack/repos/builtin/packages/py-pybind11/package.py b/var/spack/repos/builtin/packages/py-pybind11/package.py index d1b16a8bb46..1c07734e6f9 100644 --- a/var/spack/repos/builtin/packages/py-pybind11/package.py +++ b/var/spack/repos/builtin/packages/py-pybind11/package.py @@ -74,7 +74,7 @@ def install(self, spec, prefix): @run_after('install') @on_package_attributes(run_tests=True) - def installtest(self): + def install_test(self): with working_dir('spack-test', create=True): # test include helper points to right location python = self.spec['python'].command diff --git a/var/spack/repos/builtin/packages/py-pygments/package.py b/var/spack/repos/builtin/packages/py-pygments/package.py index ec4a43bc250..d7559b36d89 100644 --- a/var/spack/repos/builtin/packages/py-pygments/package.py +++ b/var/spack/repos/builtin/packages/py-pygments/package.py @@ -29,6 +29,6 @@ class PyPygments(PythonPackage): depends_on('python@3.5:', type=('build', 'run'), when='@2.6:') depends_on('py-setuptools', type=('build', 'run')) - def buildtest(self): + def build_test(self): # Unit tests require sphinx, but that creates a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-python-dateutil/package.py b/var/spack/repos/builtin/packages/py-python-dateutil/package.py index f44df912a61..16bff6858dd 100644 --- a/var/spack/repos/builtin/packages/py-python-dateutil/package.py +++ b/var/spack/repos/builtin/packages/py-python-dateutil/package.py @@ -31,7 +31,7 @@ class PyPythonDateutil(PythonPackage): # depends_on('py-hypothesis', type='test') # depends_on('py-freezegun', type='test') - def buildtest(self): + def build_test(self): # Tests require freezegun, which depends on python-dateutil, # creating circular dependency # pytest = which('pytest') diff --git a/var/spack/repos/builtin/packages/py-scipy/package.py b/var/spack/repos/builtin/packages/py-scipy/package.py index 2fb93df06d0..f206c34b4cf 100644 --- a/var/spack/repos/builtin/packages/py-scipy/package.py +++ b/var/spack/repos/builtin/packages/py-scipy/package.py @@ -92,7 +92,7 @@ def build_args(self, spec, prefix): return args - def buildtest(self): + def build_test(self): # `setup.py test` is not supported. Use one of the following # instead: # diff --git a/var/spack/repos/builtin/packages/py-setuptools/package.py b/var/spack/repos/builtin/packages/py-setuptools/package.py index d41d818fdcf..2709588c4f1 100644 --- a/var/spack/repos/builtin/packages/py-setuptools/package.py +++ b/var/spack/repos/builtin/packages/py-setuptools/package.py @@ -70,6 +70,6 @@ def url_for_version(self, version): return url - def buildtest(self): + def build_test(self): # Unit tests require pytest, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py index 1948d63e9d9..67ba38134cc 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-applehelp/package.py @@ -18,6 +18,6 @@ class PySphinxcontribApplehelp(PythonPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Requires sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py index e6ca2688db6..1954fc96771 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-devhelp/package.py @@ -18,6 +18,6 @@ class PySphinxcontribDevhelp(PythonPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Requires sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py index 1edf6b0dac6..95f6819d591 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-htmlhelp/package.py @@ -18,6 +18,6 @@ class PySphinxcontribHtmlhelp(PythonPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Requires sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-jsmath/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-jsmath/package.py index 159ca723f23..add0160ac8e 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-jsmath/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-jsmath/package.py @@ -17,6 +17,6 @@ class PySphinxcontribJsmath(PythonPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Requires sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py index 707b3a2a86a..19fd328f376 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-qthelp/package.py @@ -18,6 +18,6 @@ class PySphinxcontribQthelp(PythonPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Requires sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-serializinghtml/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-serializinghtml/package.py index 88066ae1b37..3bad6d661aa 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-serializinghtml/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-serializinghtml/package.py @@ -18,6 +18,6 @@ class PySphinxcontribSerializinghtml(PythonPackage): depends_on('python@3.5:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Requires sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-sphinxcontrib-websupport/package.py b/var/spack/repos/builtin/packages/py-sphinxcontrib-websupport/package.py index 11de0576466..1e4d1051a38 100644 --- a/var/spack/repos/builtin/packages/py-sphinxcontrib-websupport/package.py +++ b/var/spack/repos/builtin/packages/py-sphinxcontrib-websupport/package.py @@ -26,6 +26,6 @@ class PySphinxcontribWebsupport(PythonPackage): depends_on('python@2.7:2.8,3.4:', type=('build', 'run')) depends_on('py-setuptools', type='build') - def buildtest(self): + def build_test(self): # Unit tests require sphinx, creating a circular dependency pass diff --git a/var/spack/repos/builtin/packages/py-statsmodels/package.py b/var/spack/repos/builtin/packages/py-statsmodels/package.py index 1c20610bcdf..b00e51730be 100644 --- a/var/spack/repos/builtin/packages/py-statsmodels/package.py +++ b/var/spack/repos/builtin/packages/py-statsmodels/package.py @@ -42,7 +42,7 @@ class PyStatsmodels(PythonPackage): depends_on('py-pytest', type='test') - def buildtest(self): + def build_test(self): dirs = glob.glob("build/lib*") # There can be only one... with working_dir(dirs[0]): pytest = which('pytest') diff --git a/var/spack/repos/builtin/packages/serf/package.py b/var/spack/repos/builtin/packages/serf/package.py index 110d9c3bc38..96df6f7579f 100644 --- a/var/spack/repos/builtin/packages/serf/package.py +++ b/var/spack/repos/builtin/packages/serf/package.py @@ -63,7 +63,7 @@ def build_args(self, spec, prefix): return args - def buildtest(self): + def build_test(self): # FIXME: Several test failures: # # There were 14 failures: