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

Issue 1218053003: [Android] Begin switching from lighttpd + apache to EmbeddedTestServer. (Closed)

Created:
5 years, 5 months ago by jbudorick
Modified:
5 years ago
Reviewers:
Ted C, cjhopman, Yaron
CC:
cbentzel+watch_chromium.org, chromium-reviews, erikwright+watch_chromium.org, jbudorick+watch_chromium.org, klundberg+watch_chromium.org, sgurun-gerrit only, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

CLOSED: superseded by https://codereview.chromium.org/1465383003/ [Android] Begin switching from lighttpd + apache to EmbeddedTestServer. This CL: - removes apache from ChromeInstrumentationTestRunner - converts TabsTest to use EmbeddedTestServer - fixes a few miscellaneous gn issues BUG=488195

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : rebase #

Patch Set 6 : rebase #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+223 lines, -264 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M base/android/java/templates/NativeLibraries.template View 1 chunk +5 lines, -1 line 0 comments Download
A base/android/java/templates/NativeTestLibraries.template View 1 chunk +3 lines, -0 lines 0 comments Download
M base/base.gyp View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M base/test/android/javatests/src/org/chromium/base/test/BaseInstrumentationTestRunner.java View 1 2 3 2 chunks +11 lines, -2 lines 0 comments Download
M build/android/pylib/instrumentation/instrumentation_test_instance.py View 2 chunks +0 lines, -9 lines 0 comments Download
M build/android/pylib/local/device/local_device_instrumentation_test_run.py View 1 chunk +1 line, -1 line 0 comments Download
M build/android/pylib/remote/device/remote_device_instrumentation_test_run.py View 1 chunk +0 lines, -1 line 0 comments Download
M build/config/android/internal_rules.gni View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M build/config/android/rules.gni View 1 2 3 4 5 6 4 chunks +10 lines, -1 line 0 comments Download
M build/java_apk.gypi View 1 2 3 4 4 chunks +10 lines, -3 lines 0 comments Download
M chrome/android/BUILD.gn View 1 2 3 4 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/android/chrome_apk.gyp View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java View 1 2 3 4 5 6 7 8 16 chunks +54 lines, -20 lines 0 comments Download
A + chrome/android/shell/chrome_shell_test_entry_point.cc View 1 2 3 1 chunk +3 lines, -16 lines 0 comments Download
A + chrome/browser/android/chrome_test_entry_point.cc View 1 chunk +3 lines, -16 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 5 chunks +15 lines, -0 lines 0 comments Download
M chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeInstrumentationTestRunner.java View 1 2 3 4 5 6 2 chunks +1 line, -184 lines 0 comments Download
M content/content_shell.gypi View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M net/BUILD.gn View 1 2 3 4 5 3 chunks +9 lines, -7 lines 0 comments Download
M net/android/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M net/net.gyp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M net/test/android/javatests/src/org/chromium/net/test/EmbeddedTestServer.java View 1 2 3 4 5 2 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
jbudorick
TabsTest is an example -- I didn't want to switch over any more tests before ...
5 years, 5 months ago (2015-07-15 21:22:37 UTC) #2
cjhopman
I don't think we can package native code into instrumentation test apks. There's a bug ...
5 years, 5 months ago (2015-07-16 00:25:36 UTC) #3
jbudorick
On 2015/07/16 at 00:25:36, cjhopman wrote: > I don't think we can package native code ...
5 years, 5 months ago (2015-07-16 00:35:06 UTC) #4
jbudorick
On 2015/07/16 at 00:35:06, jbudorick wrote: > On 2015/07/16 at 00:25:36, cjhopman wrote: > > ...
5 years, 5 months ago (2015-07-16 00:38:29 UTC) #5
cjhopman
5 years, 5 months ago (2015-07-16 18:29:57 UTC) #6
On 2015/07/16 00:38:29, jbudorick wrote:
> On 2015/07/16 at 00:35:06, jbudorick wrote:
> > On 2015/07/16 at 00:25:36, cjhopman wrote:
> > > I don't think we can package native code into instrumentation test apks.
> There's a bug where we had more in-depth discussion of why we shouldn't try to
> do it, I'll see if I can find it.
> > 
> > What do you mean, that it's not possible or that we shouldn't?
> 
> Derp, got hung up on the first sentence. I'll be interested to see that bug if
> you find it.
> 
> > 
> > With this CL, TabsTest runs with an http server running from a native
library
> in the instrumentation test apk.

From email:

I think the main problem is that in a component build, the test and the app will
share a bunch of libraries (and thus all the statics there are shared), but in a
non-component build those things aren't shared. I don't think it's feasible to
actually have that work and have people understand the limitations when writing
code in that context.

There are two approaches we've used in the past when we needed native code for
tests:

1. Package everything into a single apk. This is done for all unit tests, but it
is also possible to use this approach for instrumentation tests (I believe that
mojo does that).
2. Put the native code in a separate "support" apk and expose it to the tests by
a service or some such.

I was thinking about this a bit more last night and there's actually a third
approach that we could take. It's a bit more complicated than 2, and I don't
know if it's really worth it:

3. Put the native code into the instrumentation apk, but only load it in a
service in a separate process. We would have to ensure then that in the main
process, the libraries that are loaded are from the tested apk and in the other
process that they are from the test apk.

Powered by Google App Engine
This is Rietveld 408576698