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
--- 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']