Closed
Bug 905703
Opened 12 years ago
Closed 11 years ago
Don't pre-process build/mobile/robocop/*java.in and mobile/android/base/tests/*java.in
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 28
People
(Reporter: nalexander, Assigned: bnicholson)
References
Details
Attachments
(2 files)
60.40 KB,
patch
|
nalexander
:
review+
|
Details | Diff | Splinter Review |
9.15 KB,
patch
|
nalexander
:
review+
|
Details | Diff | Splinter Review |
At the moment, the contents of build/mobile/robocop/*java.in are preprocessed before building robocop.apk. The only preprocessor directive is #filter substitution, and the only substitution is @ANDROID_PACKAGE_NAME@. I'd like to get rid of this pre-processing step, to simplify the build process.
This discussion is complicated by the use of "package" to mean Android package (what is shown in the Play store, for example) and also to mean Java package (used by the system class loader).
The name of the Java package in robocop.apk does not need to be the same as the Android package under test, or of the Java package providing the code in that Android package. See, for example, the example test project from http://code.google.com/p/robotium/wiki/Getting_Started: the Java and Android packages under test are "com.example.android.notepad"; the robotium Android and Java packages are "com.jayway.test", and the relevant test manifest line is
<instrumentation android:targetPackage="com.example.android.notepad" android:name="android.test.InstrumentationTestRunner" />
I think we can simplify this whole build process by making the robocop Java package name match the Android package name: "org.mozilla.roboexample.test".
This will require updating some of the imports in mobile/android/base/tests, but I don't see this as a big issue.
If I were to implement this, I would move the contents of build/mobile/robocop into mobile/android/base/tests.
Reporter | ||
Comment 1•12 years ago
|
||
mfinkle: blassey: gbrown: jmaher: this is a scatter-shot call for comments. Am I missing context here? Is my understanding of robotium wrong? I'd rather not dive into this rabbit hole if it's deep.
I should add that simplifying the robocop build process will help pave the way for a mooted sibling test harness (Bug 709353), and provide the Fennec team a clearer view into how robocop is built and operates.
Flags: needinfo?(mark.finkle)
Flags: needinfo?(jmaher)
Flags: needinfo?(gbrown)
Flags: needinfo?(blassey.bugs)
![]() |
||
Comment 2•12 years ago
|
||
I believe the ANDROID_PACKAGE_NAME pre-dates my robocop involvement: It feels like it has always been there and I haven't investigated since it wasn't bothering me. I suspect that it is possible to remove our ANDROID_PACKAGE_NAME dependence; I'm not sure it will be easy.
Flags: needinfo?(gbrown)
Comment 3•12 years ago
|
||
I was under the impressions the android security model required the robotium app to have the same name as the application under test.
If it works just fine without the application name, I fully support removing the filter substitution and .in filenames! luckily we have try server to test this on:)
Flags: needinfo?(jmaher)
Comment 4•12 years ago
|
||
Same as joel, if it doesn't break things, feel free to change it.
One scenario to test though, is running robocop tests on nightly and private builds on the same device.
Flags: needinfo?(blassey.bugs)
Comment 5•12 years ago
|
||
I can't offer any insight on why ANDROID_PACKAGE_NAME is used in the tests, but would also be happy to see less preprocessing.
Flags: needinfo?(mark.finkle)
Assignee | ||
Comment 7•11 years ago
|
||
Assignee: nobody → bnicholson
Status: NEW → ASSIGNED
Assignee | ||
Comment 8•11 years ago
|
||
This patch simply does the dirty work of renaming *.java.in -> *.java, and changes package declarations/imports from org.mozilla.fennec_X -> org.mozilla.gecko.
Note to self: Check for any new *.java.in files in tests/ that may have been added before landing this.
Attachment #820057 -
Flags: review?(nalexander)
Assignee | ||
Comment 9•11 years ago
|
||
This patch contains the remaining changes. I separated this from the first patch only to aid review; this should be folded with the first patch before landing.
We might want to different packages, especially for the harness classes (which are currently just using org.mozilla.gecko). We can do this in a follow-up, or I can make those changes now if you already have a package structure in mind. Same goes for moving these files somewhere else.
Attachment #820062 -
Flags: review?(nalexander)
Assignee | ||
Updated•11 years ago
|
Reporter | ||
Comment 10•11 years ago
|
||
Comment on attachment 820057 [details] [diff] [review]
Rename files and fix imports/packages
Review of attachment 820057 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm. I would like to move this stuff into mobile/android/tests and improve the build system pieces, but that can be follow up.
Attachment #820057 -
Flags: review?(nalexander) → review+
Reporter | ||
Comment 11•11 years ago
|
||
Comment on attachment 820062 [details] [diff] [review]
Additional changes (to be squashed)
Review of attachment 820062 [details] [diff] [review]:
-----------------------------------------------------------------
lgtm.
Attachment #820062 -
Flags: review?(nalexander) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Assignee | ||
Comment 13•11 years ago
|
||
Argh, forgot to check talos tests on try. Backed out: https://hg.mozilla.org/integration/fx-team/rev/1b166374191c
Assignee | ||
Comment 14•11 years ago
|
||
NEEDINFOing Joel since he said he'd look into updating the Talos tests.
Flags: needinfo?(jmaher)
Reporter | ||
Comment 16•11 years ago
|
||
Reporter | ||
Comment 17•11 years ago
|
||
I am working up a new try build with the patch from Bug 930188. If it's green, we land ASAP since this is blocking build improvements left, right, and center.
Reporter | ||
Comment 18•11 years ago
|
||
Reporter | ||
Comment 19•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•