Changeset 221087 in webkit


Ignore:
Timestamp:
Aug 23, 2017 11:09:06 AM (7 years ago)
Author:
Jonathan Bedard
Message:

Access expectations path through apple_additions
https://bugs.webkit.org/show_bug.cgi?id=174800
<rdar://problem/33498899>

Reviewed by David Kilzer.

Follow-up fix. Mapping of operating system names was done incorrectly.

  • Scripts/webkitpy/port/ios.py:

(IOSPort._apple_additions_path): Correctly find the operating system to be replaced.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_layout_test_searchpath_with_apple_additions): Add test for operating
system name replacement.

  • Scripts/webkitpy/port/ios_simulator_unittest.py:

(IOSSimulatorTest.test_layout_test_searchpath_with_apple_additions): Add test for operating
system name replacement.

  • Scripts/webkitpy/port/mac.py: Correctly find the operating system to be replaced.

(MacPort._apple_additions_path):

  • Scripts/webkitpy/port/mac_unittest.py:

(MacTest.test_layout_test_searchpath_with_apple_additions): Add test for operating system
name replacement.

  • Scripts/webkitpy/port/port_testcase.py:

(bind_mock_apple_additions.MockAppleAdditions.ios_os_name): Change the passed name so that
operating system name replacement can be tested.
(bind_mock_apple_additions.MockAppleAdditions.mac_os_name): Ditto.

Location:
trunk/Tools
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r221079 r221087  
     12017-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
    1292017-08-23  Jonathan Bedard  <jbedard@apple.com>
    230
  • trunk/Tools/Scripts/webkitpy/port/ios.py

    r221079 r221087  
    9292            return None
    9393        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])
    96100            if not os_name:
    97101                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)
    99104        return self._filesystem.join(apple_additions().layout_tests_path(), name)
    100105
  • trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py

    r221079 r221087  
    9494        with port_testcase.bind_mock_apple_additions():
    9595            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')
    9797        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')
    9999        self.assertEqual(search_path[3], '/mock-checkout/LayoutTests/platform/ios-device-11')
    100100        self.assertEqual(search_path[4], '/additional_testing_path/ios-device-wk1')
     
    102102        self.assertEqual(search_path[6], '/additional_testing_path/ios-device')
    103103        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')
    105105        self.assertEqual(search_path[9], '/mock-checkout/LayoutTests/platform/ios-11')
    106106        self.assertEqual(search_path[10], '/additional_testing_path/ios-wk1')
  • trunk/Tools/Scripts/webkitpy/port/ios_simulator_unittest.py

    r221079 r221087  
    9393        with port_testcase.bind_mock_apple_additions():
    9494            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')
    9696        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')
    9898        self.assertEqual(search_path[3], '/mock-checkout/LayoutTests/platform/ios-simulator-8')
    9999        self.assertEqual(search_path[4], '/additional_testing_path/ios-simulator-wk1')
     
    101101        self.assertEqual(search_path[6], '/additional_testing_path/ios-simulator')
    102102        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')
    104104        self.assertEqual(search_path[9], '/mock-checkout/LayoutTests/platform/ios-8')
    105105        self.assertEqual(search_path[10], '/additional_testing_path/ios-wk1')
  • trunk/Tools/Scripts/webkitpy/port/mac.py

    r221079 r221087  
    6262            return None
    6363        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])
    6669            if not os_name:
    6770                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)
    6973        return self._filesystem.join(apple_additions().layout_tests_path(), name)
    7074
  • trunk/Tools/Scripts/webkitpy/port/mac_unittest.py

    r221079 r221087  
    147147        with port_testcase.bind_mock_apple_additions():
    148148            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')
    150150        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  
    8888        @staticmethod
    8989        def ios_os_name(name):
    90             return name
     90            return 'add-{}'.format(name)
    9191
    9292        @staticmethod
    9393        def mac_os_name(name):
    94             return name
     94            return 'add-{}'.format(name)
    9595
    9696    # 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.