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 @@ def remove_install_directory(self, spec): class YamlDirectoryLayout(DirectoryLayout): """Lays out installation directories like this:: / - / + / -/ --- 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 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 @@ def setUp(self): # 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 @@ def tearDown(self): # 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 @@ def fake_fetchify(self, pkg): 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()