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

Issue 574433003: [Android] JUnit runner + gyp changes. (Closed)

Created:
6 years, 3 months ago by jbudorick
Modified:
5 years, 4 months ago
CC:
chromium-reviews, klundberg+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@deps-changes
Project:
chromium
Visibility:
Public.

Description

[Android] JUnit runner + gyp changes. This adds Java code for running junit tests, as well as gyp targets for both runnable and non-runnable host-side JARs. BUG=316383 Committed: https://crrev.com/2e56d4508e33de5fc60bbbb41c5a5d5534e88174 Cr-Commit-Position: refs/heads/master@{#296340}

Patch Set 1 #

Patch Set 2 : #

Total comments: 14

Patch Set 3 : address comments from cjhopman #

Patch Set 4 : rebase #

Total comments: 66

Patch Set 5 : address comments from nyquist@ #

Patch Set 6 : #

Total comments: 25

Patch Set 7 : address comments from nyquist #

Patch Set 8 : #

Total comments: 9

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Patch Set 13 : move junit code to testing/android/junit/ #

Total comments: 6

Patch Set 14 : #

Patch Set 15 : fix findbugs issues #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1288 lines, -6 lines) Patch
M build/all.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M build/android/gyp/jar.py View 1 2 4 chunks +15 lines, -5 lines 0 comments Download
M build/android/gyp/javac.py View 1 2 4 chunks +52 lines, -1 line 0 comments Download
A build/host_jar.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +102 lines, -0 lines 0 comments Download
A build/host_prebuilt_jar.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +50 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/GtestComputer.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +76 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +95 lines, -0 lines 2 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/GtestListener.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +80 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/GtestLogger.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +109 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/JunitTestArgParser.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +90 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/JunitTestMain.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +96 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/PackageFilter.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +41 lines, -0 lines 0 comments Download
A testing/android/junit/java/src/org/chromium/testing/local/RunnerFilter.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +45 lines, -0 lines 0 comments Download
A testing/android/junit/javatests/src/org/chromium/testing/local/GtestFilterTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +118 lines, -0 lines 0 comments Download
A testing/android/junit/javatests/src/org/chromium/testing/local/GtestLoggerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +144 lines, -0 lines 0 comments Download
A testing/android/junit/javatests/src/org/chromium/testing/local/PackageFilterTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +47 lines, -0 lines 0 comments Download
A testing/android/junit/javatests/src/org/chromium/testing/local/RunnerFilterTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +56 lines, -0 lines 0 comments Download
A testing/android/junit/junit_test.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +39 lines, -0 lines 0 comments Download
A third_party/junit/junit.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +32 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (6 generated)
jbudorick
Note that this is blocked on https://codereview.chromium.org/556893004/ cjhopman for gyp nyquist for testing/android/* aurimas because ...
6 years, 3 months ago (2014-09-15 15:43:38 UTC) #2
cjhopman
https://codereview.chromium.org/574433003/diff/20001/build/android/gyp/jar.py File build/android/gyp/jar.py (right): https://codereview.chromium.org/574433003/diff/20001/build/android/gyp/jar.py#newcode16 build/android/gyp/jar.py:16: def Jar(class_files, classes_dir, jar_path, manifest_file=None): I would like to ...
6 years, 3 months ago (2014-09-15 22:27:37 UTC) #3
jbudorick
https://codereview.chromium.org/574433003/diff/20001/build/android/gyp/jar.py File build/android/gyp/jar.py (right): https://codereview.chromium.org/574433003/diff/20001/build/android/gyp/jar.py#newcode16 build/android/gyp/jar.py:16: def Jar(class_files, classes_dir, jar_path, manifest_file=None): On 2014/09/15 22:27:36, cjhopman ...
6 years, 3 months ago (2014-09-16 02:50:41 UTC) #4
nyquist
https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestComputer.java File testing/android/java/src/org/chromium/testing/local/GtestComputer.java (right): https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestComputer.java#newcode29 testing/android/java/src/org/chromium/testing/local/GtestComputer.java:29: super(); this call does nothing https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestFilter.java File testing/android/java/src/org/chromium/testing/local/GtestFilter.java (right): ...
6 years, 3 months ago (2014-09-19 01:26:04 UTC) #5
jbudorick
https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestComputer.java File testing/android/java/src/org/chromium/testing/local/GtestComputer.java (right): https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestComputer.java#newcode29 testing/android/java/src/org/chromium/testing/local/GtestComputer.java:29: super(); On 2014/09/19 01:26:02, nyquist wrote: > this call ...
6 years, 3 months ago (2014-09-19 20:09:08 UTC) #6
nyquist
thanks! this was easier to read. https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestFilter.java File testing/android/java/src/org/chromium/testing/local/GtestFilter.java (right): https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestFilter.java#newcode33 testing/android/java/src/org/chromium/testing/local/GtestFilter.java:33: String[] filterStrings = ...
6 years, 3 months ago (2014-09-19 22:21:45 UTC) #7
jbudorick
https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestFilter.java File testing/android/java/src/org/chromium/testing/local/GtestFilter.java (right): https://codereview.chromium.org/574433003/diff/60001/testing/android/java/src/org/chromium/testing/local/GtestFilter.java#newcode33 testing/android/java/src/org/chromium/testing/local/GtestFilter.java:33: String[] filterStrings = filterString.split(":"); On 2014/09/19 22:21:45, nyquist wrote: ...
6 years, 3 months ago (2014-09-20 00:11:29 UTC) #8
nyquist
lgtm https://codereview.chromium.org/574433003/diff/100001/testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java File testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java (right): https://codereview.chromium.org/574433003/diff/100001/testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java#newcode40 testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java:40: ByteArrayOutputStream actual = new ByteArrayOutputStream(); On 2014/09/20 00:11:29, ...
6 years, 3 months ago (2014-09-22 23:32:09 UTC) #9
cjhopman
https://codereview.chromium.org/574433003/diff/140001/build/host_jar.gypi File build/host_jar.gypi (right): https://codereview.chromium.org/574433003/diff/140001/build/host_jar.gypi#newcode44 build/host_jar.gypi:44: 'excluded_src_paths%': [], no need for % on lists (lists ...
6 years, 3 months ago (2014-09-22 23:52:47 UTC) #10
jbudorick
https://codereview.chromium.org/574433003/diff/100001/testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java File testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java (right): https://codereview.chromium.org/574433003/diff/100001/testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java#newcode40 testing/android/javatests/src/org/chromium/testing/local/GtestLoggerTest.java:40: ByteArrayOutputStream actual = new ByteArrayOutputStream(); On 2014/09/22 23:32:09, nyquist ...
6 years, 3 months ago (2014-09-22 23:53:01 UTC) #11
jbudorick
https://codereview.chromium.org/574433003/diff/140001/build/host_jar.gypi File build/host_jar.gypi (right): https://codereview.chromium.org/574433003/diff/140001/build/host_jar.gypi#newcode44 build/host_jar.gypi:44: 'excluded_src_paths%': [], On 2014/09/22 23:52:47, cjhopman wrote: > no ...
6 years, 3 months ago (2014-09-23 01:00:19 UTC) #12
cjhopman
lgtm
6 years, 3 months ago (2014-09-23 01:14:04 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/574433003/200001
6 years, 3 months ago (2014-09-23 01:24:04 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/11370)
6 years, 3 months ago (2014-09-23 01:41:33 UTC) #17
jbudorick
Currently, build/apk_test.gypi uses 'java_in_dir': '<(DEPTH)/testing/android/java' which means it tries to compile all of the code ...
6 years, 3 months ago (2014-09-23 02:34:31 UTC) #18
jbudorick
After discussion with cjhopman offline, I moved the junit code to testing/android/junit. fyi, the junit_unit_tests ...
6 years, 3 months ago (2014-09-24 01:03:21 UTC) #19
cjhopman
lgtm w/ nits https://codereview.chromium.org/574433003/diff/240001/testing/android/junit/junit_test.gyp File testing/android/junit/junit_test.gyp (right): https://codereview.chromium.org/574433003/diff/240001/testing/android/junit/junit_test.gyp#newcode15 testing/android/junit/junit_test.gyp:15: '../../../testing/android/junit/java/src', nit: just 'java/src' https://codereview.chromium.org/574433003/diff/240001/testing/android/junit/junit_test.gyp#newcode31 testing/android/junit/junit_test.gyp:31: ...
6 years, 3 months ago (2014-09-24 01:06:52 UTC) #20
jbudorick
https://codereview.chromium.org/574433003/diff/240001/testing/android/junit/junit_test.gyp File testing/android/junit/junit_test.gyp (right): https://codereview.chromium.org/574433003/diff/240001/testing/android/junit/junit_test.gyp#newcode15 testing/android/junit/junit_test.gyp:15: '../../../testing/android/junit/java/src', On 2014/09/24 01:06:52, cjhopman wrote: > nit: just ...
6 years, 3 months ago (2014-09-24 01:16:41 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/574433003/260001
6 years, 3 months ago (2014-09-24 01:17:58 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator/builds/17894)
6 years, 3 months ago (2014-09-24 01:21:49 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/574433003/280001
6 years, 3 months ago (2014-09-24 02:49:55 UTC) #27
commit-bot: I haz the power
Committed patchset #15 (id:280001) as ce7eb54c0ebb4aca9e591779850ff92dab1bed46
6 years, 3 months ago (2014-09-24 03:41:28 UTC) #28
commit-bot: I haz the power
Patchset 15 (id:??) landed as https://crrev.com/2e56d4508e33de5fc60bbbb41c5a5d5534e88174 Cr-Commit-Position: refs/heads/master@{#296340}
6 years, 3 months ago (2014-09-24 03:42:09 UTC) #29
phoglund_chromium
A revert of this CL (patchset #15 id:280001) has been created in https://codereview.chromium.org/597123002/ by phoglund@chromium.org. ...
6 years, 3 months ago (2014-09-24 11:11:14 UTC) #30
jbudorick
On 2014/09/24 11:11:14, phoglund wrote: > A revert of this CL (patchset #15 id:280001) has ...
6 years, 3 months ago (2014-09-24 13:51:46 UTC) #31
kindrik
I have wrote my comment already. Just use this "publish & mail" button to send ...
5 years, 4 months ago (2015-08-14 10:15:43 UTC) #32
kindrik
> So, as I understand it, the format looks like "test1:test2:test3" or > "test1:test2:test3-test4:test5:test6". This ...
5 years, 4 months ago (2015-08-14 10:18:49 UTC) #33
jbudorick
5 years, 4 months ago (2015-08-14 15:43:56 UTC) #34
Message was sent while issue was closed.
https://codereview.chromium.org/574433003/diff/280001/testing/android/junit/j...
File testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java
(right):

https://codereview.chromium.org/574433003/diff/280001/testing/android/junit/j...
testing/android/junit/java/src/org/chromium/testing/local/GtestFilter.java:44:
int negIndex = sanitized.indexOf('-');
On 2015/08/14 at 10:15:43, kindrik wrote:
> Hi. Sorry, I have to add a fly in the ointment. But as I see this, I think an
error creeped in there.
> Your code first of all splits filterString to parts by colon (':').
> Then it checks each part for dash '-'. 
> This is fine for filters like this "--gtest_filter=FooTest.*-FooTest.Bar" but
> more complicated filters like
"--gtest_filter=FooTest.*-FooTest.test1:FooTest.test2:FooTest.test3" will be
treated incorrectly.
> FooTest.test2 and FooTest.test3 will be considered as positive parts. So, our
current blacklisting code is broken for JVM tests becauze it adds only one '-'
per filter.
> 
> To find out what is wrong, this code, or may be some other (our) code, I have
read
https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_a_Subset_of_t...
again and again and I see that '-' may be only one in filter string.
> 
> It say : "The format of a filter is a ':'-separated list of wildcard patterns
(called the positive patterns) optionally followed by a '-' and another
':'-separated pattern list (called the negative patterns)".
> So, as I understand it, the format looks like "test1:test2:test3" or
"test1:test2:test3-test4:test5:test6". This is how I understand it. Where's the
truth?
> 
> p.s. so I asked it here to make descision what to fix. Our blacklisting code,
or JVM filtering code.
> Thanks.

Thanks for the report. This is definitely a bug with this code. I've filed
https://code.google.com/p/chromium/issues/detail?id=520997.

Powered by Google App Engine
This is Rietveld 408576698