spec: support a test prefix

This is used in tests to test real packages without actually building
and installing them.
This commit is contained in:
Peter Scheibel 2017-11-02 10:04:56 -04:00 committed by scheibelp
parent be01b2d5f0
commit dde93c01cf

View file

@ -1374,8 +1374,13 @@ def cshort_spec(self):
@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: