summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/chain-a/package.py34
-rw-r--r--var/spack/repos/builtin.mock/packages/chain-b/package.py32
-rw-r--r--var/spack/repos/builtin.mock/packages/chain-c/package.py32
-rw-r--r--var/spack/repos/builtin.mock/packages/chain-d/package.py31
4 files changed, 129 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/chain-a/package.py b/var/spack/repos/builtin.mock/packages/chain-a/package.py
new file mode 100644
index 0000000000..6dc7dc2c90
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/chain-a/package.py
@@ -0,0 +1,34 @@
+# Copyright 2013-2022 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.package import *
+
+
+class ChainA(Package):
+ """
+ Part of a collection of mock packages used for testing depth-first vs
+ breadth-first traversal. The DAG they form:
+ a --> b --> c --> d # a chain
+ a --> c # "skip" connection
+ a --> d # "skip" connection
+ Spack's edge order is based on the child package name.
+ In depth-first traversal we get a tree that looks like a chain:
+ a
+ b
+ c
+ d
+ In breadth-first we get the tree:
+ a
+ b
+ c
+ d
+ """
+
+ homepage = "https://example.com"
+ has_code = False
+ version("1.0")
+ depends_on("chain-b")
+ depends_on("chain-c")
+ depends_on("chain-d")
diff --git a/var/spack/repos/builtin.mock/packages/chain-b/package.py b/var/spack/repos/builtin.mock/packages/chain-b/package.py
new file mode 100644
index 0000000000..ede29c0e0f
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/chain-b/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2022 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.package import *
+
+
+class ChainB(Package):
+ """
+ Part of a collection of mock packages used for testing depth-first vs
+ breadth-first traversal. The DAG they form:
+ a --> b --> c --> d # a chain
+ a --> c # "skip" connection
+ a --> d # "skip" connection
+ Spack's edge order is based on the child package name.
+ In depth-first traversal we get a tree that looks like a chain:
+ a
+ b
+ c
+ d
+ In breadth-first we get the tree:
+ a
+ b
+ c
+ d
+ """
+
+ homepage = "https://example.com"
+ has_code = False
+ version("1.0")
+ depends_on("chain-c")
diff --git a/var/spack/repos/builtin.mock/packages/chain-c/package.py b/var/spack/repos/builtin.mock/packages/chain-c/package.py
new file mode 100644
index 0000000000..e9d919f0ba
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/chain-c/package.py
@@ -0,0 +1,32 @@
+# Copyright 2013-2022 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.package import *
+
+
+class ChainC(Package):
+ """
+ Part of a collection of mock packages used for testing depth-first vs
+ breadth-first traversal. The DAG they form:
+ a --> b --> c --> d # a chain
+ a --> c # "skip" connection
+ a --> d # "skip" connection
+ Spack's edge order is based on the child package name.
+ In depth-first traversal we get a tree that looks like a chain:
+ a
+ b
+ c
+ d
+ In breadth-first we get the tree:
+ a
+ b
+ c
+ d
+ """
+
+ homepage = "https://example.com"
+ has_code = False
+ version("1.0")
+ depends_on("chain-d")
diff --git a/var/spack/repos/builtin.mock/packages/chain-d/package.py b/var/spack/repos/builtin.mock/packages/chain-d/package.py
new file mode 100644
index 0000000000..f2e04089ee
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/chain-d/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2022 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.package import *
+
+
+class ChainD(Package):
+ """
+ Part of a collection of mock packages used for testing depth-first vs
+ breadth-first traversal. The DAG they form:
+ a --> b --> c --> d # a chain
+ a --> c # "skip" connection
+ a --> d # "skip" connection
+ Spack's edge order is based on the child package name.
+ In depth-first traversal we get a tree that looks like a chain:
+ a
+ b
+ c
+ d
+ In breadth-first we get the tree:
+ a
+ b
+ c
+ d
+ """
+
+ homepage = "https://example.com"
+ has_code = False
+ version("1.0")