Added unit tests to for regressions on open concretizer bugs
This commit is contained in:

committed by
Todd Gamblin

parent
63327d1eea
commit
e0ae60edc4
@@ -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')
|
@@ -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:')
|
@@ -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')
|
18
var/spack/repos/builtin.mock/packages/fftw/package.py
Normal file
18
var/spack/repos/builtin.mock/packages/fftw/package.py
Normal file
@@ -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')
|
@@ -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')
|
||||
|
@@ -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')
|
@@ -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='?')
|
@@ -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')
|
@@ -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')
|
Reference in New Issue
Block a user