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

Issue 2842603002: (Reland x2) Expose resources in Robolectric/JUnit tests. (Closed)

Created:
3 years, 8 months ago by mikecase (-- gone --)
Modified:
3 years, 7 months ago
Reviewers:
nyquist, jbudorick, agrieve
CC:
agrieve+watch_chromium.org, chromium-reviews, jbudorick+watch_chromium.org, mikecase+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

(Reland x2) Expose resources in Robolectric/JUnit tests. Will let people use Android resources in Robolectric tests. To use, specify package_name GN variable in junit_binary targets with your apps package name. This change will also (basically) require that you use the generated wrappers from out_dir/bin/run_<suite name> to run the tests since GN will be generating many arguments to pass along to the test runner. BUG=693573 Review-Url: https://codereview.chromium.org/2842603002 Cr-Commit-Position: refs/heads/master@{#468822} Committed: https://chromium.googlesource.com/chromium/src/+/bc26a6f5b4ed9ee2b84878c17e8f4149db815db7

Patch Set 1 #

Patch Set 2 : MOVED resources.zip files from gen/ to obj/ folder #

Patch Set 3 : GN generate resource dirs. #

Patch Set 4 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -125 lines) Patch
M build/android/gyp/create_test_runner_script.py View 3 chunks +16 lines, -0 lines 0 comments Download
M build/android/gyp/write_build_config.py View 2 chunks +3 lines, -1 line 0 comments Download
M build/android/lint/suppressions.xml View 1 2 3 5 chunks +28 lines, -28 lines 0 comments Download
M build/android/pylib/junit/junit_test_instance.py View 3 chunks +20 lines, -0 lines 0 comments Download
M build/android/pylib/local/machine/local_machine_junit_test_run.py View 4 chunks +47 lines, -16 lines 0 comments Download
M build/android/test_runner.py View 1 chunk +15 lines, -0 lines 0 comments Download
M build/android/test_runner.pydeps View 1 chunk +1 line, -0 lines 0 comments Download
M build/config/android/internal_rules.gni View 1 2 3 2 chunks +31 lines, -2 lines 0 comments Download
M build/config/android/rules.gni View 1 2 3 8 chunks +38 lines, -5 lines 0 comments Download
M chrome/android/BUILD.gn View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/suggestions/TileGroupTest.java View 5 chunks +1 line, -56 lines 0 comments Download
M testing/android/OWNERS View 1 chunk +1 line, -0 lines 0 comments Download
M testing/android/junit/java/src/org/chromium/testing/local/GNManifestFactory.java View 1 chunk +40 lines, -11 lines 0 comments Download
M testing/android/junit/java/src/org/chromium/testing/local/LocalRobolectricTestRunner.java View 2 chunks +5 lines, -1 line 0 comments Download
M third_party/robolectric/README.chromium View 1 chunk +1 line, -5 lines 0 comments Download

Messages

Total messages: 26 (12 generated)
mikecase (-- gone --)
So, want to try landing again. Issue last time was apparently <out_dir>/gen folder is excluded ...
3 years, 8 months ago (2017-04-24 22:59:09 UTC) #3
mikecase (-- gone --)
3 years, 8 months ago (2017-04-24 23:01:02 UTC) #5
agrieve
On 2017/04/24 23:01:02, mikecase wrote: lgtm, but please add a comment to each relevant line ...
3 years, 8 months ago (2017-04-25 02:00:19 UTC) #6
mikecase (-- gone --)
On 2017/04/25 at 02:00:19, agrieve wrote: > On 2017/04/24 23:01:02, mikecase wrote: > > lgtm, ...
3 years, 8 months ago (2017-04-26 16:56:40 UTC) #7
nyquist
lgtm for my parts
3 years, 8 months ago (2017-04-26 21:33:52 UTC) #8
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/2842603002/40001
3 years, 8 months ago (2017-04-26 22:55:30 UTC) #11
jbudorick
lgtm
3 years, 8 months ago (2017-04-26 22:55:48 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/256126) android_cronet on master.tryserver.chromium.android (JOB_FAILED, ...
3 years, 8 months ago (2017-04-26 23:00:34 UTC) #14
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/2842603002/60001
3 years, 7 months ago (2017-05-02 21:08:00 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/434658)
3 years, 7 months ago (2017-05-02 22:14:22 UTC) #19
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/2842603002/60001
3 years, 7 months ago (2017-05-02 22:46:28 UTC) #21
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/bc26a6f5b4ed9ee2b84878c17e8f4149db815db7
3 years, 7 months ago (2017-05-02 23:47:57 UTC) #24
aelias_OOO_until_Jul13
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2859583004/ by aelias@chromium.org. ...
3 years, 7 months ago (2017-05-03 02:00:57 UTC) #25
mikecase (-- gone --)
3 years, 7 months ago (2017-05-03 16:45:02 UTC) #26
Message was sent while issue was closed.
looked into this. big oversite by me. the OUTDIR/obj/ directory is also excluded
when packaging builds on Android Builder (similiar to OUTDIR/gen/). I got
tricked from the fact OUTDIR/<somesubdir>/obj/ occurs in lots of places which do
get packaged.

I have no clue where I should/can put these resource_zips? I guess maybe in
gen.runtime/ directory which definitely DOES get packaged up by the Android
Builder

sry for second breakage.

Powered by Google App Engine
This is Rietveld 408576698