testing: Add reverse option to test runner.

This commit is contained in:
Umair Khan 2017-03-22 15:57:07 +05:00 committed by Tim Abbott
parent 3c0f341eb7
commit 0fc946aef4
1 changed files with 6 additions and 1 deletions

View File

@ -167,6 +167,10 @@ if __name__ == "__main__":
action="store_true",
default=False,
help="Show which tests are slowest.")
parser.add_option('--reverse', dest='reverse',
action="store_true",
default=False,
help="Run tests in reverse order.")
(options, args) = parser.parse_args()
@ -267,7 +271,8 @@ if __name__ == "__main__":
print("-- Running tests in serial mode.")
test_runner = TestRunner(failfast=options.fatal_errors, verbosity=2,
parallel=parallel, keepdb=True)
parallel=parallel, reverse=options.reverse,
keepdb=True)
failures = test_runner.run_tests(suites, full_suite=full_suite)
templates_not_rendered = test_runner.get_shallow_tested_templates()