Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

Issue 23496003: User interruption should still create results.html for run-webkit-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rework-patchset3 Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
index 5fef70088e0fe95f1629917a32412f5e1d4b2f50..3e9b7bfd12de83378a4a2730074ec6d7fa3cf6d1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -38,6 +38,7 @@ import datetime
import json
import logging
import random
+import signal
import sys
import time
@@ -51,6 +52,9 @@ from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models import test_run_results
from webkitpy.layout_tests.models.test_input import TestInput
+# This mirrors what the shell normally does.
+INTERRUPTED_EXIT_STATUS = signal.SIGINT + 128
+
_log = logging.getLogger(__name__)
# Builder base URL where we have the archived test results.
@@ -249,10 +253,12 @@ class Manager(object):
results_path = self._filesystem.join(self._results_directory, "results.html")
self._copy_results_html_file(results_path)
- if self._options.show_results and (exit_code or (self._options.full_results_html and initial_results.total_failures)):
- self._port.show_results_html_file(results_path)
-
- self._printer.print_results(time.time() - start_time, initial_results, summarized_failing_results)
+ if initial_results.interrupted:
+ exit_code = INTERRUPTED_EXIT_STATUS
+ else:
+ if self._options.show_results and (exit_code or (self._options.full_results_html and initial_results.total_failures)):
+ self._port.show_results_html_file(results_path)
+ self._printer.print_results(time.time() - start_time, initial_results, summarized_failing_results)
Dirk Pranke 2013/09/03 20:55:27 I see that you've changed this so that printer.pri
return test_run_results.RunDetails(exit_code, summarized_full_results, summarized_failing_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, num_workers, retrying):

Powered by Google App Engine
This is Rietveld 408576698