From ef39108f08351d7ce05a47379154178926259e97 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 27 Feb 2021 16:54:22 -0500 Subject: [PATCH] Add an option to the test runner to disable batching of tests --- run_wml_tests | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run_wml_tests b/run_wml_tests index bc4b626eacc..a0312d3b672 100755 --- a/run_wml_tests +++ b/run_wml_tests @@ -200,6 +200,8 @@ if __name__ == '__main__': help="New timer value to use, instead of 10s as default. The value 0 means no timer, and also skips tests that expect timeout.") ap.add_argument("-bt", "--batch-timeout", type=int, default=300, help="New timer value to use for batched tests, instead of 300s as default.") + ap.add_argument("-bd", "--batch-disable", action="store_true", + help="Disable test batching, may be useful if debugging a small subset of tests.") ap.add_argument("-s", "--no-strict", dest="strict_mode", action="store_false", help="Disable strict mode. By default, we run wesnoth with the option --log-strict=warning to ensure errors result in a failed test.") ap.add_argument("-d", "--debug_bin", action="store_true", @@ -234,7 +236,7 @@ if __name__ == '__main__': runner = WesnothRunner(options) a_test_failed = False - for batch in test_batcher(test_list): + for batch in [test_list] if options.batch_disable else test_batcher(test_list): try: runner.run_tests(batch) except UnexpectedTestStatusException: