Bug 1258760 - Include Robocop support files when building --with-gradle. r=gps
authorNick Alexander <nalexander@mozilla.com>
Tue, 15 Mar 2016 16:02:01 -0700
changeset 289769 1ddb71cf5d35e4d72bdcb232060e2587b700881d
parent 289768 8725d09652fb8c960b651acfc31496dad64425ed
child 289770 45e593e317fbdf92795600494e2762d67ddf3b78
push id18309
push usernalexander@mozilla.com
push dateTue, 22 Mar 2016 17:27:53 +0000
treeherderfx-team@45e593e317fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1258760
milestone48.0a1
Bug 1258760 - Include Robocop support files when building --with-gradle. 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']