Better error message for invalid argument to --category - silenced the printout of the raw args when not in verbose mode

llvm-svn: 166514
This commit is contained in:
Enrico Granata 2012-10-23 22:52:49 +00:00
parent 3f7d548a16
commit 6c61cbbc49
1 changed files with 7 additions and 2 deletions

View File

@ -409,6 +409,9 @@ def parseOptionsAndInitTestdirs():
platform_system = platform.system()
platform_machine = platform.machine()
# only print the args if being verbose
if args.v:
print args
if args.h:
@ -425,7 +428,9 @@ def parseOptionsAndInitTestdirs():
if args.categoriesList:
for category in args.categoriesList:
if not(category in validCategories):
print "fatal error: category '" + category + "' is not a valid category - edit dotest.py or correct your invocation"
print "fatal error: category '" + category + "' is not a valid category"
print "if you have added a new category, please edit dotest.py, adding your new category to validCategories"
print "else, please specify one or more of the following: " + str(validCategories.keys())
sys.exit(1)
categoriesList = set(args.categoriesList)
useCategories = True