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

Issue 1057783002: Add new GN junit binary template and new GYP java binary template. (Closed)

Created:
5 years, 8 months ago by mikecase (-- gone --)
Modified:
5 years, 8 months ago
Reviewers:
Ted C, cjhopman, jbudorick
CC:
chromium-reviews, darin-cc_chromium.org, klundberg+watch_chromium.org, jam, yfriedman+watch_chromium.org, jbudorick+watch_chromium.org, dgn1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add new GN junit binary template and new GYP java binary template. Adds a new junit_binary template for gyp which makes it easy to make new Junit test suites by setting a lot of the options and necessary dependencies for you. Also, adds a new java_binary.gypi file which uses the create_java_binary_script.py similiar to how the java_binary GN template works when main_class is specified. This lets GYP and GN work similiar when building a junit binary, so our test runner can run them the same way. Finally, because of the slightly different way were now running the junit binary, the java classpath contains all of the jars instead of just the test jar (before we were running java -jar test_jar.jar which set the classpath to just be test_jar.jar). Therefore, we can simplify things and just look in the classpath for the paths to the Robolectric dependencies when running Robolectric junit tests. BUG= Committed: https://crrev.com/1ad64324d470c43b29854282d5ad5b1ff75dfc6c Cr-Commit-Position: refs/heads/master@{#324093}

Patch Set 1 #

Patch Set 2 : #

Total comments: 11

Patch Set 3 : Addressed jbudorick's comments and merged java_binary.gypi with host_jar.gypi. #

Patch Set 4 : Fixed some preexisting errors to host_jar.gypi. #

Total comments: 5

Patch Set 5 : Addressed cjhopman's feedback. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+205 lines, -42 lines) Patch
M build/android/pylib/junit/test_runner.py View 1 1 chunk +4 lines, -5 lines 0 comments Download
M build/config/android/rules.gni View 1 chunk +58 lines, -0 lines 0 comments Download
M build/host_jar.gypi View 1 2 3 4 3 chunks +32 lines, -3 lines 0 comments Download
M chrome/android/BUILD.gn View 1 chunk +3 lines, -5 lines 0 comments Download
M content/public/android/BUILD.gn View 1 chunk +1 line, -4 lines 0 comments Download
M testing/android/junit/BUILD.gn View 1 chunk +2 lines, -7 lines 0 comments Download
M testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java View 1 2 4 chunks +15 lines, -2 lines 0 comments Download
M testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java View 1 2 4 chunks +17 lines, -6 lines 0 comments Download
M testing/android/junit/java/src/org/chromium/testing/local/LocalRobolectricTestRunner.java View 1 2 2 chunks +1 line, -10 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/RobolectricClasspathDependencyResolver.java View 1 2 1 chunk +72 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (3 generated)
mikecase (-- gone --)
Please take a look at this when you get the chance. It fixes all of ...
5 years, 8 months ago (2015-04-02 03:54:13 UTC) #2
jbudorick
https://codereview.chromium.org/1057783002/diff/20001/build/java_binary.gypi File build/java_binary.gypi (right): https://codereview.chromium.org/1057783002/diff/20001/build/java_binary.gypi#newcode1 build/java_binary.gypi:1: # Copyright 2015 The Chromium Authors. All rights reserved. ...
5 years, 8 months ago (2015-04-02 14:21:43 UTC) #3
mikecase (-- gone --)
https://codereview.chromium.org/1057783002/diff/20001/build/java_binary.gypi File build/java_binary.gypi (right): https://codereview.chromium.org/1057783002/diff/20001/build/java_binary.gypi#newcode1 build/java_binary.gypi:1: # Copyright 2015 The Chromium Authors. All rights reserved. ...
5 years, 8 months ago (2015-04-02 17:11:40 UTC) #4
mikecase (-- gone --)
cc'ing dgn@google.com. This change will fix the Robolectric GN problems and should also fix the ...
5 years, 8 months ago (2015-04-02 17:18:40 UTC) #5
cjhopman
https://codereview.chromium.org/1057783002/diff/60001/build/host_jar.gypi File build/host_jar.gypi (right): https://codereview.chromium.org/1057783002/diff/60001/build/host_jar.gypi#newcode69 build/host_jar.gypi:69: 'java_sources!': ['<!@(find <@(excluded_src_paths) -name "*.java")'], if excluded_src_paths is empty, ...
5 years, 8 months ago (2015-04-06 18:56:32 UTC) #6
mikecase (-- gone --)
https://codereview.chromium.org/1057783002/diff/60001/build/host_jar.gypi File build/host_jar.gypi (right): https://codereview.chromium.org/1057783002/diff/60001/build/host_jar.gypi#newcode69 build/host_jar.gypi:69: 'java_sources!': ['<!@(find <@(excluded_src_paths) -name "*.java")'], On 2015/04/06 18:56:32, cjhopman ...
5 years, 8 months ago (2015-04-06 21:03:41 UTC) #7
cjhopman
lgtm https://codereview.chromium.org/1057783002/diff/60001/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java File testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java (right): https://codereview.chromium.org/1057783002/diff/60001/testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java#newcode39 testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java:39: for (String testJar: testJars) { On 2015/04/06 21:03:39, ...
5 years, 8 months ago (2015-04-07 02:10:40 UTC) #8
mikecase (-- gone --)
+tedchoc for review of chrome/android/BUILD.gn content/public/android/BUILD.gn and testing/android/junit/* Basically, added a new GN template so ...
5 years, 8 months ago (2015-04-07 16:37:53 UTC) #10
Ted C
On 2015/04/07 16:37:53, mikecase wrote: > +tedchoc for review of > > chrome/android/BUILD.gn > content/public/android/BUILD.gn ...
5 years, 8 months ago (2015-04-07 17:32:38 UTC) #11
jbudorick
build/android/pylib lgtm
5 years, 8 months ago (2015-04-07 18:46:40 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1057783002/80001
5 years, 8 months ago (2015-04-07 18:48:32 UTC) #14
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 8 months ago (2015-04-07 19:45:25 UTC) #15
commit-bot: I haz the power
5 years, 8 months ago (2015-04-07 19:46:22 UTC) #16
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/1ad64324d470c43b29854282d5ad5b1ff75dfc6c
Cr-Commit-Position: refs/heads/master@{#324093}

Powered by Google App Engine
This is Rietveld 408576698