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

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

Issue 489093002: Enabling archiving of test results by default in run-webkit-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addresssing comments Created 6 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
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b5d4cce27c8d5b33c1ca1a3a9811b38f2f6aa9d0..32863da919ebfa3114639fb3786ab46de4a5585f 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -167,7 +167,7 @@ class Manager(object):
archived_path = self._filesystem.join(self._filesystem.dirname(self._results_directory), archived_name)
self._filesystem.move(self._results_directory, archived_path)
- def _clobber_old_archived_results(self):
+ def _limit_archived_results_count(self):
results_directory_path = self._filesystem.dirname(self._results_directory)
file_list = self._filesystem.listdir(results_directory_path)
results_directories = []
@@ -176,7 +176,7 @@ class Manager(object):
if self._filesystem.isdir(file_path):
results_directories.append(file_path)
results_directories.sort(key=lambda x: self._filesystem.mtime(x))
- self._printer.write_update("Clobbering old archived results in %s" % results_directory_path)
+ self._printer.write_update("Clobbering excess archived results in %s" % results_directory_path)
for dir in results_directories[:-self.ARCHIVED_RESULTS_LIMIT]:
self._filesystem.rmtree(dir)
@@ -202,14 +202,12 @@ class Manager(object):
self._port.stop_helper()
return exit_code
- if self._options.enable_versioned_results and self._filesystem.exists(self._results_directory):
- if self._options.clobber_old_results:
- _log.warning("Flag --enable_versioned_results overrides --clobber-old-results.")
- self._clobber_old_archived_results()
+ if self._options.clobber_old_results:
+ self._clobber_old_results()
+ elif self._filesystem.exists(self._results_directory):
+ self._limit_archived_results_count()
# Rename the existing results folder for archiving.
self._rename_results_folder()
- elif self._options.clobber_old_results:
- self._clobber_old_results()
# Create the output directory if it doesn't already exist.
self._port.host.filesystem.maybe_make_directory(self._results_directory)
@@ -395,19 +393,16 @@ class Manager(object):
writer.write_crash_log(crash_log)
def _clobber_old_results(self):
- # Just clobber the actual test results directories since the other
- # files in the results directory are explicitly used for cross-run
- # tracking.
- self._printer.write_update("Clobbering old results in %s" %
- self._results_directory)
- layout_tests_dir = self._port.layout_tests_dir()
- possible_dirs = self._port.test_dirs()
- for dirname in possible_dirs:
- if self._filesystem.isdir(self._filesystem.join(layout_tests_dir, dirname)):
- self._filesystem.rmtree(self._filesystem.join(self._results_directory, dirname))
-
- # Port specific clean-up.
- self._port.clobber_old_port_specific_results()
Dirk Pranke 2014/08/20 19:05:10 You should probably keep this call as well.
patro 2014/08/20 19:30:14 Done.
+ results_directory_path = self._filesystem.dirname(self._results_directory)
+ file_list = self._filesystem.listdir(results_directory_path)
+ results_directories = []
+ for dir in file_list:
+ file_path = self._filesystem.join(results_directory_path, dir)
+ if self._filesystem.isdir(file_path):
+ results_directories.append(file_path)
+ self._printer.write_update("Clobbering all archived results in %s" % results_directory_path)
+ for dir in results_directories:
+ self._filesystem.rmtree(dir)
Dirk Pranke 2014/08/20 19:05:10 I think this will delete *any* directory that exis
patro 2014/08/20 19:30:14 Assuming that the test results folder name results
def _tests_to_retry(self, run_results):
return [result.test_name for result in run_results.unexpected_results_by_name.values() if result.type != test_expectations.PASS]
« no previous file with comments | « no previous file | Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698