(1) move definition of MockCache to test command (no definitions or extra work is required in MockPackagesTest) (2) removing outdated logic (which originated in this branch) and minor cleanup
This commit is contained in:
parent
dbfa6c925e
commit
13bf7d4ff1
@ -51,6 +51,11 @@ def setup_parser(subparser):
|
||||
help="verbose output")
|
||||
|
||||
|
||||
class MockCache(object):
|
||||
def store(self, copyCmd, relativeDst):
|
||||
pass
|
||||
|
||||
|
||||
def test(parser, args):
|
||||
if args.list:
|
||||
print "Available tests:"
|
||||
@ -67,5 +72,5 @@ def test(parser, args):
|
||||
|
||||
if not os.path.exists(outputDir):
|
||||
mkdirp(outputDir)
|
||||
spack.cache = None
|
||||
spack.cache = MockCache()
|
||||
spack.test.run(args.names, outputDir, args.verbose)
|
||||
|
@ -30,6 +30,7 @@
|
||||
from spack.test.mock_repo import MockGitRepo
|
||||
from spack.version import ver
|
||||
|
||||
|
||||
class GitFetchTest(MockPackagesTest):
|
||||
"""Tests fetching from a dummy git repository."""
|
||||
|
||||
|
@ -34,8 +34,6 @@
|
||||
from spack.repository import RepoPath
|
||||
from spack.spec import Spec
|
||||
|
||||
import llnl.util.tty as tty
|
||||
|
||||
mock_compiler_config = """\
|
||||
compilers:
|
||||
all:
|
||||
@ -127,20 +125,9 @@ def cleanmock(self):
|
||||
pkg.dependencies.update(deps)
|
||||
|
||||
|
||||
def rm_cache(self):
|
||||
shutil.rmtree(spack.cache_path, ignore_errors=True)
|
||||
|
||||
|
||||
def setUp(self):
|
||||
spack.cache = MockCache()
|
||||
self.initmock()
|
||||
|
||||
|
||||
def tearDown(self):
|
||||
spack.cache = None
|
||||
self.cleanmock()
|
||||
|
||||
class MockCache(object):
|
||||
def store(self, copyCmd, relativeDst):
|
||||
tty.warn("Copying " + str(relativeDst))
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user