summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2019-12-02 01:01:11 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2019-12-18 21:10:31 -0800
commit531f370e0d3256202e1eb40dce669e8ae2ebb15a (patch)
tree160cf29072d9da92792fbf3ca0499f33908f7d56 /var
parent81b147cc0af9205061b4197b682b3058ce185c08 (diff)
downloadspack-531f370e0d3256202e1eb40dce669e8ae2ebb15a.tar.gz
spack-531f370e0d3256202e1eb40dce669e8ae2ebb15a.tar.bz2
spack-531f370e0d3256202e1eb40dce669e8ae2ebb15a.tar.xz
spack-531f370e0d3256202e1eb40dce669e8ae2ebb15a.zip
possible_dependencies() now reports missing dependencies
- Add an optional argument so that `possible_dependencies()` will report missing dependencies. - Add a test to ensure it works. - Ignore missing dependencies in `possible_dependencies()` by default.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/missing-dependency/package.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/missing-dependency/package.py b/var/spack/repos/builtin.mock/packages/missing-dependency/package.py
new file mode 100644
index 0000000000..e40e1b2a8b
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/missing-dependency/package.py
@@ -0,0 +1,21 @@
+# Copyright 2013-2019 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 MissingDependency(Package):
+ """Package with a dependency that does not exist."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/missing-dependency-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ # intentionally missing to test possible_dependencies()
+ depends_on("this-is-a-missing-dependency")
+
+ # this one is a "real" mock dependency
+ depends_on("a")