concretizer: allow a bool to be passed as argument for tests dependencies (#20082)

refers #20079

Added docstrings to 'concretize' and 'concretized' to
document the format for tests.

Added tests for the activation of test dependencies.
This commit is contained in:
Massimiliano Culpo
2020-11-26 08:55:17 +01:00
committed by Tamara Dahlgren
parent 8e1b5f734f
commit 0ae49821e2
6 changed files with 69 additions and 8 deletions

View File

@@ -31,6 +31,7 @@ class A(AutotoolsPackage):
variant('bvv', default=True, description='The good old BV variant')
depends_on('b', when='foobar=bar')
depends_on('test-dependency', type='test')
parallel = False

View File

@@ -13,3 +13,5 @@ class B(Package):
url = "http://www.example.com/b-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')
depends_on('test-dependency', type='test')

View File

@@ -0,0 +1,12 @@
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class TestDependency(Package):
"""Represent a dependency that is pulled-in to allow testing other
packages.
"""
homepage = "http://www.example.com"
url = "http://www.example.com/tdep-1.0.tar.gz"
version('1.0', '0123456789abcdef0123456789abcdef')