From 6e7b2d38c801b52ac129e6913b18e56c448dc0c9 Mon Sep 17 00:00:00 2001 From: "erikkay@chromium.org" <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> Date: Fri, 18 Sep 2009 18:55:36 +0000 Subject: [PATCH] print out the tests that were run into tests_run.txt for easier postprocessing BUG=none TEST=purify layout tests Review URL: http://codereview.chromium.org/206005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26599 0039d316-1c4b-4281-b951-d872f2087c98 --- .../layout_tests/layout_package/test_shell_thread.py | 10 ++++++++++ webkit/tools/layout_tests/run_webkit_tests.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/webkit/tools/layout_tests/layout_package/test_shell_thread.py b/webkit/tools/layout_tests/layout_package/test_shell_thread.py index 13e5d1aedfd38..c6eccdb573ced 100644 --- a/webkit/tools/layout_tests/layout_package/test_shell_thread.py +++ b/webkit/tools/layout_tests/layout_package/test_shell_thread.py @@ -245,9 +245,17 @@ class TestShellThread(threading.Thread): except: logging.info("Ignoring invalid batch size '%s'" % self._options.batch_size) + + # Append tests we're running to the existing tests_run.txt file. + # This is created in run_webkit_tests.py:_PrepareListsAndPrintOutput. + tests_run_filename = os.path.join(self._options.results_directory, + "tests_run.txt") + tests_run_file = open(tests_run_filename, "a") + while True: if self._canceled: logging.info('Testing canceled') + tests_run_file.close() return if len(self._filename_list) is 0: @@ -262,6 +270,7 @@ class TestShellThread(threading.Thread): except Queue.Empty: self._KillTestShell() logging.debug("queue empty, quitting test shell thread") + tests_run_file.close() return self._num_tests_in_current_dir = len(self._filename_list) @@ -277,6 +286,7 @@ class TestShellThread(threading.Thread): failures = self._RunTest(test_info) filename = test_info.filename + tests_run_file.write(filename + "\n") if failures: # Check and kill test shell if we need too. if len([1 for f in failures if f.ShouldKillTestShell()]): diff --git a/webkit/tools/layout_tests/run_webkit_tests.py b/webkit/tools/layout_tests/run_webkit_tests.py index ff1d024e4dc01..67cc753880043 100755 --- a/webkit/tools/layout_tests/run_webkit_tests.py +++ b/webkit/tools/layout_tests/run_webkit_tests.py @@ -280,7 +280,7 @@ class TestRunner: tests_run_filename = os.path.join(self._options.results_directory, "tests_run.txt") tests_run_file = open(tests_run_filename, "w") - tests_run_file.write(tests_run_msg) + tests_run_file.write(tests_run_msg + "\n") tests_run_file.close() # update expectations so that the stats are calculated correctly -- GitLab