diff --git a/DEPS b/DEPS index 8278290..95a68bb 100644 --- a/DEPS +++ b/DEPS
@@ -40,11 +40,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '22af73f2a5fd40fd9f991e35f7a216e924464cd4', + 'skia_revision': '6d11ed2951fadc281433606a8edc6774bed39735', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '007511a499ad81200ac4104bdcc4e12c6135c223', + 'v8_revision': '7b791b34e6cc81922152556d6c3d302c5e95a931', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other.
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 cb0c797..61d064148 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier.py
@@ -55,7 +55,12 @@ """Initializes variables to prepare for copying and converting files. Args: - source_repo_path: Path to the local checkout of a WPT + host: An instance of Host. + source_repo_path: Path to the local checkout of a + web-platform-tests or csswg-test repository. + dest_dir_name: The name of the directory under the layout tests + directory where imported tests should be copied to. + TODO(qyearsley): This can be made into a constant. """ self.host = host @@ -96,7 +101,7 @@ for root, dirs, files in self.filesystem.walk(self.source_repo_path): cur_dir = root.replace(self.dir_above_repo + '/', '') + '/' - _log.debug(' scanning ' + cur_dir + '...') + _log.debug('Scanning %s...', cur_dir) total_tests = 0 reftests = 0 jstests = 0 @@ -119,12 +124,10 @@ path_base = path_base.replace(cur_dir, '') path_full = self.filesystem.join(root, path_base) if path_base in dirs: + _log.info('Skipping: %s', path_full) dirs.remove(path_base) if self.import_in_place: - _log.debug(' pruning %s', path_base) self.filesystem.rmtree(path_full) - else: - _log.debug(' skipping %s', path_base) copy_list = [] @@ -134,7 +137,7 @@ path_base = self.destination_directory.replace(self.layout_tests_dir + '/', '') + '/' + path_base if path_base in paths_to_skip: if self.import_in_place: - _log.debug(' pruning %s', path_base) + _log.debug('Pruning: %s', path_base) self.filesystem.remove(path_full) continue else: @@ -142,11 +145,17 @@ # FIXME: This block should really be a separate function, but the early-continues make that difficult. if filename.startswith('.') or filename.endswith('.pl'): - # The w3cs repos may contain perl scripts, which we don't care about. + _log.info('Skipping: %s', path_full) + _log.info(' Reason: Hidden files and perl scripts are not necessary.') continue if filename == 'OWNERS' or filename == 'reftest.list': - # These files fail our presubmits. # See http://crbug.com/584660 and http://crbug.com/582838. + _log.info('Skipping: %s', path_full) + _log.info(' Reason: This file may cause Chromium presubmit to fail.') + continue + if self.path_too_long(path_full): + _log.warning('Skipping: %s', path_full) + _log.warning(' Reason: Long path. Max length %d; see http://crbug.com/609871.', MAX_PATH_LENGTH) continue mimetype = mimetypes.guess_type(path_full) @@ -166,12 +175,6 @@ copy_list.append({'src': path_full, 'dest': filename}) continue - if self.path_too_long(path_full): - _log.warning('%s skipped due to long path. ' - 'Max length from repo base %d chars; see http://crbug.com/609871.', - path_full, MAX_PATH_LENGTH) - continue - if 'reference' in test_info.keys(): test_basename = self.filesystem.basename(test_info['test']) # Add the ref file, following WebKit style. @@ -186,14 +189,14 @@ ref_file += self.filesystem.splitext(test_info['reference'])[1] if not self.filesystem.exists(test_info['reference']): - _log.warning('%s skipped because ref file %s was not found.', - path_full, ref_file) + _log.warning('Skipping: %s', path_full) + _log.warning(' Reason: Ref file "%s" was not found.', ref_file) continue if self.path_too_long(path_full.replace(filename, ref_file)): - _log.warning('%s skipped because path of ref file %s would be too long. ' - 'Max length from repo base %d chars; see http://crbug.com/609871.', - path_full, ref_file, MAX_PATH_LENGTH) + _log.warning('Skipping: %s', path_full) + _log.warning(' Reason: Ref file path length would be too long: %s.', ref_file) + _log.warning(' Max length %d; see http://crbug.com/609871.', MAX_PATH_LENGTH) continue reftests += 1
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py index 265f131..8b47d958 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_copier_unittest.py
@@ -25,12 +25,11 @@ # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -import unittest - from webkitpy.common.host_mock import MockHost from webkitpy.common.system.executive_mock import MockExecutive, ScriptError from webkitpy.common.system.filesystem_mock import MockFileSystem from webkitpy.w3c.test_copier import TestCopier +from webkitpy.common.system.log_testing import LoggingTestCase FAKE_SOURCE_REPO_DIR = '/blink' @@ -41,14 +40,12 @@ '/blink/w3c/dir/README.txt': '', '/blink/w3c/dir/OWNERS': '', '/blink/w3c/dir/reftest.list': '', - '/blink/w3c/dir1/OWNERS': '', - '/blink/w3c/dir1/reftest.list': '', '/mock-checkout/third_party/WebKit/LayoutTests/external/README.txt': '', '/mock-checkout/third_party/WebKit/LayoutTests/W3CImportExpectations': '', } -class TestCopierTest(unittest.TestCase): +class TestCopierTest(LoggingTestCase): def test_import_dir_with_no_tests(self): host = MockHost() @@ -57,18 +54,6 @@ copier = TestCopier(host, FAKE_SOURCE_REPO_DIR, 'destination') copier.do_import() # No exception raised. - def test_path_too_long_true(self): - host = MockHost() - host.filesystem = MockFileSystem(files=FAKE_FILES) - copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) - self.assertTrue(copier.path_too_long(FAKE_SOURCE_REPO_DIR + '/' + ('x' * 150) + '.html')) - - def test_path_too_long_false(self): - host = MockHost() - host.filesystem = MockFileSystem(files=FAKE_FILES) - copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) - self.assertFalse(copier.path_too_long(FAKE_SOURCE_REPO_DIR + '/x.html')) - def test_does_not_import_owner_files(self): host = MockHost() host.filesystem = MockFileSystem(files=FAKE_FILES) @@ -152,6 +137,28 @@ copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) copier.find_importable_tests() self.assertEqual(copier.import_list, []) + self.assertLog([ + 'WARNING: Skipping: /blink/w3c/dir1/my-ref-test.html\n', + 'WARNING: Reason: Ref file "my-ref-test-expected.html" was not found.\n' + ]) + + def test_files_with_long_path_are_skipped(self): + host = MockHost() + host.filesystem = MockFileSystem(files=FAKE_FILES) + long_file_path = '%s/%s.html' % (FAKE_SOURCE_REPO_DIR, 'x' * 150) + short_file_path = '%s/x.html' % FAKE_SOURCE_REPO_DIR + host.filesystem.write_text_file(long_file_path, '<html></html>') + host.filesystem.write_text_file(short_file_path, '<html></html>') + copier = TestCopier(host, FAKE_SOURCE_REPO_DIR) + copier.find_importable_tests() + self.assertLog([ + 'WARNING: Skipping: %s\n' % long_file_path, + 'WARNING: Reason: Long path. Max length 140; see http://crbug.com/609871.\n', + 'INFO: Skipping: /blink/w3c/dir/reftest.list\n', + 'INFO: Reason: This file may cause Chromium presubmit to fail.\n', + 'INFO: Skipping: /blink/w3c/dir/OWNERS\n', + 'INFO: Reason: This file may cause Chromium presubmit to fail.\n', + ]) def test_should_try_to_convert_positive_cases(self): self.assertTrue(TestCopier.should_try_to_convert({}, 'foo.css', 'LayoutTests/external/csswg-test/x'))