summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2017-11-02 10:04:56 -0400
committerscheibelp <scheibel1@llnl.gov>2017-11-02 18:45:40 -0700
commitdde93c01cf349d64acbcfc54d66438abd7566519 (patch)
tree470d03b906c38e340c16f1988f368d88d71de3a2
parentbe01b2d5f0452a7a5f1cbc5e1d58193c899bc0cc (diff)
downloadspack-dde93c01cf349d64acbcfc54d66438abd7566519.tar.gz
spack-dde93c01cf349d64acbcfc54d66438abd7566519.tar.bz2
spack-dde93c01cf349d64acbcfc54d66438abd7566519.tar.xz
spack-dde93c01cf349d64acbcfc54d66438abd7566519.zip
spec: support a test prefix
This is used in tests to test real packages without actually building and installing them.
-rw-r--r--lib/spack/spack/spec.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 0752908a38..a65b5fc60f 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1374,8 +1374,13 @@ class Spec(object):
@property
def prefix(self):
+ if hasattr(self, 'test_prefix'):
+ return Prefix(self.test_prefix)
return Prefix(spack.store.layout.path_for_spec(self))
+ def _set_test_prefix(self, val):
+ self.test_prefix = val
+
def dag_hash(self, length=None):
"""Return a hash of the entire spec DAG, including connectivity."""
if self._hash: