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

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

Issue 2852673003: webkitpy: Remove unnecessary code in test_copier.py (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | 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_copier.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py
index 5fedc8a21ef7ade7f4647ca89fbcda838827d8e7..4cbfd76cbe66e6311f121d0f6a7c13ebed9f0046 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py
@@ -60,7 +60,6 @@ class TestCopier(object):
self.filesystem = self.host.filesystem
self.webkit_finder = WebKitFinder(self.filesystem)
- self._webkit_root = self.webkit_finder.webkit_base()
self.layout_tests_dir = self.webkit_finder.layout_tests_dir()
self.destination_directory = self.filesystem.normpath(
self.filesystem.join(
@@ -168,12 +167,8 @@ class TestCopier(object):
if not self.filesystem.exists(dest_dir):
self.filesystem.maybe_make_directory(dest_dir)
- copied_files = []
-
for file_to_copy in dir_to_copy['copy_list']:
- copied_file = self.copy_file(file_to_copy, dest_dir)
- if copied_file:
- copied_files.append(copied_file)
+ self.copy_file(file_to_copy, dest_dir)
_log.info('')
_log.info('Import complete')
@@ -195,20 +190,17 @@ class TestCopier(object):
"destination": File name of the destination file.
And possibly also the keys "reference_support_info" or "is_jstest".
dest_dir: Path to the directory where the file should be copied.
-
- Returns:
- The path to the new file, relative to the Blink root (//third_party/WebKit).
"""
source_path = self.filesystem.normpath(file_to_copy['src'])
dest_path = self.filesystem.join(dest_dir, file_to_copy['dest'])
if self.filesystem.isdir(source_path):
_log.error('%s refers to a directory', source_path)
- return None
+ return
if not self.filesystem.exists(source_path):
_log.error('%s not found. Possible error in the test.', source_path)
- return None
+ return
if not self.filesystem.exists(self.filesystem.dirname(dest_path)):
if not self.import_in_place:
@@ -224,5 +216,3 @@ class TestCopier(object):
self.filesystem.copyfile(source_path, dest_path)
if self.filesystem.read_binary_file(source_path)[:2] == '#!':
self.filesystem.make_executable(dest_path)
-
- return dest_path.replace(self._webkit_root, '')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698