summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-06-27 01:07:52 -0700
committerGitHub <noreply@github.com>2016-06-27 01:07:52 -0700
commitd89905907577baf09bee5403fb4075415bd862d9 (patch)
tree1db254a03acf058aa86b8f792034eaa25b71c425
parent3bc4a38b78549cf93b128c0bd7a489487361743b (diff)
parentb4c36164b520bd962fbfefa4a363ac56de87b881 (diff)
downloadspack-d89905907577baf09bee5403fb4075415bd862d9.tar.gz
spack-d89905907577baf09bee5403fb4075415bd862d9.tar.bz2
spack-d89905907577baf09bee5403fb4075415bd862d9.tar.xz
spack-d89905907577baf09bee5403fb4075415bd862d9.zip
Merge pull request #1120 from LLNL/bugfix/mockdb-pollution
Fixes #760: spack test leaves builtin.mock packages in DB
-rw-r--r--lib/spack/spack/directory_layout.py2
-rw-r--r--lib/spack/spack/test/install.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/spack/spack/directory_layout.py b/lib/spack/spack/directory_layout.py
index 7e20365b0f..ee13e2dcbc 100644
--- a/lib/spack/spack/directory_layout.py
+++ b/lib/spack/spack/directory_layout.py
@@ -165,7 +165,7 @@ class DirectoryLayout(object):
class YamlDirectoryLayout(DirectoryLayout):
"""Lays out installation directories like this::
<install root>/
- <target>/
+ <platform-os-target>/
<compiler>-<compiler version>/
<name>-<version>-<variants>-<hash>
diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py
index cfe6ea9b27..390ec096a9 100644
--- a/lib/spack/spack/test/install.py
+++ b/lib/spack/spack/test/install.py
@@ -28,6 +28,7 @@ import tempfile
import spack
from llnl.util.filesystem import *
from spack.directory_layout import YamlDirectoryLayout
+from spack.database import Database
from spack.fetch_strategy import URLFetchStrategy, FetchStrategyComposite
from spack.test.mock_packages_test import *
from spack.test.mock_repo import MockArchive
@@ -49,7 +50,10 @@ class InstallTest(MockPackagesTest):
# installed pkgs and mock packages.
self.tmpdir = tempfile.mkdtemp()
self.orig_layout = spack.install_layout
+ self.orig_db = spack.installed_db
+
spack.install_layout = YamlDirectoryLayout(self.tmpdir)
+ spack.installed_db = Database(self.tmpdir)
def tearDown(self):
@@ -61,6 +65,7 @@ class InstallTest(MockPackagesTest):
# restore spack's layout.
spack.install_layout = self.orig_layout
+ spack.installed_db = self.orig_db
shutil.rmtree(self.tmpdir, ignore_errors=True)
@@ -71,7 +76,7 @@ class InstallTest(MockPackagesTest):
pkg.fetcher = fetcher
- def ztest_install_and_uninstall(self):
+ def test_install_and_uninstall(self):
# Get a basic concrete spec for the trivial install package.
spec = Spec('trivial_install_test_package')
spec.concretize()