Speed-up bootstrap and architecture unit tests (#33865)
* Speed-up bootstrap mirror unit test The unit test doesn't need to concretize, since it checks only metadata for the mirror. * architecture.py: use "default_mock_concretization" for slow test
This commit is contained in:
parent
4ebe57cd64
commit
03224e52d2
@ -70,11 +70,11 @@ def test_user_input_combination(config, target_str, os_str):
|
|||||||
assert spec.architecture.target == TEST_PLATFORM.target(target_str)
|
assert spec.architecture.target == TEST_PLATFORM.target(target_str)
|
||||||
|
|
||||||
|
|
||||||
def test_default_os_and_target(config):
|
def test_default_os_and_target(default_mock_concretization):
|
||||||
"""Test that is we don't specify `os=` or `target=` we get the default values
|
"""Test that is we don't specify `os=` or `target=` we get the default values
|
||||||
after concretization.
|
after concretization.
|
||||||
"""
|
"""
|
||||||
spec = spack.spec.Spec("libelf").concretized()
|
spec = default_mock_concretization("libelf")
|
||||||
assert spec.architecture.os == str(TEST_PLATFORM.operating_system("default_os"))
|
assert spec.architecture.os == str(TEST_PLATFORM.operating_system("default_os"))
|
||||||
assert spec.architecture.target == TEST_PLATFORM.target("default_target")
|
assert spec.architecture.target == TEST_PLATFORM.target("default_target")
|
||||||
|
|
||||||
|
@ -182,6 +182,7 @@ def test_bootstrap_mirror_metadata(mutable_config, linux_os, monkeypatch, tmpdir
|
|||||||
"""
|
"""
|
||||||
old_create = spack.mirror.create
|
old_create = spack.mirror.create
|
||||||
monkeypatch.setattr(spack.mirror, "create", lambda p, s: old_create(p, []))
|
monkeypatch.setattr(spack.mirror, "create", lambda p, s: old_create(p, []))
|
||||||
|
monkeypatch.setattr(spack.spec.Spec, "concretized", lambda p: p)
|
||||||
|
|
||||||
# Create the mirror in a temporary folder
|
# Create the mirror in a temporary folder
|
||||||
compilers = [
|
compilers = [
|
||||||
|
Loading…
Reference in New Issue
Block a user