From dde93c01cf349d64acbcfc54d66438abd7566519 Mon Sep 17 00:00:00 2001 From: Peter Scheibel Date: Thu, 2 Nov 2017 10:04:56 -0400 Subject: spec: support a test prefix This is used in tests to test real packages without actually building and installing them. --- lib/spack/spack/spec.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') 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: -- cgit v1.2.3-70-g09d2