This commit is contained in:
psakiev 2025-05-14 12:29:06 -06:00
parent 944b3dad3f
commit 815cb4f5b2

View File

@ -583,6 +583,14 @@ def test_mirror_add_filters(mutable_config, tmpdir):
mirror("add", "--exclude-specs", "foo", "example", "http://example.com")
assert spack.config.get("mirrors:example") == {"url": "http://example.com", "exclude": ["foo"]}
mirror("set", "--include-specs", "+shared", "example")
assert spack.config.get("mirrors:example") == {"url": "http://example.com", "exclude": ["foo"], "include": ["+shared"]}
mirror("set", "--include-file", include_path,"--exclude-file", exclude_path, "example")
assert spack.config.get("mirrors:example") == {"url": "http://example.com", "exclude": ["mpich@3.0.1:3.0.2", "mpich@1.0"], "include": ["build_type=Debug", "gcc-runtime"]}
assert spack.config.get("mirrors:example") == {
"url": "http://example.com",
"exclude": ["foo"],
"include": ["+shared"],
}
mirror("set", "--include-file", include_path, "--exclude-file", exclude_path, "example")
assert spack.config.get("mirrors:example") == {
"url": "http://example.com",
"exclude": ["mpich@3.0.1:3.0.2", "mpich@1.0"],
"include": ["build_type=Debug", "gcc-runtime"],
}