Closed Bug 903534 Opened 11 years ago Closed 11 years ago

Update mobile/android build system to build Fennec instrumentation testing APK

Categories

(Android Background Services Graveyard :: Build & Test, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 27

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(3 files, 2 obsolete files)

This is the second step towards getting the android-sync JUnit 3 test suite running on TBPL.  Bug 903531 tracks landing and synchronizing our test suite into m-c.  This ticket tracks configuring the build system to build an integration testing APK (like the robocop APK) that can be distributed (like robocop) to the build bots and run as a test job.

I have some WIP code that I will attach as soon as I can excavate it.
Blocks: 903537
Hi Mike, you seem like a good person to review this, but feel free to
redirect if you prefer.  This depends on the patch from Bug 903531,
which lands the code, resources, and Makefile variables this patch
uses.
Attachment #795744 - Flags: review?(mh+mozilla)
Comment on attachment 795744 [details] [diff] [review]
Build instrumentation-tests-debug.apk. r=glandium

Review of attachment 795744 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/base/instrumentation-tests/Makefile.in
@@ +26,5 @@
> +
> +AndroidManifest.xml: AndroidManifest.xml.in
> +	$(NSINSTALL) -D $(dir $@)
> +	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
> +             $(AUTOMATION_PPARGS) -DOBJDIR="`pwd`" $(DEFINES) $(ACDEFINES) $< > $@

Please use PP_TARGETS (see config/rules.mk)

@@ +53,5 @@
> +	cp $< $@
> +	$(DEBUG_JARSIGNER) $@
> +
> +$(ANDROID_APK_NAME).apk: $(ANDROID_APK_NAME)-unaligned.apk
> +	$(ZIPALIGN) -f -v 4 $< $@

I think we have too many of these adhoc rules to create apks in the tree. Could you factor them?
Attachment #795744 - Flags: review?(mh+mozilla) → review-
Comment on attachment 795746 [details] [diff] [review]
Build and release-sign instrumentation-tests.apk. r=glandium

Review of attachment 795746 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/mozapps/installer/packager.mk
@@ +346,5 @@
> +INSTRUMENTATION_TESTS_PATH = $(call core_abspath,$(_ABS_DIST)/../mobile/android/base/instrumentation-tests)
> +INNER_INSTRUMENTATION_TESTS_PACKAGE= \
> +  cp $(INSTRUMENTATION_TESTS_PATH)/instrumentation-tests-debug-unsigned-unaligned.apk $(_ABS_DIST)/instrumentation-tests-unaligned.apk && \
> +  $(RELEASE_JARSIGNER) $(_ABS_DIST)/instrumentation-tests-unaligned.apk && \
> +  $(ZIPALIGN) -f -v 4 $(_ABS_DIST)/instrumentation-tests-unaligned.apk $(_ABS_DIST)/instrumentation-tests.apk

Same remark as the other patch. Please factor.
Attachment #795746 - Flags: review?(mh+mozilla) → review-
Depends on: 919563
Attachment #795746 - Attachment is obsolete: true
Attachment #808689 - Attachment is obsolete: true
Attachment #808690 - Flags: review?(mh+mozilla)
Comment on attachment 808688 [details] [diff] [review]
Part 1: Build background-debug.apk. r=glandium

Review of attachment 808688 [details] [diff] [review]:
-----------------------------------------------------------------

This depends on the patches for Bug 919563, and the actual code landing of Bug 903531 (for which I already have r+ from rnewman with positive feedback from mfinkle and blassey).
Attachment #808688 - Flags: review?(mh+mozilla)
Attachment #808688 - Flags: review?(mh+mozilla) → review+
Comment on attachment 808690 [details] [diff] [review]
Part 2: Build and release-sign background.apk. r=glandium

Review of attachment 808690 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/mozapps/installer/packager.mk
@@ +338,5 @@
> +
> +# $(1) is the full path to input:  foo-debug-unsigned-unaligned.apk.
> +# $(2) is the full path to output: foo.apk.
> +RELEASE_SIGN_ANDROID_APK = \
> +  cp $(1) $(2)-unaligned.apk && \

Not that this matters very much, but you may want to use $(2:.apk=) here, so that the file is not named foo.apk-unaligned.apk
Attachment #808690 - Flags: review?(mh+mozilla) → review+
https://hg.mozilla.org/integration/fx-team/rev/083bbfebdf85
https://hg.mozilla.org/integration/fx-team/rev/05c2f6e016a2
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 27
You need to log in before you can comment on or make changes to this bug.