webkitpy: Provide option to skip install
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Apr 2017 19:39:29 +0000 (19:39 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Apr 2017 19:39:29 +0000 (19:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=170344

Reviewed by Alexey Proskuryakov.

Installing can take time for on device testing.  Provide an option to skip install
and use whatever driver is currently installed on the device or simulator.

* Scripts/webkitpy/port/base.py:
(Port.check_build): Do not check driver if skipping install.
* Scripts/webkitpy/port/factory.py:
(platform_options): Add '--no-install' option.
* Scripts/webkitpy/port/ios.py:
(IOSPort.setup_test_run): Check install option before installing.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/port/base.py
Tools/Scripts/webkitpy/port/factory.py
Tools/Scripts/webkitpy/port/ios.py

index cfa74b5..0ce4e55 100644 (file)
@@ -1,3 +1,20 @@
+2017-04-03  Jonathan Bedard  <jbedard@apple.com>
+
+        webkitpy: Provide option to skip install
+        https://bugs.webkit.org/show_bug.cgi?id=170344
+
+        Reviewed by Alexey Proskuryakov.
+
+        Installing can take time for on device testing.  Provide an option to skip install
+        and use whatever driver is currently installed on the device or simulator.
+
+        * Scripts/webkitpy/port/base.py:
+        (Port.check_build): Do not check driver if skipping install.
+        * Scripts/webkitpy/port/factory.py:
+        (platform_options): Add '--no-install' option.
+        * Scripts/webkitpy/port/ios.py:
+        (IOSPort.setup_test_run): Check install option before installing.
+
 2017-04-03  Keith Miller  <keith_miller@apple.com>
 
         WebAssembly: Update spec tests
index 950fc4b..3b16555 100644 (file)
@@ -227,12 +227,12 @@ class Port(object):
         # If we're using a pre-built copy of WebKit (--root), we assume it also includes a build of DRT.
         if not self._root_was_set and self.get_option('build') and not self._build_driver():
             return False
-        if not self._check_driver():
+        if self.get_option('install') and not self._check_driver():
             return False
         if self.get_option('pixel_tests'):
             if not self.check_image_diff():
                 return False
-        if not self._check_port_build():
+        if self.get_option('install') and not self._check_port_build():
             return False
         return True
 
index 34533b4..c61d17f 100644 (file)
@@ -56,6 +56,9 @@ def platform_options(use_globs=False):
         optparse.make_option('--gtk', action='store_const', dest='platform',
             const=('gtk*' if use_globs else 'gtk'),
             help=('Alias for --platform=gtk*' if use_globs else 'Alias for --platform=gtk')),
+        optparse.make_option('--no-install', action='store_const',
+            const=False, default=True, dest='install',
+            help='Skip install step for device and simulator testing'),
         ]
 
 
index 09a537a..ee7e151 100644 (file)
@@ -110,14 +110,17 @@ class IOSPort(DarwinPort):
     def setup_test_run(self, device_class=None):
         self._create_devices(device_class)
 
-        for i in xrange(self.child_processes()):
-            device = self.target_host(i)
-            _log.debug('Installing to {}'.format(device))
-            # Without passing DYLD_LIBRARY_PATH, libWebCoreTestSupport cannot be loaded and DRT/WKTR will crash pre-launch,
-            # leaving a crash log which will be picked up in results.  No DYLD_FRAMEWORK_PATH will also cause the DRT/WKTR to
-            # crash, but this crash will occur post-launch, after install_app has already killed the process.
-            if not device.install_app(self._path_to_driver(), {'DYLD_LIBRARY_PATH': self._build_path()}):
-                raise RuntimeError('Failed to install app {} on device {}'.format(self._path_to_driver(), device.udid))
+        if self.get_option('install'):
+            for i in xrange(self.child_processes()):
+                device = self.target_host(i)
+                _log.debug('Installing to {}'.format(device))
+                # Without passing DYLD_LIBRARY_PATH, libWebCoreTestSupport cannot be loaded and DRT/WKTR will crash pre-launch,
+                # leaving a crash log which will be picked up in results.  No DYLD_FRAMEWORK_PATH will also cause the DRT/WKTR to
+                # crash, but this crash will occur post-launch, after install_app has already killed the process.
+                if not device.install_app(self._path_to_driver(), {'DYLD_LIBRARY_PATH': self._build_path()}):
+                    raise RuntimeError('Failed to install app {} on device {}'.format(self._path_to_driver(), device.udid))
+        else:
+            _log.debug('Skipping installation')
 
         for i in xrange(self.child_processes()):
             self.target_host(i).prepare_for_testing()