diff options
author | Peter Scheibel <scheibel1@llnl.gov> | 2016-03-22 19:37:47 -0700 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2016-03-22 19:37:47 -0700 |
commit | cb9fba98d8d0c389f3295d5d30cdb650e6ea79b7 (patch) | |
tree | 562085e2449d3089ebc4002b5fd2c8f1b4b348ae /lib | |
parent | 75460d8586bf62dcedaf4eb5acdb2de75f1d662a (diff) | |
download | spack-cb9fba98d8d0c389f3295d5d30cdb650e6ea79b7.tar.gz spack-cb9fba98d8d0c389f3295d5d30cdb650e6ea79b7.tar.bz2 spack-cb9fba98d8d0c389f3295d5d30cdb650e6ea79b7.tar.xz spack-cb9fba98d8d0c389f3295d5d30cdb650e6ea79b7.zip |
(1) relocate cache for tests (2) initial approach for restoring unit tests (just for git tests although the same concept applies to the other unit tests which are failing - namely those for svn and hg)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/cmd/test.py | 4 | ||||
-rw-r--r-- | lib/spack/spack/test/git_fetch.py | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index ddc6cb4fce..9a85c7d270 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -23,6 +23,7 @@ # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## import os +import shutil from pprint import pprint from llnl.util.filesystem import join_path, mkdirp @@ -66,4 +67,7 @@ def test(parser, args): if not os.path.exists(outputDir): mkdirp(outputDir) + spack.cache_path = join_path(spack.var_path, "test-cache") + mkdirp(spack.cache_path) spack.test.run(args.names, outputDir, args.verbose) + shutil.rmtree(spack.cache_path) diff --git a/lib/spack/spack/test/git_fetch.py b/lib/spack/spack/test/git_fetch.py index 3578044116..76814f089a 100644 --- a/lib/spack/spack/test/git_fetch.py +++ b/lib/spack/spack/test/git_fetch.py @@ -30,6 +30,8 @@ from spack.test.mock_packages_test import * from spack.test.mock_repo import MockGitRepo from spack.version import ver +import shutil +import os class GitFetchTest(MockPackagesTest): """Tests fetching from a dummy git repository.""" @@ -49,6 +51,8 @@ class GitFetchTest(MockPackagesTest): """Destroy the stage space used by this test.""" super(GitFetchTest, self).tearDown() self.repo.destroy() + for d in os.listdir(spack.cache_path): + shutil.rmtree(os.path.join(spack.cache_path, d)) def assert_rev(self, rev): """Check that the current git revision is equal to the supplied rev.""" |