summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2015-10-15 10:17:08 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2015-10-15 10:17:08 -0700
commit0d66362cee9849db77a9f3297aa697f21fe1acdd (patch)
tree5a05337b559d7da826137c59d8ec60b771e3049d
parent71dcf8833c263a2f87b8bfcce6f2eaf7a14014a3 (diff)
downloadspack-0d66362cee9849db77a9f3297aa697f21fe1acdd.tar.gz
spack-0d66362cee9849db77a9f3297aa697f21fe1acdd.tar.bz2
spack-0d66362cee9849db77a9f3297aa697f21fe1acdd.tar.xz
spack-0d66362cee9849db77a9f3297aa697f21fe1acdd.zip
Only install 1 top-level package with testinstall. Otherwise if multiple
packages are specified and a prior one fails, it will prevent any of the others from succeeding (and generating test output) even if they don't share dependencies.
-rw-r--r--lib/spack/spack/cmd/testinstall.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/lib/spack/spack/cmd/testinstall.py b/lib/spack/spack/cmd/testinstall.py
index 6f3514bc34..5e5288bfbd 100644
--- a/lib/spack/spack/cmd/testinstall.py
+++ b/lib/spack/spack/cmd/testinstall.py
@@ -68,7 +68,7 @@ def setup_parser(subparser):
'output', help="test output goes in this file")
subparser.add_argument(
- 'packages', nargs=argparse.REMAINDER, help="specs of packages to install")
+ 'package', help="spec of package to install")
class JunitResultFormat(object):
@@ -133,8 +133,8 @@ def createTestOutput(spec, handled, output):
def testinstall(parser, args):
- if not args.packages:
- tty.die("install requires at least one package argument")
+ if not args.package:
+ tty.die("install requires a package argument")
if args.jobs is not None:
if args.jobs <= 0:
@@ -143,7 +143,8 @@ def testinstall(parser, args):
if args.no_checksum:
spack.do_checksum = False # TODO: remove this global.
- specs = spack.cmd.parse_specs(args.packages, concretize=True)
+ #TODO: should a single argument be wrapped in a list?
+ specs = spack.cmd.parse_specs(args.package, concretize=True)
newInstalls = set()
for spec in itertools.chain.from_iterable(spec.traverse()
for spec in specs):
@@ -162,12 +163,7 @@ def testinstall(parser, args):
make_jobs=args.jobs,
verbose=args.verbose,
fake=False)
- finally:
- #TODO: note if multiple packages are specified and a prior one fails,
- # it will prevent any of the others from succeeding even if they
- # don't share any dependencies. i.e. the results may be strange if
- # you run testinstall with >1 top-level package
-
+ finally:
#Find all packages that are not a dependency of another package
topLevelNewInstalls = newInstalls - set(itertools.chain.from_iterable(
spec.dependencies for spec in newInstalls))