Format and mark
This commit is contained in:
parent
abd383d9d8
commit
b88c0e6b6d
@ -2824,10 +2824,12 @@ def test_git_ref_version_can_be_reused(
|
||||
)
|
||||
# override gcc-runtime dep and make all installs reusable
|
||||
monkeypatch.setattr(spack.solver.asp, "_has_runtime_dependencies", mock_runtime_dependencies)
|
||||
|
||||
first_spec = spack.spec.Spec(
|
||||
"git-test-commit@git.v1.0=1.0+generic_install+feature"
|
||||
).concretized()
|
||||
first_spec.package.do_install(fake=True, explicit=True)
|
||||
|
||||
with spack.config.override("concretizer:reuse", True):
|
||||
second_spec = spack.spec.Spec(
|
||||
"git-test-commit@git.v1.0=1.0+generic_install~feature"
|
||||
@ -2836,12 +2838,14 @@ def test_git_ref_version_can_be_reused(
|
||||
assert second_spec.dag_hash() != first_spec.dag_hash()
|
||||
|
||||
|
||||
@pytest.mark.only_clingo("clingo only re-use feature being tested")
|
||||
def test_reuse_prefers_standard_over_git_versions(
|
||||
monkeypatch, mock_packages, install_mockery_mutable_config, mock_git_version_info
|
||||
):
|
||||
"""
|
||||
order matters in this test. typically re-use would pick the last installed match
|
||||
but we want to prefer the standard version over git ref based versions
|
||||
so install git ref last and ensure it is not picked up by re-use
|
||||
"""
|
||||
repo_path, filename, commits = mock_git_version_info
|
||||
monkeypatch.setattr(
|
||||
@ -2849,12 +2853,15 @@ def test_reuse_prefers_standard_over_git_versions(
|
||||
)
|
||||
# override gcc-runtime dep and make all installs reusable
|
||||
monkeypatch.setattr(spack.solver.asp, "_has_runtime_dependencies", mock_runtime_dependencies)
|
||||
|
||||
standard_spec = spack.spec.Spec("git-test-commit@1.0+generic_install+feature").concretized()
|
||||
standard_spec.package.do_install(fake=True, explicit=True)
|
||||
|
||||
git_spec = spack.spec.Spec(
|
||||
"git-test-commit@git.v1.0=1.0+generic_install+feature"
|
||||
).concretized()
|
||||
git_spec.package.do_install(fake=True, explicit=True)
|
||||
|
||||
with spack.config.override("concretizer:reuse", True):
|
||||
test_spec = spack.spec.Spec("git-test-commit@1.0+generic_install").concretized()
|
||||
assert git_spec.dag_hash() != test_spec.dag_hash()
|
||||
|
Loading…
Reference in New Issue
Block a user