Bugfix: allow test_* build-time and stand-alone tests (#45699)
This commit is contained in:
parent
e40c10509d
commit
8ba6e7eed2
@ -757,6 +757,10 @@ def test_process(pkg: Pb, kwargs):
|
||||
pkg.tester.status(pkg.spec.name, TestStatus.SKIPPED)
|
||||
return
|
||||
|
||||
# Make sure properly named build-time test methods actually run as
|
||||
# stand-alone tests.
|
||||
pkg.run_tests = True
|
||||
|
||||
# run test methods from the package and all virtuals it provides
|
||||
v_names = virtuals(pkg)
|
||||
test_specs = [pkg.spec] + [spack.spec.Spec(v_name) for v_name in sorted(v_names)]
|
||||
|
@ -101,6 +101,7 @@ def setup_dependent_build_environment(self, env, dependent_spec):
|
||||
@run_after("install")
|
||||
@on_package_attributes(run_tests=True)
|
||||
def test_install(self):
|
||||
"""Run pytest tests"""
|
||||
# https://shapely.readthedocs.io/en/latest/installation.html#testing-shapely
|
||||
if self.version >= Version("2"):
|
||||
with working_dir("spack-test", create=True):
|
||||
|
Loading…
Reference in New Issue
Block a user