Title: [109017] trunk/Tools
- Revision
- 109017
- Author
- wangxian...@chromium.org
- Date
- 2012-02-27 13:03:16 -0800 (Mon, 27 Feb 2012)
Log Message
Chromium-Android layout test script: the adb shell prompt is not always '# '
https://bugs.webkit.org/show_bug.cgi?id=79506
Reviewed by Adam Barth.
* Scripts/webkitpy/layout_tests/port/chromium_android.py:
(ChromiumAndroidDriver._start):
(ChromiumAndroidDriver._read_prompt):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (109016 => 109017)
--- trunk/Tools/ChangeLog 2012-02-27 20:43:47 UTC (rev 109016)
+++ trunk/Tools/ChangeLog 2012-02-27 21:03:16 UTC (rev 109017)
@@ -1,3 +1,14 @@
+2012-02-27 Xianzhu Wang <wangxian...@chromium.org>
+
+ Chromium-Android layout test script: the adb shell prompt is not always '# '
+ https://bugs.webkit.org/show_bug.cgi?id=79506
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._start):
+ (ChromiumAndroidDriver._read_prompt):
+
2012-02-27 Dan Bernstein <m...@apple.com>
Added a test for <rdar://problem/9557598> REGRESSION (WebKit2): Non-activating links sometimes don’t work
Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py (109016 => 109017)
--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2012-02-27 20:43:47 UTC (rev 109016)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py 2012-02-27 21:03:16 UTC (rev 109017)
@@ -425,9 +425,8 @@
_log.debug('Starting adb shell for DumpRenderTree: ' + ' '.join(shell_cmd))
executive = self._port.host.executive
self._proc = executive.Popen(shell_cmd, stdin=executive.PIPE, stdout=executive.PIPE, stderr=executive.STDOUT, close_fds=True)
- # Read back the shell prompt ('# ') to ensure adb shell ready.
- prompt = self._proc.stdout.read(2)
- assert(prompt == '# ')
+ # Read back the shell prompt to ensure adb shell ready.
+ self._read_prompt()
# Some tests rely on this to produce proper number format etc.,
# e.g. fast/speech/input-appearance-numberandspeech.html.
self._write_command_and_read_line("export LC_CTYPE='en_US'\n")
@@ -520,3 +519,14 @@
# (which causes Shell to output a message), and dumps the stack strace.
# We use the Shell output as a crash hint.
return line is not None and line.find('[1] + Stopped (signal)') >= 0
+
+ def _read_prompt(self):
+ last_char = ''
+ while True:
+ current_char = self._proc.stdout.read(1)
+ if current_char == ' ':
+ if last_char == '#':
+ return
+ if last_char == '$':
+ raise AssertionError('Adbd is not running as root')
+ last_char = current
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes