Ideas for facts that will close the loop
This commit is contained in:
parent
9dc57d2864
commit
f85329e792
@ -3125,7 +3125,6 @@ def setup(
|
||||
version = max(versions.keys())
|
||||
spec.versions = spack.version.VersionList([version])
|
||||
|
||||
|
||||
self.gen = ProblemInstanceBuilder()
|
||||
compiler_parser = CompilerParser(configuration=spack.config.CONFIG).with_input_specs(specs)
|
||||
|
||||
@ -3203,6 +3202,10 @@ def setup(
|
||||
allow_deprecated=allow_deprecated, require_checksum=checksummed
|
||||
)
|
||||
|
||||
self.gen.h1("Infinity Versions")
|
||||
for i, v in enumerate(spack.version.infinity_versions):
|
||||
self.gen.fact(fn.infinity_version(v, i))
|
||||
|
||||
self.gen.h1("Package Constraints")
|
||||
for pkg in sorted(self.pkgs):
|
||||
self.gen.h2("Package rules: %s" % pkg)
|
||||
|
@ -356,6 +356,10 @@ error(10, "Commit '{0}' must match package.py value '{1}' for '{2}@={3}'", Vsha,
|
||||
Vsha == Psha,
|
||||
VersionA != VersionB.
|
||||
|
||||
% rule that says if a spec has a commit choose the max version that can accept a commit
|
||||
|
||||
% rule that says if a constraint is on a commit and a version matches that commit then the constraint is on the version
|
||||
|
||||
#defined version_satisfies/3.
|
||||
#defined deprecated_versions_not_allowed/0.
|
||||
#defined deprecated_version/2.
|
||||
|
@ -617,7 +617,7 @@ def _nresults(_qresult):
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("install_mockery", "mock_fetch", "mutable_mock_env_path")
|
||||
def test_find_based_on_commit_sha(mock_git_version_info, monkeypatch):
|
||||
def test_phil_find_based_on_commit_sha(mock_git_version_info, monkeypatch):
|
||||
repo_path, filename, commits = mock_git_version_info
|
||||
file_url = pathlib.Path(repo_path).as_uri()
|
||||
|
||||
|
@ -2729,13 +2729,13 @@ def test_correct_external_is_selected_from_packages_yaml(self, mutable_config):
|
||||
assert s.satisfies("%clang")
|
||||
assert s.prefix == "/tmp/prefix2"
|
||||
|
||||
def test_git_based_version_must_exist_to_use_ref(self):
|
||||
def test_phil_git_based_version_must_exist_to_use_ref(self):
|
||||
# gmake should fail, only has sha256
|
||||
with pytest.raises(spack.error.UnsatisfiableSpecError) as e:
|
||||
spack.concretize.concretize_one(f"gmake commit={'a' * 40}")
|
||||
assert "Cannot use commit variant with" in e.value.message
|
||||
|
||||
def test_commit_variant_in_absence_of_version_selects_max_infinity_version(self):
|
||||
def test_phil_commit_variant_in_absence_of_version_selects_max_infinity_version(self):
|
||||
spec = spack.concretize.concretize_one(f"git-ref-package commit={'a' * 40}")
|
||||
assert spec.satisfies("@develop")
|
||||
|
||||
@ -3315,7 +3315,7 @@ def test_phil_spec_with_commit_interacts_with_lookup(mock_git_version_info, monk
|
||||
|
||||
@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"])
|
||||
def test_relationship_git_versions_and_commit_variant(version_str):
|
||||
def test_phil_relationship_git_versions_and_commit_variant(version_str):
|
||||
"""
|
||||
Confirm that GitVersions auto assign and poopulate the commit variant correctly
|
||||
"""
|
||||
|
@ -348,6 +348,15 @@ def test_phil_package_condtional_variants_may_depend_on_commit(mock_packages, co
|
||||
assert conditional_variant
|
||||
assert conditional_variant.value
|
||||
|
||||
"""
|
||||
Issues:
|
||||
- version has commit Version("foo", commit=<sha>)
|
||||
- version needs commit Version("master", branch=<branch>)
|
||||
- cli default
|
||||
- contraints/overridding current selection
|
||||
- constraints/changing current selection
|
||||
"""
|
||||
|
||||
|
||||
def test_phil_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
||||
"""
|
||||
|
@ -815,7 +815,7 @@ def test_version_list_with_range_and_concrete_version_is_not_concrete():
|
||||
"git_ref, std_version",
|
||||
(("foo", "develop"), ("a" * 40, "develop"), ("a" * 40, None), ("v1.2.0", "1.2.0")),
|
||||
)
|
||||
def test_git_versions_store_ref_requests(git_ref, std_version):
|
||||
def test_phil_git_versions_store_ref_requests(git_ref, std_version):
|
||||
"""
|
||||
User requested ref's should be known on creation
|
||||
Commit and standard version may not be known until concretization
|
||||
|
Loading…
Reference in New Issue
Block a user