Changeset 221087 in webkit
- Timestamp:
- Aug 23, 2017 11:09:06 AM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r221079 r221087 1 2017-08-23 Jonathan Bedard <jbedard@apple.com> 2 3 Access expectations path through apple_additions 4 https://bugs.webkit.org/show_bug.cgi?id=174800 5 <rdar://problem/33498899> 6 7 Reviewed by David Kilzer. 8 9 Follow-up fix. Mapping of operating system names was done incorrectly. 10 11 * Scripts/webkitpy/port/ios.py: 12 (IOSPort._apple_additions_path): Correctly find the operating system to be replaced. 13 * Scripts/webkitpy/port/ios_device_unittest.py: 14 (IOSDeviceTest.test_layout_test_searchpath_with_apple_additions): Add test for operating 15 system name replacement. 16 * Scripts/webkitpy/port/ios_simulator_unittest.py: 17 (IOSSimulatorTest.test_layout_test_searchpath_with_apple_additions): Add test for operating 18 system name replacement. 19 * Scripts/webkitpy/port/mac.py: Correctly find the operating system to be replaced. 20 (MacPort._apple_additions_path): 21 * Scripts/webkitpy/port/mac_unittest.py: 22 (MacTest.test_layout_test_searchpath_with_apple_additions): Add test for operating system 23 name replacement. 24 * Scripts/webkitpy/port/port_testcase.py: 25 (bind_mock_apple_additions.MockAppleAdditions.ios_os_name): Change the passed name so that 26 operating system name replacement can be tested. 27 (bind_mock_apple_additions.MockAppleAdditions.mac_os_name): Ditto. 28 1 29 2017-08-23 Jonathan Bedard <jbedard@apple.com> 2 30 -
trunk/Tools/Scripts/webkitpy/port/ios.py
r221079 r221087 92 92 return None 93 93 split_name = name.split('-') 94 if len(split_name) > 1 and split_name[1] != 'wk1' and split_name[1] != 'wk2' and split_name[1] != 'simulator' and split_name[1] != 'device': 95 os_name = apple_additions().ios_os_name(split_name[1]) 94 os_index = -1 95 for i in xrange(2): 96 if split_name[os_index] == 'wk1' or split_name[os_index] == 'wk2' or split_name[os_index] == 'simulator' or split_name[os_index] == 'device': 97 os_index -= 1 98 if split_name[os_index] != split_name[0]: 99 os_name = apple_additions().mac_os_name(split_name[os_index]) 96 100 if not os_name: 97 101 return None 98 name = split_name[0] + '-' + os_name + ('-' + '-'.join(split_name[2:]) if len(split_name) > 2 else '') 102 split_name[os_index] = os_name 103 name = '-'.join(split_name) 99 104 return self._filesystem.join(apple_additions().layout_tests_path(), name) 100 105 -
trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py
r221079 r221087 94 94 with port_testcase.bind_mock_apple_additions(): 95 95 search_path = self.make_port().default_baseline_search_path() 96 self.assertEqual(search_path[0], '/additional_testing_path/ios-device- 11-wk1')96 self.assertEqual(search_path[0], '/additional_testing_path/ios-device-add-11-wk1') 97 97 self.assertEqual(search_path[1], '/mock-checkout/LayoutTests/platform/ios-device-11-wk1') 98 self.assertEqual(search_path[2], '/additional_testing_path/ios-device- 11')98 self.assertEqual(search_path[2], '/additional_testing_path/ios-device-add-11') 99 99 self.assertEqual(search_path[3], '/mock-checkout/LayoutTests/platform/ios-device-11') 100 100 self.assertEqual(search_path[4], '/additional_testing_path/ios-device-wk1') … … 102 102 self.assertEqual(search_path[6], '/additional_testing_path/ios-device') 103 103 self.assertEqual(search_path[7], '/mock-checkout/LayoutTests/platform/ios-device') 104 self.assertEqual(search_path[8], '/additional_testing_path/ios- 11')104 self.assertEqual(search_path[8], '/additional_testing_path/ios-add-11') 105 105 self.assertEqual(search_path[9], '/mock-checkout/LayoutTests/platform/ios-11') 106 106 self.assertEqual(search_path[10], '/additional_testing_path/ios-wk1') -
trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py
r221079 r221087 93 93 with port_testcase.bind_mock_apple_additions(): 94 94 search_path = self.make_port().default_baseline_search_path() 95 self.assertEqual(search_path[0], '/additional_testing_path/ios-simulator- 8-wk1')95 self.assertEqual(search_path[0], '/additional_testing_path/ios-simulator-add-8-wk1') 96 96 self.assertEqual(search_path[1], '/mock-checkout/LayoutTests/platform/ios-simulator-8-wk1') 97 self.assertEqual(search_path[2], '/additional_testing_path/ios-simulator- 8')97 self.assertEqual(search_path[2], '/additional_testing_path/ios-simulator-add-8') 98 98 self.assertEqual(search_path[3], '/mock-checkout/LayoutTests/platform/ios-simulator-8') 99 99 self.assertEqual(search_path[4], '/additional_testing_path/ios-simulator-wk1') … … 101 101 self.assertEqual(search_path[6], '/additional_testing_path/ios-simulator') 102 102 self.assertEqual(search_path[7], '/mock-checkout/LayoutTests/platform/ios-simulator') 103 self.assertEqual(search_path[8], '/additional_testing_path/ios- 8')103 self.assertEqual(search_path[8], '/additional_testing_path/ios-add-8') 104 104 self.assertEqual(search_path[9], '/mock-checkout/LayoutTests/platform/ios-8') 105 105 self.assertEqual(search_path[10], '/additional_testing_path/ios-wk1') -
trunk/Tools/Scripts/webkitpy/port/mac.py
r221079 r221087 62 62 return None 63 63 split_name = name.split('-') 64 if len(split_name) > 1 and split_name[1] != 'wk1' and split_name[1] != 'wk2': 65 os_name = apple_additions().mac_os_name(split_name[1]) 64 os_index = -1 65 if split_name[-1] == 'wk1' or split_name[-1] == 'wk2': 66 os_index = -2 67 if split_name[os_index] != split_name[0]: 68 os_name = apple_additions().mac_os_name(split_name[os_index]) 66 69 if not os_name: 67 70 return None 68 name = split_name[0] + '-' + os_name + ('-' + '-'.join(split_name[2:])) if len(split_name) > 2 else '' 71 split_name[os_index] = os_name 72 name = '-'.join(split_name) 69 73 return self._filesystem.join(apple_additions().layout_tests_path(), name) 70 74 -
trunk/Tools/Scripts/webkitpy/port/mac_unittest.py
r221079 r221087 147 147 with port_testcase.bind_mock_apple_additions(): 148 148 search_path = self.make_port().default_baseline_search_path() 149 self.assertEqual(search_path[0], '/additional_testing_path/mac- lion-wk1')149 self.assertEqual(search_path[0], '/additional_testing_path/mac-add-lion-wk1') 150 150 self.assertEqual(search_path[1], '/mock-checkout/LayoutTests/platform/mac-lion-wk1') 151 self.assertEqual(search_path[2], '/additional_testing_path/mac-add-lion') 152 self.assertEqual(search_path[3], '/mock-checkout/LayoutTests/platform/mac-lion') -
trunk/Tools/Scripts/webkitpy/port/port_testcase.py
r221079 r221087 88 88 @staticmethod 89 89 def ios_os_name(name): 90 return name90 return 'add-{}'.format(name) 91 91 92 92 @staticmethod 93 93 def mac_os_name(name): 94 return name94 return 'add-{}'.format(name) 95 95 96 96 # apple_additions is a memoized function. Take advantage of this fact and manipulate the cache
Note: See TracChangeset
for help on using the changeset viewer.