diff options
author | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2020-11-01 20:42:14 +0100 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2020-11-17 10:04:13 -0800 |
commit | e0ae60edc4ee7dafc5ab99d756d9c63624c281d5 (patch) | |
tree | 83ed4f795fee8bbd5f27545aa8611ee197e6ddc2 /var | |
parent | 63327d1eea2a724c2587316b94aecb09787a940d (diff) | |
download | spack-e0ae60edc4ee7dafc5ab99d756d9c63624c281d5.tar.gz spack-e0ae60edc4ee7dafc5ab99d756d9c63624c281d5.tar.bz2 spack-e0ae60edc4ee7dafc5ab99d756d9c63624c281d5.tar.xz spack-e0ae60edc4ee7dafc5ab99d756d9c63624c281d5.zip |
Added unit tests to for regressions on open concretizer bugs
Diffstat (limited to 'var')
9 files changed, 144 insertions, 2 deletions
diff --git a/var/spack/repos/builtin.mock/packages/cumulative-vrange-bottom/package.py b/var/spack/repos/builtin.mock/packages/cumulative-vrange-bottom/package.py new file mode 100644 index 0000000000..dbbec45497 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cumulative-vrange-bottom/package.py @@ -0,0 +1,16 @@ +# 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 CumulativeVrangeBottom(Package): + """Test that creating cumulative version ranges of the + form X.Y:X works and allows for the selection of all the + versions >= X.Y with major == X + """ + homepage = 'https://www.example.org' + url = 'https://example.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('3.0', '4cb3ff35b2472aae70f542116d616e63') + version('2.2', '4cb3ff35b2472aae70f542116d616e63') + version('2.1', '4cb3ff35b2472aae70f542116d616e63') + version('2.0', '4cb3ff35b2472aae70f542116d616e63') diff --git a/var/spack/repos/builtin.mock/packages/cumulative-vrange-middle/package.py b/var/spack/repos/builtin.mock/packages/cumulative-vrange-middle/package.py new file mode 100644 index 0000000000..7a6d6d4315 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cumulative-vrange-middle/package.py @@ -0,0 +1,15 @@ +# 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 CumulativeVrangeMiddle(Package): + """Test that creating cumulative version ranges of the + form X.Y:X works and allows for the selection of all the + versions >= X.Y with major == X + """ + homepage = 'https://www.example.org' + url = 'https://example.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') + + depends_on('cumulative-vrange-bottom@2.1:') diff --git a/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py b/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py new file mode 100644 index 0000000000..8215ceb517 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/cumulative-vrange-root/package.py @@ -0,0 +1,16 @@ +# 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 CumulativeVrangeRoot(Package): + """Test that creating cumulative version ranges of the + form X.Y:X works and allows for the selection of all the + versions >= X.Y with major == X + """ + homepage = 'https://www.example.org' + url = 'https://example.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') + + depends_on('cumulative-vrange-middle') + depends_on('cumulative-vrange-bottom@:2')
\ No newline at end of file diff --git a/var/spack/repos/builtin.mock/packages/fftw/package.py b/var/spack/repos/builtin.mock/packages/fftw/package.py new file mode 100644 index 0000000000..9adcf1ea0a --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/fftw/package.py @@ -0,0 +1,18 @@ +# 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 Fftw(Package): + """Used to test that a few problematic concretization + cases with the old concretizer have been solved by the + new ones. + """ + homepage = "http://www.example.com" + url = "http://www.example.com/fftw-1.0.tar.gz" + + version(2.0, 'foobar') + version(1.0, 'foobar') + + variant('mpi', default=False, description='Enable MPI') + + depends_on('mpi', when='+mpi') diff --git a/var/spack/repos/builtin.mock/packages/hdf5/package.py b/var/spack/repos/builtin.mock/packages/hdf5/package.py index 495dbcbaa8..765a2993b8 100644 --- a/var/spack/repos/builtin.mock/packages/hdf5/package.py +++ b/var/spack/repos/builtin.mock/packages/hdf5/package.py @@ -10,6 +10,6 @@ class Hdf5(Package): version(2.3, 'foobarbaz') - variant('mpi', default=True, description='Debug variant') + variant('mpi', default=True, description='Enable mpi') - depends_on('mpi', when='mpi') + depends_on('mpi', when='+mpi') diff --git a/var/spack/repos/builtin.mock/packages/quantum-espresso/package.py b/var/spack/repos/builtin.mock/packages/quantum-espresso/package.py new file mode 100644 index 0000000000..61287ab7c8 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/quantum-espresso/package.py @@ -0,0 +1,24 @@ +# 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 QuantumEspresso(Package): + """Used to test that a few problematic concretization + cases with the old concretizer have been solved by the + new ones. + """ + homepage = "http://www.example.com" + url = "http://www.example.com/qe-1.0.tar.gz" + + version(1.0, 'foobar') + + variant('invino', default=True, description='?') + variant('veritas', default=True, description='?') + + depends_on('fftw@:1.0') + depends_on('fftw+mpi', when='+invino') + + depends_on('openblas', when='^fftw@:1') + + depends_on('libelf@0.8.10:') + depends_on('libelf@:0.8.12', when='+veritas') diff --git a/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-a/package.py b/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-a/package.py new file mode 100644 index 0000000000..f2687d6043 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-a/package.py @@ -0,0 +1,18 @@ +# 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 VariantOnDependencyConditionA(Package): + """Test that dependencies that are conditional on the state of + other dependencies are added correctly, for instance: + + depends_on('A') + depends_on('B', when='^A+x') + """ + + homepage = 'https://www.example.org' + url = 'https://example.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') + + variant('x', default=True, description='?') diff --git a/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-b/package.py b/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-b/package.py new file mode 100644 index 0000000000..7660a42a8e --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-b/package.py @@ -0,0 +1,15 @@ +# 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 VariantOnDependencyConditionB(Package): + """Test that dependencies that are conditional on the state of + other dependencies are added correctly, for instance: + + depends_on('A') + depends_on('B', when='^A+x') + """ + homepage = 'https://www.example.org' + url = 'https://example.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') diff --git a/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-root/package.py b/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-root/package.py new file mode 100644 index 0000000000..c6ea84b8b2 --- /dev/null +++ b/var/spack/repos/builtin.mock/packages/variant-on-dependency-condition-root/package.py @@ -0,0 +1,20 @@ +# 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 VariantOnDependencyConditionRoot(Package): + """Test that dependencies that are conditional on the state of + other dependencies are added correctly, for instance: + + depends_on('A') + depends_on('B', when='^A+x') + """ + + homepage = 'https://www.example.org' + url = 'https://example.org/files/v3.4/cmake-3.4.3.tar.gz' + + version('1.0', '4cb3ff35b2472aae70f542116d616e63') + + depends_on('variant-on-dependency-condition-a') + depends_on('variant-on-dependency-condition-b', + when='^variant-on-dependency-condition-a+x') |