Changeset 218996 in webkit


Ignore:
Timestamp:
Jun 30, 2017 8:33:16 AM (7 years ago)
Author:
Jonathan Bedard
Message:

Add support for different versions of iOS when loading test expectations
https://bugs.webkit.org/show_bug.cgi?id=173774
<rdar://problem/32951132>

Rubber-stamped by Aakash Jain.

When running layout tests, we should support multiple version of iOS the same way we do Mac.

  • Scripts/webkitpy/port/ios.py:

(IOSPort.default_baseline_search_path): Add ios-<major version> test expectation.
(IOSPort.test_expectations_file_position): Added new file expectations, increment expected file position.
(IOSPort.ios_version): iOS ports must define a function to retrieve the iOS version.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort.ios_version): Ask connected devices for implementation.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_additional_platform_directory): Skip test until bug 173775 is finished.
(IOSDeviceTest.test_baseline_searchpath): Ditto.
(IOSDeviceTest.test_expectations_ordering): Ditto.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.ios_version): If a runtime is specified, ask the runtime for the iOS version. Otherwise,
ask the platform.

Location:
trunk/Tools
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r218993 r218996  
     12017-06-30  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Add support for different versions of iOS when loading test expectations
     4        https://bugs.webkit.org/show_bug.cgi?id=173774
     5        <rdar://problem/32951132>
     6
     7        Rubber-stamped by Aakash Jain.
     8
     9        When running layout tests, we should support multiple version of iOS the same way we do Mac.
     10
     11        * Scripts/webkitpy/port/ios.py:
     12        (IOSPort.default_baseline_search_path): Add ios-<major version> test expectation.
     13        (IOSPort.test_expectations_file_position): Added new file expectations, increment expected file position.
     14        (IOSPort.ios_version): iOS ports must define a function to retrieve the iOS version.
     15        * Scripts/webkitpy/port/ios_device.py:
     16        (IOSDevicePort.ios_version): Ask connected devices for implementation.
     17        * Scripts/webkitpy/port/ios_device_unittest.py:
     18        (IOSDeviceTest.test_additional_platform_directory): Skip test until bug 173775 is finished.
     19        (IOSDeviceTest.test_baseline_searchpath): Ditto.
     20        (IOSDeviceTest.test_expectations_ordering): Ditto.
     21        * Scripts/webkitpy/port/ios_simulator.py:
     22        (IOSSimulatorPort.ios_version): If a runtime is specified, ask the runtime for the iOS version. Otherwise,
     23        ask the platform.
     24
    1252017-06-30  Jacobo Aragunde Pérez  <jaragunde@igalia.com>
    226
  • trunk/Tools/Scripts/webkitpy/port/ios.py

    r217853 r218996  
    9494            '{}-{}'.format(self.port_name, wk_string),
    9595            self.port_name,
     96            '{}-{}'.format(IOSPort.port_name, self.ios_version().split('.')[0]),
    9697            '{}-{}'.format(IOSPort.port_name, wk_string),
    9798            IOSPort.port_name,
     
    103104
    104105    def test_expectations_file_position(self):
    105         return 3
     106        return 4
     107
     108    def ios_version(self):
     109        raise NotImplementedError
    106110
    107111    def _create_devices(self, device_class):
  • trunk/Tools/Scripts/webkitpy/port/ios_device.py

    r217946 r218996  
    9292        return (stderr, None)
    9393
     94    @memoized
     95    def ios_version(self):
     96        if not apple_additions():
     97            raise RuntimeError(self.NO_ON_DEVICE_TESTING)
     98
     99        # FIXME: We should replace --runtime with something which makes sense for both Simulator and Device
     100        # https://bugs.webkit.org/show_bug.cgi?id=173775
     101        if len(self._device_for_worker_number_map()) == 0:
     102            raise RuntimeError('No devices are available')
     103        version = None
     104        for device in self._device_for_worker_number_map():
     105            if not version:
     106                version = device.platform.os_version
     107            else:
     108                if device.platform.os_version != version:
     109                    raise RuntimeError('Multiple connected devices have different iOS versions')
     110
     111        return version
     112
    94113    # FIXME: These need device implementations <rdar://problem/30497991>.
    95114    def check_for_leaks(self, process_name, process_pid):
  • trunk/Tools/Scripts/webkitpy/port/ios_device_unittest.py

    r217946 r218996  
    8888        with self.assertRaises(RuntimeError):
    8989            port._get_crash_log('DumpRenderTree', 1234, None, None, time.time(), wait_for_log=False)
     90
     91    # FIXME: https://bugs.webkit.org/show_bug.cgi?id=173775
     92    def test_additional_platform_directory(self):
     93        pass
     94
     95    def test_baseline_searchpath(self):
     96        pass
     97
     98    def test_expectations_ordering(self):
     99        pass
  • trunk/Tools/Scripts/webkitpy/port/ios_simulator.py

    r217671 r218996  
    101101        return runtime
    102102
     103    def ios_version(self):
     104        # FIXME: We should replace --runtime with something which makes sense for both Simulator and Device
     105        # https://bugs.webkit.org/show_bug.cgi?id=173775
     106        runtime_identifier = self.get_option('runtime')
     107        if runtime_identifier:
     108            return '.'.join(str(i) for i in Runtime.from_identifier(runtime_identifier).version)
     109        return self.host.platform.xcode_sdk_version('iphonesimulator')
     110
    103111    def simulator_device_type(self):
    104112        device_type_identifier = self.get_option('device_type')
Note: See TracChangeset for help on using the changeset viewer.