Closed
Bug 1219058
Opened 9 years ago
Closed 9 years ago
Normalize Robocop source layout
Categories
(Firefox Build System :: Android Studio and Gradle Integration, defect)
Firefox Build System
Android Studio and Gradle Integration
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(2 files)
Right now, the Robocop harness and source files don't have standard Java paths. It's no trouble for moz.build and Gradle, but there's no way to correct the package prefixes in IntelliJ (backed by Gradle).
This ticket tracks normalizing the source layouts.
Assignee | ||
Comment 1•9 years ago
|
||
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1219058 - Part 1: Normalize Robocop test source layout. r?gbrown,mfinkle
This moves the Robocop test code into
src/androidTest/java/org/mozilla/gecko/tests. The
src/androidTest/java is Gradle standard; the org/mozilla/gecko/tests
matches the package name we have now.
Attachment #8679750 -
Flags: review?(mark.finkle)
Attachment #8679750 -
Flags: review?(gbrown)
Assignee | ||
Comment 3•9 years ago
|
||
Bug 1219058 - Part 2: Normalize Robocop test harness source layout. r?gbrown
Pretty straight-forward. The win here is that the directory is now
sensible, so we don't need the robocop_harness symlink for the Gradle
build configuration.
Attachment #8679751 -
Flags: review?(gbrown)
Assignee | ||
Comment 4•9 years ago
|
||
Those two commits are enough to get the app/ Gradle project into the source directory, moving the Gradle and IntelliJ integration forward! I'll push that shortly.
Comment 5•9 years ago
|
||
Comment on attachment 8679750 [details]
MozReview Request: Bug 1219058 - Part 1: Normalize Robocop test source layout. r?gbrown,mfinkle
https://reviewboard.mozilla.org/r/23521/#review20979
::: mobile/android/tests/browser/robocop/robocop.ini:4
(Diff revision 1)
> -[testGeckoProfile.java]
> +[src/androidTest/java/org/mozilla/gecko/tests/testGeckoProfile.java]
Can't we be smarter about this change? Naive-Finkle thinks we could somehow add this long path prefix to the tests in the harness.
Is there a reason we can't?
Attachment #8679750 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #5)
> Comment on attachment 8679750 [details]
> MozReview Request: Bug 1219058 - Part 1: Normalize Robocop test source
> layout. r?gbrown,mfinkle
>
> https://reviewboard.mozilla.org/r/23521/#review20979
>
> ::: mobile/android/tests/browser/robocop/robocop.ini:4
> (Diff revision 1)
> > -[testGeckoProfile.java]
> > +[src/androidTest/java/org/mozilla/gecko/tests/testGeckoProfile.java]
>
> Can't we be smarter about this change? Naive-Finkle thinks we could somehow
> add this long path prefix to the tests in the harness.
>
> Is there a reason we can't?
This is long but simple. If we really care to keep this short, the best option is just to move the robocop.ini file to be next to the sources. This is the most like the rest of the tree, and isn't surprising at all. But it requires folks to look deep into the java/ hierarchy for a thing that has nothing to do with Java source code, effectively transferring the prefix to the tab-completion of your shell instead of the copy-paste-modify of your editor.
Given that we're all going to copy-paste-update this line, do we really care enough to keep this short?
As for alternative approaches: the build system expects tests to actually exist on disk (reasonably!) We could hack some prefix into the manifest parser, but it's not worth the effort.
Flags: needinfo?(mark.finkle)
Comment 7•9 years ago
|
||
Comment on attachment 8679750 [details]
MozReview Request: Bug 1219058 - Part 1: Normalize Robocop test source layout. r?gbrown,mfinkle
https://reviewboard.mozilla.org/r/23521/#review21027
I hate this. I hate moving files, for the effect on hg history. I hate long paths, 'cause I'm a command-line guy.
But I don't have a better suggestion!
Attachment #8679750 -
Flags: review?(gbrown) → review+
Comment 8•9 years ago
|
||
Comment on attachment 8679751 [details]
MozReview Request: Bug 1219058 - Part 2: Normalize Robocop test harness source layout. r?gbrown
https://reviewboard.mozilla.org/r/23523/#review21031
This leaves the robotium jar, README, and Makefile.in in build/mobile/robocop? That seems odd/unexpected. I think I'd prefer to see those remaining files also moved under mobile/android/...
Attachment #8679751 -
Flags: review?(gbrown) → review+
Assignee | ||
Comment 9•9 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #8)
> Comment on attachment 8679751 [details]
> MozReview Request: Bug 1219058 - Part 2: Normalize Robocop test harness
> source layout. r?gbrown
>
> https://reviewboard.mozilla.org/r/23523/#review21031
>
> This leaves the robotium jar, README, and Makefile.in in
> build/mobile/robocop? That seems odd/unexpected. I think I'd prefer to see
> those remaining files also moved under mobile/android/...
Aye. Eventually I'll move them and remove build/mobile/robocop.
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Geoff Brown [:gbrown] from comment #7)
> Comment on attachment 8679750 [details]
> MozReview Request: Bug 1219058 - Part 1: Normalize Robocop test source
> layout. r?gbrown,mfinkle
>
> https://reviewboard.mozilla.org/r/23521/#review21027
>
> I hate this. I hate moving files, for the effect on hg history. I hate long
> paths, 'cause I'm a command-line guy.
FTR, |mach robocop testLoad| still does what you expect.
> But I don't have a better suggestion!
Pretty much :( I don't care where the Java sources go, as long as they're in a separate directory and have the correct Java package hierarchy.
If we prefer mobile/android/robocop/src/tests, and FQNs like tests.testFoo, that's fine with me. It doesn't keep all the tests together in mobile/android/tests (which I think is valuable) and it's not Java standard, but it's short.
Comment 11•9 years ago
|
||
Comment on attachment 8679750 [details]
MozReview Request: Bug 1219058 - Part 1: Normalize Robocop test source layout. r?gbrown,mfinkle
https://reviewboard.mozilla.org/r/23521/#review21081
Thanks for addressing my comment about the long paths. Since we don't have a simple, quick fix, we can worry about it later. Onward!
Attachment #8679750 -
Flags: review+
Assignee | ||
Comment 12•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/fb5765dffe01e033113d0b013e5ae99c7cae0c74
Bug 1219058 - Part 1: Normalize Robocop test source layout. r=gbrown,mfinkle
https://hg.mozilla.org/integration/fx-team/rev/0447429a562752888423291dc5b48cd6f4c66f62
Bug 1219058 - Part 2: Normalize Robocop test harness source layout. r=gbrown
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Flags: needinfo?(mark.finkle)
Assignee | ||
Comment 13•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/47c3e7a902e5412ac0cf24ca71dabbfa6a24044c
Backed out changesets fb5765dffe01 and 0447429a5627 (Bug 1219058). r=me
Assignee | ||
Comment 14•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/e65ea991814040bcd2336b0431d9b0bb6a074d50
Bug 1219058 - Part 1: Normalize Robocop test source layout. r=gbrown,mfinkle
https://hg.mozilla.org/integration/fx-team/rev/bf8e162a3580170e5b605385c98a91a4e9f94af2
Bug 1219058 - Part 2: Normalize Robocop test harness source layout. r=gbrown
Comment 15•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/e65ea9918140
https://hg.mozilla.org/mozilla-central/rev/bf8e162a3580
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 44
Updated•5 years ago
|
Product: Firefox for Android → Firefox Build System
Target Milestone: Firefox 44 → mozilla44
You need to log in
before you can comment on or make changes to this bug.
Description
•