Wed, 31 Dec 2014 07:16:47 +0100
Revert simplistic fix pending revisit of Mozilla integration attempt.
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 mobile-tests := mobile/android/base/tests
6 TESTPATH := $(topsrcdir)/$(mobile-tests)
7 dir-tests := $(DEPTH)/$(mobile-tests)
9 ANDROID_APK_NAME := robocop-debug
11 ANDROID_EXTRA_JARS += \
12 $(srcdir)/robotium-solo-4.3.1.jar \
13 $(NULL)
15 ANDROID_ASSETS_DIR := $(TESTPATH)/assets
17 _JAVA_HARNESS := \
18 Actions.java \
19 Assert.java \
20 Driver.java \
21 Element.java \
22 FennecInstrumentationTestRunner.java \
23 FennecNativeActions.java \
24 FennecMochitestAssert.java \
25 FennecTalosAssert.java \
26 FennecNativeDriver.java \
27 FennecNativeElement.java \
28 RoboCopException.java \
29 RobocopShare1.java \
30 RobocopShare2.java \
31 RobocopUtils.java \
32 PaintedSurface.java \
33 $(NULL)
35 java-harness := $(addprefix $(srcdir)/,$(_JAVA_HARNESS))
36 java-tests := \
37 $(wildcard $(TESTPATH)/*.java) \
38 $(wildcard $(TESTPATH)/components/*.java) \
39 $(wildcard $(TESTPATH)/helpers/*.java)
41 # pre-process TestConstants.java.in
42 PP_TARGETS += testconstants
43 testconstants-dep := $(dir-tests)/TestConstants.java
44 testconstants := $(TESTPATH)/TestConstants.java.in
45 testconstants_PATH := $(dir-tests)
47 PP_TARGETS += manifest
48 manifest := $(srcdir)/AndroidManifest.xml.in
49 manifest_TARGET := AndroidManifest.xml
50 ANDROID_MANIFEST_FILE := $(CURDIR)/AndroidManifest.xml
52 # Install robocop configs and helper
53 INSTALL_TARGETS += robocop
54 robocop_TARGET := libs
55 robocop_DEST := $(CURDIR)
56 robocop_FILES := \
57 $(TESTPATH)/robocop.ini \
58 $(TESTPATH)/robocop_autophone.ini \
59 $(NULL)
60 robocop-deps := $(notdir $(robocop_FILES))
62 ROBOCOP_FILES := \
63 $(wildcard $(TESTPATH)/*.html) \
64 $(wildcard $(TESTPATH)/*.jpg) \
65 $(wildcard $(TESTPATH)/*.sjs) \
66 $(wildcard $(TESTPATH)/test*.js) \
67 $(wildcard $(TESTPATH)/robocop*.js) \
68 $(wildcard $(TESTPATH)/*.xml) \
69 $(wildcard $(TESTPATH)/*.swf) \
70 $(NULL)
72 ROBOCOP_DEST = $(DEPTH)/_tests/testing/mochitest/tests/robocop/
73 INSTALL_TARGETS += ROBOCOP
75 GARBAGE += \
76 AndroidManifest.xml \
77 $(robocop-deps) \
78 $(testconstants-dep) \
79 $(NULL)
81 JAVAFILES += \
82 $(java-harness) \
83 $(java-tests) \
84 $(robocop-deps) \
85 $(testconstants-dep) \
86 $(NULL)
88 include $(topsrcdir)/config/rules.mk
90 tools:: $(ANDROID_APK_NAME).apk
92 GENERATED_DIRS += $(dir-tests)
94 # The test APK needs to know the contents of the target APK while not
95 # being linked against them. This is a best effort to avoid getting
96 # out of sync with base's build config.
97 JARS_DIR := $(DEPTH)/mobile/android/base
98 JAVA_BOOTCLASSPATH := $(JAVA_BOOTCLASSPATH):$(subst $(NULL) ,:,$(wildcard $(JARS_DIR)/*.jar))
99 # We also want to re-compile classes.dex when the associated base
100 # content changes.
101 classes.dex: $(wildcard $(JARS_DIR)/*.jar)