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:
		@@ -11,22 +11,22 @@ def setup_parser(subparser):
 | 
				
			|||||||
    subparser.add_argument(
 | 
					    subparser.add_argument(
 | 
				
			||||||
        'names', nargs='*', help="Names of packages to install")
 | 
					        'names', nargs='*', help="Names of packages to install")
 | 
				
			||||||
    subparser.add_argument(
 | 
					    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(
 | 
					    subparser.add_argument(
 | 
				
			||||||
        '-v', '--verbose', action='store_true', dest='verbose',
 | 
					        '-v', '--verbose', action='store_true', dest='verbose',
 | 
				
			||||||
        help="verbose output")
 | 
					        help="verbose output")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test(parser, args):
 | 
					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):
 | 
					        for name in list_modules(spack.test_path, directories=False):
 | 
				
			||||||
            print "Running Tests: %s" % name
 | 
					            print "Running Tests: %s" % name
 | 
				
			||||||
            spack.test.run(name, verbose=args.verbose)
 | 
					            spack.test.run(name, verbose=args.verbose)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif not args.names:
 | 
					 | 
				
			||||||
        print "Available tests:"
 | 
					 | 
				
			||||||
        colify(list_modules(spack.test_path, directories=False))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        for name in  args.names:
 | 
					        for name in  args.names:
 | 
				
			||||||
            spack.test.run(name, verbose=args.verbose)
 | 
					            spack.test.run(name, verbose=args.verbose)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user