Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Issue 2540603004: [Android] Redirect std{in,out,err} to sockets for layout tests. (Closed)

Created:
4 years ago by jbudorick
Modified:
3 years, 11 months ago
CC:
agrieve+watch_chromium.org, blink-reviews, chromium-reviews, darin-cc_chromium.org, Dirk Pranke, einbinder+watch-test-runner_chromium.org, jam, jochen+watch_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, Peter Beverloo
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Redirect std{in,out,err} to sockets for layout tests. We've used FIFOs on the device to handle stdin, stdout, and stderr in the past, with persistent adb shells writing to and read from (respectively) those FIFOs. They're prone to deadlocks and other unusual issues, though. This CL instead redirects those three streams to different sockets set up by run-webkit-tests and forwarded from the device to the host. This should eliminate the occasional problems caused by FIFOs and work more seamlessly with M and above. BUG=567947 Review-Url: https://codereview.chromium.org/2540603004 Cr-Commit-Position: refs/heads/master@{#442340} Committed: https://chromium.googlesource.com/chromium/src/+/2d40c48d8a1ba516c866d7d9a5e789eb9b011cb2

Patch Set 1 #

Patch Set 2 : prereview: kill stdin process #

Patch Set 3 : prereview: rebase on gtest rerun CL #

Patch Set 4 : rebase #

Patch Set 5 : Fix server_process_constructor name. #

Total comments: 4

Patch Set 6 : qyearsley comments #

Total comments: 26

Patch Set 7 : peter comments before layout_test_android -> scoped_android_configuration #

Patch Set 8 : peter comments after layout_test_android -> scoped_android_configuration #

Total comments: 11

Patch Set 9 : peter comments 2 #

Total comments: 16

Patch Set 10 : qyearsley comments 2 w/o syntax errors #

Patch Set 11 : qyearsley comments 3 #

Patch Set 12 : fix non-Android gn #

Patch Set 13 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+369 lines, -256 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +0 lines, -2 lines 0 comments Download
D base/android/fifo_utils.h View 1 2 3 4 5 6 1 chunk +0 lines, -31 lines 0 comments Download
D base/android/fifo_utils.cc View 1 2 3 4 5 6 1 chunk +0 lines, -25 lines 0 comments Download
M content/shell/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -3 lines 0 comments Download
M content/shell/android/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/android/java/src/org/chromium/content_shell/ShellLayoutTestUtils.java View 2 chunks +4 lines, -6 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_android.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -18 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_android.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -77 lines 0 comments Download
M content/shell/browser/layout_test/layout_test_browser_main.cc View 1 2 3 4 5 6 7 3 chunks +6 lines, -2 lines 0 comments Download
A content/shell/browser/layout_test/scoped_android_configuration.h View 1 2 3 4 5 6 7 8 1 chunk +41 lines, -0 lines 0 comments Download
A content/shell/browser/layout_test/scoped_android_configuration.cc View 1 2 3 4 5 6 7 8 1 chunk +191 lines, -0 lines 0 comments Download
M content/shell/common/layout_test/layout_test_switches.h View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M content/shell/common/layout_test/layout_test_switches.cc View 1 2 3 4 5 6 1 chunk +11 lines, -0 lines 0 comments Download
M testing/android/native_test/native_test_launcher.cc View 1 2 3 4 5 6 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py View 1 2 3 4 5 6 7 8 9 10 13 chunks +88 lines, -85 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver.py View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py View 1 2 3 4 5 6 7 8 9 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/server_process.py View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (26 generated)
jbudorick
4 years ago (2016-12-01 14:53:31 UTC) #2
jbudorick
On 2016/12/01 14:53:31, jbudorick wrote: er, hold off on this until I look into the ...
4 years ago (2016-12-01 20:58:22 UTC) #7
jbudorick
On 2016/12/01 20:58:22, jbudorick wrote: > On 2016/12/01 14:53:31, jbudorick wrote: > > er, hold ...
4 years ago (2016-12-02 17:17:25 UTC) #13
qyearsley
Note: The diagrams in https://docs.google.com/a/chromium.org/document/d/1C2VRAyEjL-I0a4ZQqPQ7ZiWc7LXwtGJbtIuVKsNCBmY/edit?usp=sharing are helpful when looking at this change. This is pretty ...
4 years ago (2016-12-02 23:35:22 UTC) #14
jbudorick
On 2016/12/02 23:35:22, qyearsley wrote: > Note: The diagrams in > https://docs.google.com/a/chromium.org/document/d/1C2VRAyEjL-I0a4ZQqPQ7ZiWc7LXwtGJbtIuVKsNCBmY/edit?usp=sharing > are helpful ...
4 years ago (2016-12-05 14:29:49 UTC) #15
jbudorick
https://codereview.chromium.org/2540603004/diff/100001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py (right): https://codereview.chromium.org/2540603004/diff/100001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py#newcode925 third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py:925: # Read back the shell prompt to ensure adb ...
4 years ago (2016-12-05 14:30:38 UTC) #16
Dirk Pranke
lgtm. I'd like qyearsley@ to be comfortable w/ the python code as well. And you'll ...
4 years ago (2016-12-06 02:38:50 UTC) #18
Peter Beverloo
Thanks for doing this, John! https://codereview.chromium.org/2540603004/diff/110001/content/shell/browser/layout_test/layout_test_android.cc File content/shell/browser/layout_test/layout_test_android.cc (right): https://codereview.chromium.org/2540603004/diff/110001/content/shell/browser/layout_test/layout_test_android.cc#newcode12 content/shell/browser/layout_test/layout_test_android.cc:12: #include "base/android/fifo_utils.h" The entirety ...
4 years ago (2016-12-06 19:24:06 UTC) #19
jbudorick
My c++ is clearly a bit rusty. Thanks for the thorough review! https://codereview.chromium.org/2540603004/diff/110001/content/shell/browser/layout_test/layout_test_android.cc File content/shell/browser/layout_test/layout_test_android.cc ...
4 years ago (2016-12-08 02:04:13 UTC) #20
Peter Beverloo
lgtm, apologies for the delay and once again thanks for doing this! :) https://codereview.chromium.org/2540603004/diff/150001/content/shell/browser/layout_test/scoped_android_configuration.cc File ...
4 years ago (2016-12-13 12:15:34 UTC) #21
jbudorick
https://codereview.chromium.org/2540603004/diff/150001/content/shell/browser/layout_test/scoped_android_configuration.cc File content/shell/browser/layout_test/scoped_android_configuration.cc (right): https://codereview.chromium.org/2540603004/diff/150001/content/shell/browser/layout_test/scoped_android_configuration.cc#newcode1 content/shell/browser/layout_test/scoped_android_configuration.cc:1: // Copyright 2013 The Chromium Authors. All rights reserved. ...
4 years ago (2016-12-14 02:21:59 UTC) #22
Ted C
On 2016/12/14 02:21:59, jbudorick wrote: > https://codereview.chromium.org/2540603004/diff/150001/content/shell/browser/layout_test/scoped_android_configuration.cc > File content/shell/browser/layout_test/scoped_android_configuration.cc (right): > > https://codereview.chromium.org/2540603004/diff/150001/content/shell/browser/layout_test/scoped_android_configuration.cc#newcode1 > ...
4 years ago (2016-12-14 19:22:59 UTC) #23
jbudorick
On 2016/12/06 02:38:50, Dirk Pranke wrote: > lgtm. > > I'd like qyearsley@ to be ...
4 years ago (2016-12-15 16:48:14 UTC) #24
qyearsley
https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py (right): https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py#newcode923 third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py:923: check_return=True) Maybe some parts of this large function would ...
4 years ago (2016-12-15 19:21:02 UTC) #25
jbudorick
https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py (right): https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py#newcode923 third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py:923: check_return=True) On 2016/12/15 19:21:01, qyearsley wrote: > Maybe some ...
4 years ago (2016-12-21 00:55:16 UTC) #26
jbudorick
qyearsley: friendly ping
3 years, 11 months ago (2017-01-04 15:27:56 UTC) #27
qyearsley
LGTM! Thanks for the explanations. https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py (right): https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py#newcode959 third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py:959: self._device) On 2016/12/21 at ...
3 years, 11 months ago (2017-01-04 19:00:32 UTC) #28
jbudorick
https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py File third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py (right): https://codereview.chromium.org/2540603004/diff/170001/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py#newcode1000 third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py:1000: def _start_netcat(self, server_name, first_port=10201, read_from_stdin=True): On 2017/01/04 19:00:32, qyearsley ...
3 years, 11 months ago (2017-01-04 19:50:15 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2540603004/210001
3 years, 11 months ago (2017-01-04 19:51:05 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/334853)
3 years, 11 months ago (2017-01-04 20:00:19 UTC) #34
jbudorick
+agrieve for base/BUILD.gn and base/android/* owners
3 years, 11 months ago (2017-01-04 23:43:24 UTC) #39
jbudorick
...er, +agrieve for real
3 years, 11 months ago (2017-01-04 23:43:44 UTC) #41
agrieve
On 2017/01/04 23:43:44, jbudorick wrote: > ...er, +agrieve for real lgtm. yay deleting!
3 years, 11 months ago (2017-01-05 01:25:34 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2540603004/250001
3 years, 11 months ago (2017-01-09 20:00:47 UTC) #48
commit-bot: I haz the power
3 years, 11 months ago (2017-01-09 21:05:37 UTC) #51
Message was sent while issue was closed.
Committed patchset #13 (id:250001) as
https://chromium.googlesource.com/chromium/src/+/2d40c48d8a1ba516c866d7d9a5e7...

Powered by Google App Engine
This is Rietveld 408576698