spack test runs all tests by default

'spack test -a' formerly ran all test and 'spack test' listed available tests.
Now, 'spack test' runs all tests and 'spack test -l' lists available ones.
This commit is contained in:
Todd Gamblin 2013-10-17 14:53:40 -07:00
parent 558cf7e406
commit 481a617d65

View file

@ -11,22 +11,22 @@ def setup_parser(subparser):
subparser.add_argument(
'names', nargs='*', help="Names of packages to install")
subparser.add_argument(
'-a', '--all', action='store_true', dest='all', help="Run all tests")
'-l', '--list', action='store_true', dest='list', help="Show available tests")
subparser.add_argument(
'-v', '--verbose', action='store_true', dest='verbose',
help="verbose output")
def test(parser, args):
if args.all:
if args.list:
print "Available tests:"
colify(list_modules(spack.test_path, directories=False))
elif not args.names:
for name in list_modules(spack.test_path, directories=False):
print "Running Tests: %s" % name
spack.test.run(name, verbose=args.verbose)
elif not args.names:
print "Available tests:"
colify(list_modules(spack.test_path, directories=False))
else:
for name in args.names:
spack.test.run(name, verbose=args.verbose)