X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Frun_tests.py;h=d72a74c2ee46cec1ead9ced69a35b7e46e0df814;hb=068ec3809c3f99ae59008fb14fcf45b08480e7d8;hp=c42c6a820dc1357191d7bffeb7ca0f57e0c25477;hpb=40dd73bcfa7625773e1e0cc049134f9d7107bccc;p=vpp.git diff --git a/test/run_tests.py b/test/run_tests.py index c42c6a820dc..d72a74c2ee4 100644 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -120,12 +120,13 @@ def test_runner_wrapper(suite, keep_alive_pipe, stdouterr_queue, finished_pipe, result_pipe, logger): sys.stdout = stdouterr_queue sys.stderr = stdouterr_queue - VppTestCase.logger = logger + VppTestCase.parallel_handler = logger.handlers[0] result = VppTestRunner(keep_alive_pipe=keep_alive_pipe, descriptions=descriptions, verbosity=verbose, result_pipe=result_pipe, - failfast=failfast).run(suite) + failfast=failfast, + print_summary=False).run(suite) finished_pipe.send(result.wasSuccessful()) finished_pipe.close() keep_alive_pipe.close() @@ -234,12 +235,9 @@ def handle_failed_suite(logger, last_test_temp_dir, vpp_pid): failed_dir = os.getenv('VPP_TEST_FAILED_DIR') link_path = '%s%s-FAILED' % (failed_dir, lttd) if not os.path.exists(link_path): - logger.error("Creating a link to the failed test: %s -> %s" % - (link_path, lttd)) os.symlink(last_test_temp_dir, link_path) - else: - logger.error("Link to the failed test already exists: %s -> %s" % - (link_path, lttd)) + logger.error("Symlink to failed testcase directory: %s -> %s" + % (link_path, lttd)) # Report core existence core_path = get_core_path(last_test_temp_dir) @@ -575,10 +573,7 @@ class AllResults(dict): retval = 1 if retval != 0: - if concurrent_tests == 1: - self.rerun.append(result.suite_from_failed()) - else: - self.rerun.append(result.testcase_suite) + self.rerun.append(result.testcase_suite) return retval @@ -767,13 +762,6 @@ if __name__ == '__main__': tests_amount += testcase_suite.countTestCases() suites.append(testcase_suite) - if concurrent_tests == 1: - new_suite = unittest.TestSuite() - for suite in suites: - new_suite.addTests(suite) - - suites = [new_suite] - print("%s out of %s tests match specified filters" % ( tests_amount, tests_amount + cb.filtered.countTestCases())) @@ -786,8 +774,9 @@ if __name__ == '__main__': if run_interactive: # don't fork if requiring interactive terminal - result = VppTestRunner(verbosity=verbose, failfast=failfast)\ - .run(suites[0]) + result = VppTestRunner(verbosity=verbose, + failfast=failfast, + print_summary=True).run(suites[0]) was_successful = result.wasSuccessful() if not was_successful: for test_case_info in result.failed_test_cases_info: