Remove Philter
This commit is contained in:
parent
ca40480908
commit
b0541cb5d5
@ -612,7 +612,7 @@ def _nresults(_qresult):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("install_mockery", "mock_fetch", "mutable_mock_env_path")
|
@pytest.mark.usefixtures("install_mockery", "mock_fetch", "mutable_mock_env_path")
|
||||||
def test_phil_find_based_on_commit_sha(mock_git_version_info, monkeypatch):
|
def test_find_based_on_commit_sha(mock_git_version_info, monkeypatch):
|
||||||
repo_path, filename, commits = mock_git_version_info
|
repo_path, filename, commits = mock_git_version_info
|
||||||
file_url = pathlib.Path(repo_path).as_uri()
|
file_url = pathlib.Path(repo_path).as_uri()
|
||||||
|
|
||||||
|
@ -2577,7 +2577,7 @@ def test_correct_external_is_selected_from_packages_yaml(self, mutable_config):
|
|||||||
assert s.satisfies("~opt")
|
assert s.satisfies("~opt")
|
||||||
assert s.prefix == "/tmp/prefix2"
|
assert s.prefix == "/tmp/prefix2"
|
||||||
|
|
||||||
def test_phil_git_based_version_must_exist_to_use_ref(self):
|
def test_git_based_version_must_exist_to_use_ref(self):
|
||||||
# gmake should fail, only has sha256
|
# gmake should fail, only has sha256
|
||||||
with pytest.raises(spack.error.UnsatisfiableSpecError) as e:
|
with pytest.raises(spack.error.UnsatisfiableSpecError) as e:
|
||||||
spack.concretize.concretize_one(f"gmake commit={'a' * 40}")
|
spack.concretize.concretize_one(f"gmake commit={'a' * 40}")
|
||||||
@ -3127,7 +3127,7 @@ def test_spec_unification(unify, mutable_config, mock_packages):
|
|||||||
(f"git-ref-package@git.{'a' * 40}=2.1.6 commit={'a' * 40}", None),
|
(f"git-ref-package@git.{'a' * 40}=2.1.6 commit={'a' * 40}", None),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_phil_spec_containing_commit_variant(spec_str, error_type):
|
def test_spec_containing_commit_variant(spec_str, error_type):
|
||||||
spec = spack.spec.Spec(spec_str)
|
spec = spack.spec.Spec(spec_str)
|
||||||
if error_type is None:
|
if error_type is None:
|
||||||
spack.concretize.concretize_one(spec)
|
spack.concretize.concretize_one(spec)
|
||||||
@ -3146,7 +3146,7 @@ def test_phil_spec_containing_commit_variant(spec_str, error_type):
|
|||||||
("git-test-commit@{sha} commit=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", None),
|
("git-test-commit@{sha} commit=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", None),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_phil_spec_with_commit_interacts_with_lookup(
|
def test_spec_with_commit_interacts_with_lookup(
|
||||||
mock_git_version_info, monkeypatch, spec_str, error_type
|
mock_git_version_info, monkeypatch, spec_str, error_type
|
||||||
):
|
):
|
||||||
# This test will be short lived. Technically we could do further checks with a Lookup
|
# This test will be short lived. Technically we could do further checks with a Lookup
|
||||||
@ -3164,7 +3164,7 @@ def test_phil_spec_with_commit_interacts_with_lookup(
|
|||||||
|
|
||||||
@pytest.mark.usefixtures("mutable_config", "mock_packages", "do_not_check_runtimes_on_reuse")
|
@pytest.mark.usefixtures("mutable_config", "mock_packages", "do_not_check_runtimes_on_reuse")
|
||||||
@pytest.mark.parametrize("version_str", [f"git.{'a' * 40}=main", "git.2.1.5=main"])
|
@pytest.mark.parametrize("version_str", [f"git.{'a' * 40}=main", "git.2.1.5=main"])
|
||||||
def test_phil_relationship_git_versions_and_commit_variant(version_str):
|
def test_relationship_git_versions_and_commit_variant(version_str):
|
||||||
"""
|
"""
|
||||||
Confirm that GitVersions auto assign and populates the commit variant correctly
|
Confirm that GitVersions auto assign and populates the commit variant correctly
|
||||||
"""
|
"""
|
||||||
@ -3178,7 +3178,7 @@ def test_phil_relationship_git_versions_and_commit_variant(version_str):
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures("install_mockery", "do_not_check_runtimes_on_reuse")
|
@pytest.mark.usefixtures("install_mockery", "do_not_check_runtimes_on_reuse")
|
||||||
def test_phil_abstract_commit_spec_reuse():
|
def test_abstract_commit_spec_reuse():
|
||||||
commit = "abcd" * 10
|
commit = "abcd" * 10
|
||||||
spec_str_1 = f"git-ref-package@develop commit={commit}"
|
spec_str_1 = f"git-ref-package@develop commit={commit}"
|
||||||
spec_str_2 = f"git-ref-package commit={commit}"
|
spec_str_2 = f"git-ref-package commit={commit}"
|
||||||
@ -3196,7 +3196,7 @@ def test_phil_abstract_commit_spec_reuse():
|
|||||||
"installed_commit, incoming_commit, reusable",
|
"installed_commit, incoming_commit, reusable",
|
||||||
[("a" * 40, "b" * 40, False), (None, "b" * 40, False), ("a" * 40, None, True)],
|
[("a" * 40, "b" * 40, False), (None, "b" * 40, False), ("a" * 40, None, True)],
|
||||||
)
|
)
|
||||||
def test_phil_commit_variant_can_be_reused(installed_commit, incoming_commit, reusable):
|
def test_commit_variant_can_be_reused(installed_commit, incoming_commit, reusable):
|
||||||
# install a non-default variant to test if reuse picks it
|
# install a non-default variant to test if reuse picks it
|
||||||
if installed_commit:
|
if installed_commit:
|
||||||
spec_str_1 = f"git-ref-package@develop commit={installed_commit} ~opt"
|
spec_str_1 = f"git-ref-package@develop commit={installed_commit} ~opt"
|
||||||
|
@ -335,13 +335,13 @@ def test_package_can_have_sparse_checkout_properties(mock_packages, mock_fetch,
|
|||||||
assert fetcher.git_sparse_paths == pkg_cls.git_sparse_paths
|
assert fetcher.git_sparse_paths == pkg_cls.git_sparse_paths
|
||||||
|
|
||||||
|
|
||||||
def test_phil_package_can_depend_on_commit_of_dependency(mock_packages, config):
|
def test_package_can_depend_on_commit_of_dependency(mock_packages, config):
|
||||||
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep@1.0.0"))
|
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep@1.0.0"))
|
||||||
assert spec.satisfies(f"^git-ref-package commit={'a' * 40}")
|
assert spec.satisfies(f"^git-ref-package commit={'a' * 40}")
|
||||||
assert "surgical" not in spec["git-ref-package"].variants
|
assert "surgical" not in spec["git-ref-package"].variants
|
||||||
|
|
||||||
|
|
||||||
def test_phil_package_condtional_variants_may_depend_on_commit(mock_packages, config):
|
def test_package_condtional_variants_may_depend_on_commit(mock_packages, config):
|
||||||
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep@develop"))
|
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep@develop"))
|
||||||
assert spec.satisfies(f"^git-ref-package commit={'b' * 40}")
|
assert spec.satisfies(f"^git-ref-package commit={'b' * 40}")
|
||||||
conditional_variant = spec["git-ref-package"].variants.get("surgical", None)
|
conditional_variant = spec["git-ref-package"].variants.get("surgical", None)
|
||||||
@ -349,7 +349,7 @@ def test_phil_package_condtional_variants_may_depend_on_commit(mock_packages, co
|
|||||||
assert conditional_variant.value
|
assert conditional_variant.value
|
||||||
|
|
||||||
|
|
||||||
def test_phil_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
def test_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
||||||
"""
|
"""
|
||||||
test conditional dependence on `when='commit=<sha>'`
|
test conditional dependence on `when='commit=<sha>'`
|
||||||
git-ref-commit-dep variant commit-selector depends on a specific commit of git-ref-package
|
git-ref-commit-dep variant commit-selector depends on a specific commit of git-ref-package
|
||||||
|
@ -815,7 +815,7 @@ def test_version_list_with_range_and_concrete_version_is_not_concrete():
|
|||||||
"git_ref, std_version",
|
"git_ref, std_version",
|
||||||
(("foo", "develop"), ("a" * 40, "develop"), ("a" * 40, None), ("v1.2.0", "1.2.0")),
|
(("foo", "develop"), ("a" * 40, "develop"), ("a" * 40, None), ("v1.2.0", "1.2.0")),
|
||||||
)
|
)
|
||||||
def test_phil_git_versions_store_ref_requests(git_ref, std_version):
|
def test_git_versions_store_ref_requests(git_ref, std_version):
|
||||||
"""
|
"""
|
||||||
User requested ref's should be known on creation
|
User requested ref's should be known on creation
|
||||||
Commit and standard version may not be known until concretization
|
Commit and standard version may not be known until concretization
|
||||||
|
Loading…
Reference in New Issue
Block a user