diff --git a/lib/spack/spack/cmd/test.py b/lib/spack/spack/cmd/test.py index 80eeff34ac..c9752fbbac 100644 --- a/lib/spack/spack/cmd/test.py +++ b/lib/spack/spack/cmd/test.py @@ -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)