Speed-up a few unit-tests (#34044)

* test_suite.py: speed up slow test by using mock packages

* Don't resolve the sha during unit-tests

* Skip long-running test that fails, instead of executing it
This commit is contained in:
Massimiliano Culpo 2022-11-21 23:50:55 +01:00 committed by GitHub
parent 05fc800db9
commit 0e4ee3d352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -954,7 +954,7 @@ def test_ci_rebuild_mock_success(
assert "Cannot copy test logs" in out
@pytest.mark.xfail(reason="fails intermittently and covered by gitlab ci")
@pytest.mark.skip(reason="fails intermittently and covered by gitlab ci")
def test_ci_rebuild(
tmpdir,
working_env,

View File

@ -33,7 +33,7 @@ def test_listing_possible_os():
def test_bootstrap_phase(minimal_configuration, config_dumper, capsys):
minimal_configuration["spack"]["container"]["images"] = {
"os": "amazonlinux:2",
"spack": {"resolve_sha": True},
"spack": {"resolve_sha": False},
}
spack_yaml_dir = config_dumper(minimal_configuration)

View File

@ -43,7 +43,7 @@ def test_test_log_pathname(mock_packages, config):
assert test_suite.test_log_name(spec) in logfile
def test_test_ensure_stage(mock_test_stage):
def test_test_ensure_stage(mock_test_stage, mock_packages):
"""Make sure test stage directory is properly set up."""
spec = spack.spec.Spec("libdwarf").concretized()