Changeset 138294 in webkit
- Timestamp:
- Dec 20, 2012, 1:37:41 PM (12 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r138278 r138294 1 2012-12-20 Nico Weber <thakis@chromium.org> 2 3 chromium nrwt: Pick the newest binary found in DEFAULT_BUILD_DIRECTORIES, not the first 4 https://bugs.webkit.org/show_bug.cgi?id=105498 5 6 Reviewed by Dirk Pranke. 7 8 Use the newest binary available rather than an than always picking one 9 build directory over another based on iteration order. 10 11 * Scripts/webkitpy/layout_tests/port/chromium.py: 12 (ChromiumPort._static_build_path): 13 Check for timestamps. 14 * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py: 15 (ChromiumMacPortTest.test_build_path_timestamps): 16 Test that out / xcodebuild selection happens based on timestamps 17 * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py: 18 (ChromiumWinPortTest.test_build_path_timestamps): 19 Test that out / build selection happens based on timestamps 20 1 21 2012-12-19 Simon Fraser <simon.fraser@apple.com> 2 22 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
r137710 r138294 85 85 return filesystem.join(build_directory, configuration, *comps) 86 86 87 hits = [] 87 88 for directory in cls.DEFAULT_BUILD_DIRECTORIES: 88 89 base_dir = filesystem.join(chromium_base, directory, configuration) 89 if filesystem.exists(base_dir): 90 return filesystem.join(base_dir, *comps) 90 path = filesystem.join(base_dir, *comps) 91 if filesystem.exists(path): 92 hits.append((filesystem.mtime(path), path)) 93 if hits: 94 hits.sort(reverse=True) 95 return hits[0][1] # Return the newest file found. 91 96 92 97 for directory in cls.DEFAULT_BUILD_DIRECTORIES: 93 98 base_dir = filesystem.join(webkit_base, directory, configuration) 94 if filesystem.exists(base_dir): 95 return filesystem.join(base_dir, *comps) 99 path = filesystem.join(base_dir, *comps) 100 if filesystem.exists(path): 101 hits.append((filesystem.mtime(path), path)) 102 103 if hits: 104 hits.sort(reverse=True) 105 return hits[0][1] # Return the newest file found. 96 106 97 107 # We have to default to something, so pick the last one. -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
r136548 r138294 96 96 self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/xcodebuild/Release', '/mock-checkout/Source/WebKit/chromium/out/Release'], '/mock-checkout/Source/WebKit/chromium/xcodebuild/Release') 97 97 98 def test_build_path_timestamps(self): 99 options = MockOptions(configuration='Release', build_directory=None) 100 port = self.make_port(options=options) 101 port.host.filesystem.maybe_make_directory('/mock-checkout/out/Release') 102 port.host.filesystem.maybe_make_directory('/mock-checkout/xcodebuild/Release') 103 # Check with 'out' being newer. 104 port.host.filesystem.mtime = lambda f: 5 if '/out/' in f else 4 105 self.assertEqual(port._build_path(), '/mock-checkout/out/Release') 106 # Check with 'xcodebuild' being newer. 107 port.host.filesystem.mtime = lambda f: 5 if '/xcodebuild/' in f else 4 108 self.assertEqual(port._build_path(), '/mock-checkout/xcodebuild/Release') 109 98 110 def test_driver_name_option(self): 99 111 self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree')) -
trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py
r135912 r138294 115 115 self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/build/Release', '/mock-checkout/Source/WebKit/chromium/out'], '/mock-checkout/Source/WebKit/chromium/build/Release') 116 116 117 def test_build_path_timestamps(self): 118 options = MockOptions(configuration='Release', build_directory=None) 119 port = self.make_port(options=options) 120 port.host.filesystem.maybe_make_directory('/mock-checkout/out/Release') 121 port.host.filesystem.maybe_make_directory('/mock-checkout/build/Release') 122 # Check with 'out' being newer. 123 port.host.filesystem.mtime = lambda f: 5 if '/out/' in f else 4 124 self.assertEqual(port._build_path(), '/mock-checkout/out/Release') 125 # Check with 'build' being newer. 126 port.host.filesystem.mtime = lambda f: 5 if '/build/' in f else 4 127 self.assertEqual(port._build_path(), '/mock-checkout/build/Release') 128 117 129 def test_operating_system(self): 118 130 self.assertEqual('win', self.make_port().operating_system())
Note:
See TracChangeset
for help on using the changeset viewer.