DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (27a812186ff4)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
# 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/.

mobile-tests := mobile/android/base/tests
TESTPATH     := $(topsrcdir)/$(mobile-tests)
dir-tests    := $(DEPTH)/$(mobile-tests)

ANDROID_APK_NAME := robocop-debug

ANDROID_EXTRA_JARS += \
  $(srcdir)/robotium-solo-4.3.1.jar \
  $(NULL)

ANDROID_ASSETS_DIR := $(TESTPATH)/assets

_JAVA_HARNESS := \
  Actions.java \
  Assert.java \
  Driver.java \
  Element.java \
  FennecInstrumentationTestRunner.java \
  FennecNativeActions.java \
  FennecMochitestAssert.java \
  FennecTalosAssert.java \
  FennecNativeDriver.java \
  FennecNativeElement.java \
  RoboCopException.java \
  RobocopShare1.java \
  RobocopShare2.java \
  RobocopUtils.java \
  PaintedSurface.java \
  $(NULL)

java-harness := $(addprefix $(srcdir)/,$(_JAVA_HARNESS))
java-tests   := \
  $(wildcard $(TESTPATH)/*.java) \
  $(wildcard $(TESTPATH)/components/*.java) \
  $(wildcard $(TESTPATH)/helpers/*.java)

# pre-process TestConstants.java.in
PP_TARGETS         += testconstants
testconstants-dep  := $(dir-tests)/TestConstants.java
testconstants      := $(TESTPATH)/TestConstants.java.in
testconstants_PATH := $(dir-tests)

PP_TARGETS        += manifest
manifest          := $(srcdir)/AndroidManifest.xml.in
manifest_TARGET   := AndroidManifest.xml
ANDROID_MANIFEST_FILE := $(CURDIR)/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))

ROBOCOP_FILES := \
  $(wildcard $(TESTPATH)/*.html) \
  $(wildcard $(TESTPATH)/*.jpg) \
  $(wildcard $(TESTPATH)/*.sjs) \
  $(wildcard $(TESTPATH)/test*.js) \
  $(wildcard $(TESTPATH)/robocop*.js) \
  $(wildcard $(TESTPATH)/*.xml) \
  $(wildcard $(TESTPATH)/*.swf) \
  $(NULL)

ROBOCOP_DEST = $(DEPTH)/_tests/testing/mochitest/tests/robocop/
INSTALL_TARGETS += ROBOCOP

GARBAGE += \
  AndroidManifest.xml \
  $(robocop-deps) \
  $(testconstants-dep) \
  $(NULL)

JAVAFILES += \
  $(java-harness) \
  $(java-tests) \
  $(robocop-deps) \
  $(testconstants-dep) \
  $(NULL)

include $(topsrcdir)/config/rules.mk

tools:: $(ANDROID_APK_NAME).apk

GENERATED_DIRS += $(dir-tests)

# 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)