THP: Make THP use new Options.site_aliases function

This commit is contained in:
Worros 2010-12-15 12:50:23 +08:00
parent e5b514cb55
commit acf5e4a677

View File

@ -157,6 +157,10 @@ def walk_testfiles(dir, function, importer, errors, site):
else: else:
compare(nfile, importer, errors, site) compare(nfile, importer, errors, site)
def usage():
print "USAGE:"
sys.exit(0)
def main(argv=None): def main(argv=None):
if argv is None: if argv is None:
argv = sys.argv[1:] argv = sys.argv[1:]
@ -166,11 +170,12 @@ def main(argv=None):
test_all_sites = True test_all_sites = True
if options.usage == True: if options.usage == True:
#Print usage examples and exit usage()
print "USAGE:"
sys.exit(0)
if options.sitename: if options.sitename:
options.sitename = Options.site_alias(options.sitename)
if options.sitename == False:
usage()
print "Only regression testing '%s' files" % (options.sitename) print "Only regression testing '%s' files" % (options.sitename)
test_all_sites = False test_all_sites = False