зеркало из https://github.com/mozilla/pjs.git
bug 673121 : Make manifestparser tests output something. r=ted
This commit is contained in:
Родитель
d2f8f77458
Коммит
62ccfd93cd
|
@ -86,7 +86,11 @@ def main(args=sys.argv[1:]):
|
||||||
parser.add_option('--report-first', dest='report_first',
|
parser.add_option('--report-first', dest='report_first',
|
||||||
default=False, action='store_true',
|
default=False, action='store_true',
|
||||||
help="report the first error only (all tests will still run)")
|
help="report the first error only (all tests will still run)")
|
||||||
|
parser.add_option('-q', '--quiet', dest='quiet',
|
||||||
|
default=False, action='store_true',
|
||||||
|
help="minimize output")
|
||||||
options, args = parser.parse_args(args)
|
options, args = parser.parse_args(args)
|
||||||
|
quiet = options.__dict__.pop('quiet')
|
||||||
|
|
||||||
# run the tests
|
# run the tests
|
||||||
results = run_tests(**options.__dict__)
|
results = run_tests(**options.__dict__)
|
||||||
|
@ -99,6 +103,12 @@ def main(args=sys.argv[1:]):
|
||||||
break
|
break
|
||||||
if failed:
|
if failed:
|
||||||
sys.exit(1) # error
|
sys.exit(1) # error
|
||||||
|
if not quiet:
|
||||||
|
# print results
|
||||||
|
print "manifestparser.py: All tests pass!"
|
||||||
|
for test in sorted(results.keys()):
|
||||||
|
result = results[test]
|
||||||
|
print "%s: failed=%s, attempted=%s" % (test, result[0], result[1])
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче