|
|
Created:
4 years, 3 months ago by Bernhard Bauer Modified:
4 years, 2 months ago Reviewers:
dgn CC:
chromium-reviews, jbudorick+watch_chromium.org, mikecase+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUpdate classpath to make Robolectric JUnit tests work in Eclipse.
* Update path to hamcrest-core jar file.
* Robolectric:
- Use compiled version of robolectric_java and robolectric_utils. They use parts of the JRE library that aren't available in the Android subset, so Eclipse (building against android.jar) can't compile this from source. The compiled version works because the JUnit test target can *run* against a different version of the JRE.
- Use compiled version of shadows-core. Shadows are registered via generated classes that are not available in the source directory.
* Add missing jar files for bouncycastle, intellij-annotations, and sqlite4java (required by Robolectric).
Committed: https://crrev.com/04c4e1fd19ed47ac33d44b64ba2325a5bc0581a8
Cr-Commit-Position: refs/heads/master@{#422425}
Patch Set 1 #Patch Set 2 : x #
Total comments: 1
Patch Set 3 : docs #Patch Set 4 : x #Patch Set 5 : x #
Total comments: 1
Patch Set 6 : o #Messages
Total messages: 24 (13 generated)
The CQ bit was checked by bauerb@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Update classpath to make Robolectric JUnit tests work in Eclipse. ========== to ========== Update classpath to make Robolectric JUnit tests work in Eclipse. * Update path to hamcrest-core jar file. * Robolectric: - Use compiled version of robolectric_java and robolectric_utils. They use parts of the JRE library that aren't available in the Android subset, so Eclipse (building against android.jar) can't compile this from source. The compiled version works because the JUnit test target can *run* against a different version of the JRE. - Use compiled version of shadows-core. Shadows are registered via generated classes that are not available in the source directory. * Add missing jar files for bouncycastle, intellij-annotations, and sqlite4java (required by Robolectric). ==========
bauerb@chromium.org changed reviewers: + dgn@chromium.org
Please review. Instructions to create a JUnit test in Eclipse are forthcoming. Right now they're at https://www.chromium.org/developers/android-eclipse-dev, but we could also move that to https://chromium.googlesource.com/chromium/src.git/+/master/docs/ like we do for the Android Studio documentation. WDYT?
The CQ bit was checked by bauerb@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/09/27 09:39:02, Bernhard Bauer wrote: > Please review. > > Instructions to create a JUnit test in Eclipse are forthcoming. Right now > they're at https://www.chromium.org/developers/android-eclipse-dev, but we could > also move that to > https://chromium.googlesource.com/chromium/src.git/+/master/docs/ like we do for > the Android Studio documentation. WDYT? Now with added documentation, PTAL! (The documentation is staged at https://user.git.corp.google.com/bauerb/markdown-test/+/master/eclipse.md)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/09/30 13:59:50, Bernhard Bauer wrote: > On 2016/09/27 09:39:02, Bernhard Bauer wrote: > > Please review. > > > > Instructions to create a JUnit test in Eclipse are forthcoming. Right now > > they're at https://www.chromium.org/developers/android-eclipse-dev, but we > could > > also move that to > > https://chromium.googlesource.com/chromium/src.git/+/master/docs/ like we do > for > > the Android Studio documentation. WDYT? > > Now with added documentation, PTAL! > > (The documentation is staged at > https://user.git.corp.google.com/bauerb/markdown-test/+/master/eclipse.md) Ping? :)
On 2016/10/03 11:29:54, Bernhard Bauer wrote: > On 2016/09/30 13:59:50, Bernhard Bauer wrote: > > On 2016/09/27 09:39:02, Bernhard Bauer wrote: > > > Please review. > > > > > > Instructions to create a JUnit test in Eclipse are forthcoming. Right now > > > they're at https://www.chromium.org/developers/android-eclipse-dev, but we > > could > > > also move that to > > > https://chromium.googlesource.com/chromium/src.git/+/master/docs/ like we do > > for > > > the Android Studio documentation. WDYT? > > > > Now with added documentation, PTAL! > > > > (The documentation is staged at > > https://user.git.corp.google.com/bauerb/markdown-test/+/master/eclipse.md) > > Ping? :) 403, I don't have access to the doc :/
On 2016/10/03 11:58:20, dgn wrote: > On 2016/10/03 11:29:54, Bernhard Bauer wrote: > > On 2016/09/30 13:59:50, Bernhard Bauer wrote: > > > On 2016/09/27 09:39:02, Bernhard Bauer wrote: > > > > Please review. > > > > > > > > Instructions to create a JUnit test in Eclipse are forthcoming. Right now > > > > they're at https://www.chromium.org/developers/android-eclipse-dev, but we > > > could > > > > also move that to > > > > https://chromium.googlesource.com/chromium/src.git/+/master/docs/ like we > do > > > for > > > > the Android Studio documentation. WDYT? > > > > > > Now with added documentation, PTAL! > > > > > > (The documentation is staged at > > > https://user.git.corp.google.com/bauerb/markdown-test/+/master/eclipse.md) > > > > Ping? :) > > 403, I don't have access to the doc :/ Access granted, sorry.
lgtm. Thanks for porting the doc to markdown! For the classpath, the unit tests that use Mockito still break but at least we can run unit tests again. https://codereview.chromium.org/2341093002/diff/20001/tools/android/eclipse/.... File tools/android/eclipse/.classpath (right): https://codereview.chromium.org/2341093002/diff/20001/tools/android/eclipse/.... tools/android/eclipse/.classpath:115: <classpathentry kind="src" path="third_party/robolectric/robolectric/robolectric-annotations/src/main/java"/> I get a merge conflict when patching in: <<<<<<< ours <classpathentry kind="src" path="third_party/robolectric/robolectric/robolectric-shadows/shadows-core/src/main/java"/> <classpathentry kind="src" path="third_party/robolectric/robolectric/robolectric-utils/src/main/java"/> ======= >>>>>>> theirs https://codereview.chromium.org/2341093002/diff/80001/docs/eclipse.md File docs/eclipse.md (right): https://codereview.chromium.org/2341093002/diff/80001/docs/eclipse.md#newcode6 docs/eclipse.md:6: *** note That's really neat! However I couldn't find the documentation for it. Where can I have a look at the markdown extensions in gitiles? go/g3doc-callouts lists different ways to do that.
On 2016/10/03 15:04:06, dgn wrote: > lgtm. Thanks for porting the doc to markdown! > > For the classpath, the unit tests that use Mockito still break but at least we > can run unit tests again. > > https://codereview.chromium.org/2341093002/diff/20001/tools/android/eclipse/.... > File tools/android/eclipse/.classpath (right): > > https://codereview.chromium.org/2341093002/diff/20001/tools/android/eclipse/.... > tools/android/eclipse/.classpath:115: <classpathentry kind="src" > path="third_party/robolectric/robolectric/robolectric-annotations/src/main/java"/> > I get a merge conflict when patching in: > > <<<<<<< ours > <classpathentry kind="src" > path="third_party/robolectric/robolectric/robolectric-shadows/shadows-core/src/main/java"/> > <classpathentry kind="src" > path="third_party/robolectric/robolectric/robolectric-utils/src/main/java"/> > ======= > >>>>>>> theirs Which patch set did you try? I justed merged with master, which applied cleanly. I also tried the ntp.cards JUnit tests, and they succeeded (I had already added ByteBuddy to the classpath, but wasn't sure whether that was in the latest patch set). > https://codereview.chromium.org/2341093002/diff/80001/docs/eclipse.md > File docs/eclipse.md (right): > > https://codereview.chromium.org/2341093002/diff/80001/docs/eclipse.md#newcode6 > docs/eclipse.md:6: *** note > That's really neat! However I couldn't find the documentation for it. Where can > I have a look at the markdown extensions in gitiles? go/g3doc-callouts lists > different ways to do that. https://gerrit.googlesource.com/gitiles/+/master/Documentation/markdown.md#No... is where I found this.
The CQ bit was checked by bauerb@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/10/03 15:09:15, Bernhard Bauer wrote: > On 2016/10/03 15:04:06, dgn wrote: > > lgtm. Thanks for porting the doc to markdown! > > > > For the classpath, the unit tests that use Mockito still break but at least we > > can run unit tests again. > > > > > https://codereview.chromium.org/2341093002/diff/20001/tools/android/eclipse/.... > > File tools/android/eclipse/.classpath (right): > > > > > https://codereview.chromium.org/2341093002/diff/20001/tools/android/eclipse/.... > > tools/android/eclipse/.classpath:115: <classpathentry kind="src" > > > path="third_party/robolectric/robolectric/robolectric-annotations/src/main/java"/> > > I get a merge conflict when patching in: > > > > <<<<<<< ours > > <classpathentry kind="src" > > > path="third_party/robolectric/robolectric/robolectric-shadows/shadows-core/src/main/java"/> > > <classpathentry kind="src" > > path="third_party/robolectric/robolectric/robolectric-utils/src/main/java"/> > > ======= > > >>>>>>> theirs > > Which patch set did you try? I justed merged with master, which applied cleanly. > I also tried the ntp.cards JUnit tests, and they succeeded (I had already added > ByteBuddy to the classpath, but wasn't sure whether that was in the latest patch > set). Oh the merge conflict is from an older patch set, I forgot to remove that from my drafts.
Message was sent while issue was closed.
Description was changed from ========== Update classpath to make Robolectric JUnit tests work in Eclipse. * Update path to hamcrest-core jar file. * Robolectric: - Use compiled version of robolectric_java and robolectric_utils. They use parts of the JRE library that aren't available in the Android subset, so Eclipse (building against android.jar) can't compile this from source. The compiled version works because the JUnit test target can *run* against a different version of the JRE. - Use compiled version of shadows-core. Shadows are registered via generated classes that are not available in the source directory. * Add missing jar files for bouncycastle, intellij-annotations, and sqlite4java (required by Robolectric). ========== to ========== Update classpath to make Robolectric JUnit tests work in Eclipse. * Update path to hamcrest-core jar file. * Robolectric: - Use compiled version of robolectric_java and robolectric_utils. They use parts of the JRE library that aren't available in the Android subset, so Eclipse (building against android.jar) can't compile this from source. The compiled version works because the JUnit test target can *run* against a different version of the JRE. - Use compiled version of shadows-core. Shadows are registered via generated classes that are not available in the source directory. * Add missing jar files for bouncycastle, intellij-annotations, and sqlite4java (required by Robolectric). ==========
Message was sent while issue was closed.
Committed patchset #6 (id:100001)
Message was sent while issue was closed.
Description was changed from ========== Update classpath to make Robolectric JUnit tests work in Eclipse. * Update path to hamcrest-core jar file. * Robolectric: - Use compiled version of robolectric_java and robolectric_utils. They use parts of the JRE library that aren't available in the Android subset, so Eclipse (building against android.jar) can't compile this from source. The compiled version works because the JUnit test target can *run* against a different version of the JRE. - Use compiled version of shadows-core. Shadows are registered via generated classes that are not available in the source directory. * Add missing jar files for bouncycastle, intellij-annotations, and sqlite4java (required by Robolectric). ========== to ========== Update classpath to make Robolectric JUnit tests work in Eclipse. * Update path to hamcrest-core jar file. * Robolectric: - Use compiled version of robolectric_java and robolectric_utils. They use parts of the JRE library that aren't available in the Android subset, so Eclipse (building against android.jar) can't compile this from source. The compiled version works because the JUnit test target can *run* against a different version of the JRE. - Use compiled version of shadows-core. Shadows are registered via generated classes that are not available in the source directory. * Add missing jar files for bouncycastle, intellij-annotations, and sqlite4java (required by Robolectric). Committed: https://crrev.com/04c4e1fd19ed47ac33d44b64ba2325a5bc0581a8 Cr-Commit-Position: refs/heads/master@{#422425} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/04c4e1fd19ed47ac33d44b64ba2325a5bc0581a8 Cr-Commit-Position: refs/heads/master@{#422425} |