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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py

Issue 2665503003: W3C test importer: Clean up temp repo after abort. (Closed)
Patch Set: Rebased Created 3 years, 11 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 | third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
index 99f71df0fb22be400363a4d0abda902801d353d7..a3b32e69f58828164e5de7aa0139380c91d27de0 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -82,10 +82,15 @@ class TestImporter(object):
for commit in commits:
_log.error(' https://chromium.googlesource.com/chromium/src/+/%s', commit.sha)
_log.error('Aborting import to prevent clobbering these commits.')
+ if not options.keep_w3c_repos_around:
+ self.clean_up_temp_repo(temp_repo_path)
return 1
import_commit = self.update(dest_dir_name, temp_repo_path, options.keep_w3c_repos_around, options.revision)
+ if not options.keep_w3c_repos_around:
+ self.clean_up_temp_repo(temp_repo_path)
+
if options.target == 'wpt':
self._copy_resources()
@@ -159,6 +164,10 @@ class TestImporter(object):
_, chromium_commit = local_wpt.most_recent_chromium_commit()
return exportable_commits_since(chromium_commit.sha, self.host, local_wpt)
+ def clean_up_temp_repo(self, temp_repo_path):
+ _log.info('Deleting temp repo directory %s.', temp_repo_path)
+ self.rmtree(temp_repo_path)
+
def _copy_resources(self):
"""Copies resources from wpt to LayoutTests/resources.
@@ -242,10 +251,6 @@ class TestImporter(object):
self._generate_manifest(dest_path)
- if not keep_w3c_repos_around:
- _log.info('Deleting temp repo directory %s.', temp_repo_path)
- self.rmtree(temp_repo_path)
-
_log.info('Updating TestExpectations for any removed or renamed tests.')
self.update_all_test_expectations_files(self._list_deleted_tests(), self._list_renamed_tests())
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698