Don't issue Stop() for spurious command line differences.
The android driver was checking self._current_cmd_line against its
own _android_driver_cmd_line() even though ServerProcess.start() was
setting that value based on the normal cmd_line().
Doing so results in the appearance of different command lines which
causes a ServerProcess.stop() to be issued and tear everything down.
Example:
_android_driver_cmd_line() = ['ContentShell.apk', '--no-timeout',
'--encode-binary', '--enable-hardware-gpu', '--force-compositing-mode',
'--enable-accelerated-fixed-position', '--dump-render-tree', '-']
_cmd_line() = ['adb', '-s', u'04aa0e7cdd540dac', 'shell']
Now a single content_shell instance is responsible for running all
the tests! Much faster :)
BUG=232044
TEST=content_shell tests use a single instance.
Review URL: https://chromiumcodereview.appspot.com/17502004
git-svn-id: svn://svn.chromium.org/blink/trunk@152840 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
index fe038ab..173580b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
@@ -883,8 +883,15 @@
# We override the default start() so that we can call _android_driver_cmd_line()
# instead of cmd_line().
new_cmd_line = self._android_driver_cmd_line(pixel_tests, per_test_args)
- if new_cmd_line != self._current_cmd_line:
+
+ # Since _android_driver_cmd_line() is different than cmd_line() we need to provide
+ # our own mechanism for detecting when the process should be stopped.
+ if self._current_cmd_line is None:
+ self._current_android_cmd_line = None
+ if new_cmd_line != self._current_android_cmd_line:
self.stop()
+ self._current_android_cmd_line = new_cmd_line
+
super(ChromiumAndroidDriver, self).start(pixel_tests, per_test_args)
def _start(self, pixel_tests, per_test_args):