Rework test
This commit is contained in:
parent
1d6662abfb
commit
1d441c1a7a
@ -350,5 +350,5 @@ def test_phil_package_condtional_variants_may_depend_on_commit(mock_packages, co
|
|||||||
|
|
||||||
|
|
||||||
def test_phil_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
def test_phil_commit_variant_finds_matches_for_commit_versions(mock_packages, config):
|
||||||
spec = spack.concretize.concretize_one(Spec(f"git-ref-commit-dep commit={'c' * 40}"))
|
spec = spack.concretize.concretize_one(Spec("git-ref-commit-dep+commit-selector"))
|
||||||
assert spec.satisfies("^git-ref-package@stable")
|
assert spec.satisfies("^git-ref-package@stable")
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
# Copyright Spack Project Developers. See COPYRIGHT file for details.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
|
class GitRefCommitDep(AutotoolsPackage):
|
||||||
|
"""
|
||||||
|
tests dependency using commit
|
||||||
|
"""
|
||||||
|
|
||||||
|
homepage = "https://github.com/dummy/dummy"
|
||||||
|
git = "https://github.com/dummy/dummy.git"
|
||||||
|
url = git
|
||||||
|
|
||||||
|
version("develop", branch="develop")
|
||||||
|
version("1.0.0", sha256="a5d504c0d52e2e2721e7e7d86988dec2e290d723ced2307145dedd06aeb6fef2")
|
||||||
|
|
||||||
|
variant("commit-selector", default=False, description="test grabbing a specific commit")
|
||||||
|
|
||||||
|
depends_on(f"git-ref-package commit={'a' * 40}", when="@1.0.0")
|
||||||
|
depends_on(f"git-ref-package commit={'b' * 40}", when="@develop")
|
||||||
|
depends_on(f"git-ref-package commit={'c' * 40}", when="+commit-selector")
|
Loading…
Reference in New Issue
Block a user