2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2011-12-22 06:09:41 -08:00
|
|
|
|
2013-03-19 12:34:59 -07:00
|
|
|
mobile-tests := mobile/android/base/tests
|
|
|
|
TESTPATH := $(topsrcdir)/$(mobile-tests)
|
|
|
|
dir-tests := $(DEPTH)/$(mobile-tests)
|
2011-12-22 06:09:41 -08:00
|
|
|
|
2013-06-20 11:50:28 -07:00
|
|
|
ANDROID_APK_NAME := robocop-debug
|
|
|
|
|
2013-10-01 12:43:30 -07:00
|
|
|
ANDROID_EXTRA_JARS += \
|
2013-04-10 23:53:15 -07:00
|
|
|
$(srcdir)/robotium-solo-4.3.jar \
|
2013-03-19 12:34:59 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2013-10-01 12:43:30 -07:00
|
|
|
ANDROID_ASSETS_DIR := $(TESTPATH)/assets
|
|
|
|
|
|
|
|
_JAVA_HARNESS := \
|
2011-12-30 12:57:34 -08:00
|
|
|
Actions.java \
|
|
|
|
Assert.java \
|
2011-12-22 06:09:41 -08:00
|
|
|
Driver.java \
|
|
|
|
Element.java \
|
2012-09-12 04:56:31 -07:00
|
|
|
FennecInstrumentationTestRunner.java \
|
2011-12-30 12:57:34 -08:00
|
|
|
FennecNativeActions.java \
|
2012-02-02 07:09:26 -08:00
|
|
|
FennecMochitestAssert.java \
|
|
|
|
FennecTalosAssert.java \
|
2011-12-30 12:57:34 -08:00
|
|
|
FennecNativeDriver.java \
|
2011-12-22 06:09:41 -08:00
|
|
|
FennecNativeElement.java \
|
|
|
|
RoboCopException.java \
|
2013-03-21 18:43:04 -07:00
|
|
|
RobocopUtils.java \
|
2012-03-06 12:08:45 -08:00
|
|
|
PaintedSurface.java \
|
2011-12-30 12:57:34 -08:00
|
|
|
$(NULL)
|
2011-12-22 06:09:41 -08:00
|
|
|
|
2013-11-07 08:18:51 -08:00
|
|
|
java-harness := $(addprefix $(srcdir)/,$(_JAVA_HARNESS))
|
|
|
|
java-tests := $(wildcard $(TESTPATH)/*.java)
|
|
|
|
|
|
|
|
# pre-process TestConstants.java.in
|
|
|
|
PP_TARGETS += testconstants
|
|
|
|
testconstants-dep := $(dir-tests)/TestConstants.java
|
|
|
|
testconstants := $(TESTPATH)/TestConstants.java.in
|
|
|
|
testconstants_PATH := $(dir-tests)
|
2013-03-19 12:34:59 -07:00
|
|
|
|
|
|
|
PP_TARGETS += manifest
|
|
|
|
manifest := $(srcdir)/AndroidManifest.xml.in
|
|
|
|
manifest_TARGET := AndroidManifest.xml
|
|
|
|
|
|
|
|
# Install robocop configs and helper
|
|
|
|
INSTALL_TARGETS += robocop
|
|
|
|
robocop_TARGET := libs
|
|
|
|
robocop_DEST := $(CURDIR)
|
|
|
|
robocop_FILES := \
|
|
|
|
$(TESTPATH)/robocop.ini \
|
|
|
|
$(TESTPATH)/robocop_autophone.ini \
|
|
|
|
$(NULL)
|
|
|
|
robocop-deps := $(notdir $(robocop_FILES))
|
2011-12-22 06:09:41 -08:00
|
|
|
|
2013-03-19 12:34:59 -07:00
|
|
|
MOCHITEST_ROBOCOP_FILES := \
|
2012-03-07 13:58:31 -08:00
|
|
|
$(wildcard $(TESTPATH)/*.html) \
|
2013-02-26 04:46:02 -08:00
|
|
|
$(wildcard $(TESTPATH)/*.jpg) \
|
2012-03-07 13:58:31 -08:00
|
|
|
$(wildcard $(TESTPATH)/*.sjs) \
|
2013-05-10 19:45:58 -07:00
|
|
|
$(wildcard $(TESTPATH)/test*.js) \
|
|
|
|
$(wildcard $(TESTPATH)/robocop*.js) \
|
2013-06-05 19:29:44 -07:00
|
|
|
$(wildcard $(TESTPATH)/*.xml) \
|
2012-03-07 13:58:31 -08:00
|
|
|
$(NULL)
|
2011-12-30 12:57:34 -08:00
|
|
|
|
2011-12-22 06:09:41 -08:00
|
|
|
GARBAGE += \
|
|
|
|
AndroidManifest.xml \
|
2013-03-19 12:34:59 -07:00
|
|
|
$(robocop-deps) \
|
2013-11-07 08:18:51 -08:00
|
|
|
$(testconstants-dep) \
|
2011-12-22 06:09:41 -08:00
|
|
|
$(NULL)
|
|
|
|
|
2013-10-01 12:43:30 -07:00
|
|
|
JAVAFILES += \
|
2013-11-07 08:18:51 -08:00
|
|
|
$(java-harness) \
|
|
|
|
$(java-tests) \
|
2013-10-01 12:43:30 -07:00
|
|
|
$(robocop-deps) \
|
2013-11-07 08:18:51 -08:00
|
|
|
$(testconstants-dep) \
|
2013-10-01 12:43:30 -07:00
|
|
|
$(NULL)
|
|
|
|
|
2011-12-22 06:09:41 -08:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2013-06-20 11:50:28 -07:00
|
|
|
tools:: $(ANDROID_APK_NAME).apk
|
2011-12-22 06:09:41 -08:00
|
|
|
|
2013-10-01 12:43:30 -07:00
|
|
|
GENERATED_DIRS += $(dir-tests)
|
2013-11-18 11:48:19 -08:00
|
|
|
|
|
|
|
# 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
|
|
|
|
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)
|