Bug 903534 - Part 1: Build background-debug.apk. r=glandium
authorNick Alexander <nalexander@mozilla.com>
Tue, 01 Oct 2013 12:43:30 -0700
changeset 149585 083bbfebdf8567c895d93f1d5ce8817d618c495b
parent 149584 a1e6919bff63e2582bc3325c1fcbcef1c70bf1d3
child 149586 05c2f6e016a2a6bfcaa4495cd8b097c8bd687856
push id34607
push userkwierso@gmail.com
push dateWed, 02 Oct 2013 01:54:57 +0000
treeherdermozilla-inbound@3b4383185c50 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs903534
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 903534 - Part 1: Build background-debug.apk. r=glandium
mobile/android/moz.build
mobile/android/tests/background/junit3/AndroidManifest.xml.in
mobile/android/tests/background/junit3/Makefile.in
mobile/android/tests/background/junit3/moz.build
mobile/android/tests/background/moz.build
mobile/android/tests/moz.build
--- a/mobile/android/moz.build
+++ b/mobile/android/moz.build
@@ -17,8 +17,11 @@ DIRS += [
     'app',
     'fonts',
     'geckoview_library',
 ]
 
 if not CONFIG['LIBXUL_SDK']:
     PARALLEL_DIRS += ['../../xulrunner/tools/redit']
 
+TEST_DIRS += [
+    'tests',
+]
--- a/mobile/android/tests/background/junit3/AndroidManifest.xml.in
+++ b/mobile/android/tests/background/junit3/AndroidManifest.xml.in
@@ -10,17 +10,17 @@
               android:targetSdkVersion="14" />
 
     <uses-permission android:name="@ANDROID_BACKGROUND_TARGET_PACKAGE_NAME@.permissions.BROWSER_PROVIDER"/>
     <uses-permission android:name="@ANDROID_BACKGROUND_TARGET_PACKAGE_NAME@.permissions.FORMHISTORY_PROVIDER"/>
     <uses-permission android:name="@ANDROID_BACKGROUND_TARGET_PACKAGE_NAME@.permissions.PASSWORD_PROVIDER"/>
 
     <application
         android:icon="@drawable/icon"
-        android:label="@string/app_name" >
+        android:label="@ANDROID_BACKGROUND_APP_DISPLAYNAME@">
         <uses-library android:name="android.test.runner" />
     </application>
 
 
     <instrumentation
         android:label="@string/app_name"
         android:name="android.test.InstrumentationTestRunner"
         android:targetPackage="@ANDROID_BACKGROUND_TARGET_PACKAGE_NAME@" />
new file mode 100644
--- /dev/null
+++ b/mobile/android/tests/background/junit3/Makefile.in
@@ -0,0 +1,37 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ANDROID_APK_NAME := background-debug
+
+PP_TARGETS        += manifest
+manifest          := $(srcdir)/AndroidManifest.xml.in
+manifest_TARGET   := AndroidManifest.xml
+manifest_FLAGS    += \
+  -DANDROID_BACKGROUND_TARGET_PACKAGE_NAME="$(ANDROID_PACKAGE_NAME)" \
+  -DANDROID_BACKGROUND_TEST_PACKAGE_NAME="org.mozilla.background.test" \
+  -DANDROID_BACKGROUND_APP_DISPLAYNAME="$(MOZ_APP_DISPLAYNAME) Background Tests" \
+  -DMOZ_ANDROID_SHARED_ID="$(ANDROID_PACKAGE_NAME).sharedID" \
+  -DMOZ_ANDROID_SHARED_ACCOUNT_TYPE="$(ANDROID_PACKAGE_NAME)_sync" \
+  $(NULL)
+
+GARBAGE += AndroidManifest.xml
+
+include $(srcdir)/android-services-files.mk
+
+# BACKGROUND_TESTS_{JAVA,RES}_FILES are defined in android-services-files.mk.
+JAVAFILES := $(BACKGROUND_TESTS_JAVA_FILES)
+ANDROID_RESFILES := $(BACKGROUND_TESTS_RES_FILES)
+
+# The test APK needs to know the contents of the target APK while not
+# being linked against them.  This is a best effort to avoid getting
+# out of sync with base's build config.
+JARS_DIR := $(DEPTH)/mobile/android/base/jars
+JAVA_BOOTCLASSPATH := $(JAVA_BOOTCLASSPATH):$(subst $(NULL) ,:,$(wildcard $(JARS_DIR)/*.jar))
+# We also want to re-compile classes.dex when the associated base
+# content changes.
+classes.dex: $(wildcard $(JARS_DIR)/*.jar)
+
+tools:: $(ANDROID_APK_NAME).apk
+
+include $(topsrcdir)/config/rules.mk
copy from mobile/android/moz.build
copy to mobile/android/tests/background/junit3/moz.build
--- a/mobile/android/moz.build
+++ b/mobile/android/tests/background/junit3/moz.build
@@ -1,24 +1,5 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-CONFIGURE_SUBST_FILES += ['installer/Makefile']
-
-DIRS += [
-    '../locales',
-    'locales',
-    'base',
-    'chrome',
-    'components',
-    'modules',
-    'themes/core',
-    'app',
-    'fonts',
-    'geckoview_library',
-]
-
-if not CONFIG['LIBXUL_SDK']:
-    PARALLEL_DIRS += ['../../xulrunner/tools/redit']
-
copy from mobile/android/moz.build
copy to mobile/android/tests/background/moz.build
--- a/mobile/android/moz.build
+++ b/mobile/android/tests/background/moz.build
@@ -1,24 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-CONFIGURE_SUBST_FILES += ['installer/Makefile']
-
-DIRS += [
-    '../locales',
-    'locales',
-    'base',
-    'chrome',
-    'components',
-    'modules',
-    'themes/core',
-    'app',
-    'fonts',
-    'geckoview_library',
+TEST_DIRS += [
+    'junit3',
 ]
-
-if not CONFIG['LIBXUL_SDK']:
-    PARALLEL_DIRS += ['../../xulrunner/tools/redit']
-
copy from mobile/android/moz.build
copy to mobile/android/tests/moz.build
--- a/mobile/android/moz.build
+++ b/mobile/android/tests/moz.build
@@ -1,24 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-CONFIGURE_SUBST_FILES += ['installer/Makefile']
-
-DIRS += [
-    '../locales',
-    'locales',
-    'base',
-    'chrome',
-    'components',
-    'modules',
-    'themes/core',
-    'app',
-    'fonts',
-    'geckoview_library',
+TEST_DIRS += [
+    'background',
 ]
-
-if not CONFIG['LIBXUL_SDK']:
-    PARALLEL_DIRS += ['../../xulrunner/tools/redit']
-