summaryrefslogtreecommitdiff
path: root/var/spack
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-10-21 17:44:53 +0200
committerMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-10-25 09:11:04 +0200
commit6d69d23aa5574df501ac8bdccdeaaf0ecc550f1b (patch)
treef71030e9da8fbcfc044febe7a4a4353203ae3419 /var/spack
parentdd4d7bae1dfdcba1697b7c669b5518bfd2daf39c (diff)
downloadspack-6d69d23aa5574df501ac8bdccdeaaf0ecc550f1b.tar.gz
spack-6d69d23aa5574df501ac8bdccdeaaf0ecc550f1b.tar.bz2
spack-6d69d23aa5574df501ac8bdccdeaaf0ecc550f1b.tar.xz
spack-6d69d23aa5574df501ac8bdccdeaaf0ecc550f1b.zip
Add a unit test to prevent regression
Diffstat (limited to 'var/spack')
-rw-r--r--var/spack/repos/builtin.mock/packages/low-priority-provider/package.py18
-rw-r--r--var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py18
2 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py b/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py
new file mode 100644
index 0000000000..d0b768637f
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/low-priority-provider/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2021 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)
+
+from spack import *
+
+
+class LowPriorityProvider(Package):
+ """Provides multiple virtuals but is low in the priority of clingo"""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/a-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ provides('lapack')
+ provides('mpi')
diff --git a/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py b/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py
new file mode 100644
index 0000000000..40da0f40e0
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/many-virtual-consumer/package.py
@@ -0,0 +1,18 @@
+# Copyright 2013-2021 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 ManyVirtualConsumer(Package):
+ """PAckage that depends on many virtual packages"""
+ url = "http://www.example.com/"
+ url = "http://www.example.com/2.0.tar.gz"
+
+ version('1.0', 'abcdef1234567890abcdef1234567890')
+
+ depends_on('mpi')
+ depends_on('lapack')
+
+ # This directive is an example of imposing a constraint on a
+ # dependency is that dependency is in the DAG. This pattern
+ # is mainly used with virtual providers.
+ depends_on('low-priority-provider@1.0', when='^low-priority-provider')