Add unit tests for dependencies being patched by parent

This commit is contained in:
Massimiliano Culpo
2020-10-28 19:15:33 +01:00
committed by Todd Gamblin
parent e226523aeb
commit 930b05fab4
4 changed files with 23 additions and 0 deletions

View File

@@ -14,5 +14,7 @@ class Libelf(Package):
version('0.8.12', 'e21f8273d9f5f6d43a59878dc274fec7')
version('0.8.10', '9db4d36c283d9790d8fa7df1f4d7b4d9')
patch('local.patch', when='@0.8.10')
def install(self, spec, prefix):
touch(prefix.libelf)

View File

@@ -15,10 +15,14 @@ class PatchSeveralDependencies(Package):
version('2.0', '0123456789abcdef0123456789abcdef')
version('1.0', '0123456789abcdef0123456789abcdef')
variant('foo', default=False,
description='Forces a version on libelf')
# demonstrate all the different ways to patch things
# single patch file in repo
depends_on('libelf', patches='foo.patch')
depends_on('libelf@0.8.10', patches='foo.patch', when='+foo')
# using a list of patches in one depends_on
depends_on('libdwarf', patches=[