Bug 1254353 - Include Robocop support files. r?gps draft
authorNick Alexander <nalexander@mozilla.com>
Tue, 15 Mar 2016 16:02:01 -0700
changeset 343247 2814bcf7de05bbcf288ba65d4f9569ad45abdb3c
parent 343246 09229e4ca651d05f2e5d611047fd966b96a2036a
child 343248 afff5552080bd4c5d70ad31cd7f3f608a90b2f71
push id13570
push usernalexander@mozilla.com
push dateTue, 22 Mar 2016 04:09:57 +0000
reviewersgps
bugs1254353
milestone48.0a1
Bug 1254353 - Include Robocop support files. r?gps The initial --with-gradle support disabled building the Android test directories; everything was built from mobile/android/app/build.gradle. That doesn't declare support files that need to be packaged for Robocop tests. This patch stops building instrumentation test APKs, which aren't used in automation under any circumstance and which aren't packaged when building with Gradle; and avoids building the Robocop APK by tweaking the Makefile. That gets support files in place while not using moz.build in place of Gradle. I would have declared the support files elsewhere, but there are path requirements that I couldn't make work, so in robocop/ they stay. MozReview-Commit-ID: KCpXvqzYBsY
mobile/android/moz.build
mobile/android/tests/browser/moz.build
mobile/android/tests/browser/robocop/Makefile.in
mobile/android/tests/moz.build
--- a/mobile/android/moz.build
+++ b/mobile/android/moz.build
@@ -24,14 +24,13 @@ DIRS += [
     'app',
     'fonts',
     'geckoview_library',
 ]
 
 if CONFIG['MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER']:
     DIRS += ['bouncer'] # No ordering implied with respect to base.
 
-if not CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
-    TEST_DIRS += [
-        'tests',
-    ]
+TEST_DIRS += [
+    'tests',
+]
 
 SPHINX_TREES['fennec'] = 'docs'
--- a/mobile/android/tests/browser/moz.build
+++ b/mobile/android/tests/browser/moz.build
@@ -1,13 +1,17 @@
 # -*- 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/.
 
 MOCHITEST_CHROME_MANIFESTS += ['chrome/chrome.ini']
 
+if not CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
+    TEST_DIRS += [
+        'junit3',
+    ]
+
 TEST_DIRS += [
-    'junit3',
     'robocop/roboextender',
     'robocop',
 ]
--- a/mobile/android/tests/browser/robocop/Makefile.in
+++ b/mobile/android/tests/browser/robocop/Makefile.in
@@ -49,17 +49,19 @@ GARBAGE += \
 
 JAVAFILES += \
   $(java-harness) \
   $(java-tests) \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
+ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
 tools:: $(ANDROID_APK_NAME).apk
+endif
 
 # 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
 stumbler_jars_dir := $(DEPTH)/mobile/android/stumbler
 ANDROID_CLASSPATH_JARS += \
   $(wildcard $(jars_dir)/*.jar) \
--- a/mobile/android/tests/moz.build
+++ b/mobile/android/tests/moz.build
@@ -1,14 +1,18 @@
 # -*- 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/.
 
+if not CONFIG['MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE']:
+    TEST_DIRS += [
+        'background',
+    ]
+
 TEST_DIRS += [
-    'background',
     'browser',
     'javaaddons', # Must be built before browser/robocop/roboextender.
                   # This is enforced in config/recurse.mk.
 ]
 
 ANDROID_INSTRUMENTATION_MANIFESTS += ['browser/robocop/robocop.ini']