webkitpy: Clobbering and building occurs multiple times for iOS Simulator ports
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Sep 2018 20:10:33 +0000 (20:10 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Sep 2018 20:10:33 +0000 (20:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=189702
<rdar://problem/44541704>

Reviewed by Aakash Jain.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._set_up_run): Move build check and clobbering to run, since set up is
run multiple times for iOS simulator.
(Manager.run):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/controllers/manager.py

index f0cb426..2767dbf 100644 (file)
@@ -1,3 +1,16 @@
+2018-09-18  Jonathan Bedard  <jbedard@apple.com>
+
+        webkitpy: Clobbering and building occurs multiple times for iOS Simulator ports
+        https://bugs.webkit.org/show_bug.cgi?id=189702
+        <rdar://problem/44541704>
+
+        Reviewed by Aakash Jain.
+
+        * Scripts/webkitpy/layout_tests/controllers/manager.py:
+        (Manager._set_up_run): Move build check and clobbering to run, since set up is
+        run multiple times for iOS simulator.
+        (Manager.run):
+
 2018-09-18  Chris Dumez  <cdumez@apple.com>
 
         "DidFirstVisuallyNonEmptyLayout" callback does not get called when restoring a page from PageCache
index 14f9559..5bdf5ac 100644 (file)
@@ -160,11 +160,6 @@ class Manager(object):
         self._options.child_processes = worker_count
 
     def _set_up_run(self, test_names, device_class=None):
-        self._printer.write_update("Checking build ...")
-        if not self._port.check_build():
-            _log.error("Build check failed")
-            return False
-
         self._options.device_class = device_class
 
         # This must be started before we check the system dependencies,
@@ -183,12 +178,6 @@ class Manager(object):
                 self._port.stop_helper()
                 return False
 
-        if self._options.clobber_old_results:
-            self._clobber_old_results()
-
-        # Create the output directory if it doesn't already exist.
-        self._port.host.filesystem.maybe_make_directory(self._results_directory)
-
         self._port.setup_test_run(self._options.device_class)
         return True
 
@@ -239,6 +228,17 @@ class Manager(object):
         self._runner = LayoutTestRunner(self._options, self._port, self._printer, self._results_directory, self._test_is_slow,
                                         needs_http=needs_http, needs_web_platform_test_server=needs_web_platform_test_server, needs_websockets=needs_websockets)
 
+        self._printer.write_update("Checking build ...")
+        if not self._port.check_build():
+            _log.error("Build check failed")
+            return test_run_results.RunDetails(exit_code=-1)
+
+        if self._options.clobber_old_results:
+            self._clobber_old_results()
+
+        # Create the output directory if it doesn't already exist.
+        self._port.host.filesystem.maybe_make_directory(self._results_directory)
+
         if default_device_tests:
             _log.info('')
             _log.info("Running %s", pluralize(len(tests_to_run), "test"))