Backout 119c60543071 (bug 751156) for robocop failures

This commit is contained in:
Ed Morley 2013-01-03 18:12:36 +00:00
parent 2f67b066ae
commit f14bf64427
8 changed files with 42 additions and 55 deletions

View File

@ -6,9 +6,7 @@ DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
mobile-tests := mobile/android/base/tests
TESTPATH := $(topsrcdir)/$(mobile-tests)
TESTPATH = $(topsrcdir)/mobile/android/base/tests
include $(DEPTH)/config/autoconf.mk
@ -34,35 +32,22 @@ _JAVA_HARNESS = \
PaintedSurface.java \
$(NULL)
# CURDIR := $(DEPTH)/build/mobile/robocop
dir-res := $(CURDIR)/res
dir-tests := $(DEPTH)/$(mobile-tests)
_JAVA_TESTS = $(patsubst $(TESTPATH)/%.in,%,$(wildcard $(TESTPATH)/*.java.in))
# preprocessing deps
java-harness := $(addprefix $(srcdir)/,$(addsuffix .in,$(_JAVA_HARNESS)))
java-harness-dep := $(addprefix $(CURDIR)/,$(_JAVA_HARNESS))
java-harness_PATH := $(CURDIR)
PP_TARGETS += java-harness
java-tests-src := $(wildcard $(TESTPATH)/*.java.in)
java-tests-dep := $(patsubst $(TESTPATH)/%.java.in,$(dir-tests)/%.java,$(java-tests-src))
java-tests := $(java-tests-src)
java-tests_PATH := $(dir-tests)
PP_TARGETS += java-tests
PP_TARGETS += manifest
manifest := $(srcdir)/AndroidManifest.xml.in
manifest_TARGET := AndroidManifest.xml
MOCHITEST_ROBOCOP_FILES := \
_TEST_FILES = \
$(wildcard $(TESTPATH)/*.html) \
$(wildcard $(TESTPATH)/*.sjs) \
$(NULL)
_ROBOCOP_TOOLS = \
$(TESTPATH)/robocop.ini \
parse_ids.py \
$(NULL)
GARBAGE += \
AndroidManifest.xml \
$(java-tests) \
$(_JAVA_HARNESS) \
_JAVA_TESTS \
_JAVA_HARNESS \
classes.dex \
robocop.apk \
robocop.ap_ \
@ -83,19 +68,41 @@ include $(topsrcdir)/config/rules.mk
# Override rules.mk java flags with the android specific ones
include $(topsrcdir)/config/android-common.mk
$(_JAVA_HARNESS): % : %.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $< > $@
AndroidManifest.xml: % : %.in
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $< > $@
$(_JAVA_TESTS): % : $(TESTPATH)/%.in
$(NSINSTALL) -D $(DEPTH)/mobile/android/base/tests
$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(DEFINES) $< > $(DEPTH)/mobile/android/base/tests/$@
$(_ROBOCOP_TOOLS):
cp $(TESTPATH)/robocop.ini robocop.ini
libs:: $(_TEST_FILES)
$(NSINSTALL) -D $(DEPTH)/_tests/testing/mochitest/tests/robocop
$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/robocop/
tools:: robocop.apk
classes.dex: robocop.ap_
classes.dex: $(call mkdir_deps,classes)
classes.dex: $(java-harness-dep)
classes.dex: $(java-tests-dep)
$(JAVAC) $(JAVAC_FLAGS) -d classes $(JAVAFILES) $(_JAVA_HARNESS) $(java-tests-dep)
classes.dex: $(_ROBOCOP_TOOLS)
classes.dex: $(_JAVA_HARNESS)
classes.dex: $(_JAVA_TESTS)
$(NSINSTALL) -D classes
$(JAVAC) $(JAVAC_FLAGS) -d classes $(JAVAFILES) $(_JAVA_HARNESS) $(addprefix $(DEPTH)/mobile/android/base/tests/,$(_JAVA_TESTS))
$(DX) --dex --output=$@ classes $(ROBOTIUM_PATH) $(ANDROID_COMPT_LIB)
robocop.ap_: AndroidManifest.xml $(TESTPATH)/assets/*
$(AAPT) package -f -M $< -I $(ANDROID_SDK)/android.jar -I . -S res -A $(TESTPATH)/assets -F $@ -J ./
$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -I . -S res -A $(TESTPATH)/assets -F $@ -J ./
robocop.apk: robocop.ap_ classes.dex
cp $(TESTPATH)/robocop.ini robocop.ini
cp $(srcdir)/parse_ids.py parse_ids.py
export::
$(NSINSTALL) -D res
@(cd $(srcdir)/res && tar $(TAR_CREATE_FLAGS) - *) | (cd $(DEPTH)/build/mobile/robocop/res && tar -xf -)
export:: $(call mkdir_deps,$(dir-res))
$(call copy_dir,$(srcdir)/res,$(dir-res))

View File

@ -112,7 +112,3 @@ topORerr =$(if $(topsrcdir),$(topsrcdir),$(error topsrcdir is not defined))
ifdef USE_AUTOTARGETS_MK # mkdir_deps
include $(topORerr)/config/makefiles/autotargets.mk
endif
## copy(src, dst): recursive copy
## rsync could selectively copy but cmd not available on windows
copy_dir = (cd $(1)/. && $(TAR) $(TAR_CREATE_FLAGS_QUIET) - .) | (cd $(2)/. && tar -xf -)

View File

@ -51,10 +51,6 @@ ifdef MOCHITEST_A11Y_FILES
$(eval $(call mochitest-libs-rule-template,MOCHITEST_A11Y_FILES,a11y))
endif
ifdef MOCHITEST_ROBOCOP_FILES
$(eval $(call mochitest-libs-rule-template,MOCHITEST_ROBOCOP_FILES,tests/robocop))
endif
ifdef MOCHITEST_WEBAPPRT_CHROME_FILES
$(eval $(call mochitest-libs-rule-template,MOCHITEST_WEBAPPRT_CHROME_FILES,webapprtChrome))
endif

View File

@ -1692,7 +1692,6 @@ FREEZE_VARIABLES = \
MOCHITEST_BROWSER_FILES \
MOCHITEST_BROWSER_FILES_PARTS \
MOCHITEST_A11Y_FILES \
MOCHITEST_ROBOCOP_FILES \
MOCHITEST_WEBAPPRT_CHROME_FILES \
$(NULL)

View File

@ -112,7 +112,3 @@ topORerr =$(if $(topsrcdir),$(topsrcdir),$(error topsrcdir is not defined))
ifdef USE_AUTOTARGETS_MK # mkdir_deps
include $(topORerr)/config/makefiles/autotargets.mk
endif
## copy(src, dst): recursive copy
## rsync could selectively copy but cmd not available on windows
copy_dir = (cd $(1)/. && $(TAR) $(TAR_CREATE_FLAGS_QUIET) - .) | (cd $(2)/. && tar -xf -)

View File

@ -51,10 +51,6 @@ ifdef MOCHITEST_A11Y_FILES
$(eval $(call mochitest-libs-rule-template,MOCHITEST_A11Y_FILES,a11y))
endif
ifdef MOCHITEST_ROBOCOP_FILES
$(eval $(call mochitest-libs-rule-template,MOCHITEST_ROBOCOP_FILES,tests/robocop))
endif
ifdef MOCHITEST_WEBAPPRT_CHROME_FILES
$(eval $(call mochitest-libs-rule-template,MOCHITEST_WEBAPPRT_CHROME_FILES,webapprtChrome))
endif

View File

@ -1692,7 +1692,6 @@ FREEZE_VARIABLES = \
MOCHITEST_BROWSER_FILES \
MOCHITEST_BROWSER_FILES_PARTS \
MOCHITEST_A11Y_FILES \
MOCHITEST_ROBOCOP_FILES \
MOCHITEST_WEBAPPRT_CHROME_FILES \
$(NULL)

View File

@ -55,13 +55,11 @@ RUN_MOCHITEST_REMOTE = \
RUN_MOCHITEST_ROBOTIUM = \
rm -f ./$@.log && \
$(PYTHON) _tests/testing/mochitest/runtestsremote.py \
--robocop-path=$(DEPTH)/dist \
$(PYTHON) _tests/testing/mochitest/runtestsremote.py --robocop-path=$(DEPTH)/dist \
--robocop-ids=$(DEPTH)/build/mobile/robocop/fennec_ids.txt \
--console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
--app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
--robocop=$(topsrcdir)/mobile/android/base/tests/robocop.ini \
$(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
--robocop=$(DEPTH)/build/mobile/robocop/robocop.ini $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
ifndef NO_FAIL_ON_TEST_ERRORS
define check_test_error_internal
@ -381,7 +379,7 @@ make-stage-dir:
robotium-id-map:
ifeq ($(MOZ_BUILD_APP),mobile/android)
$(PYTHON) $(topsrcdir)/build/mobile/robocop/parse_ids.py -i $(DEPTH)/mobile/android/base/R.java -o $(DEPTH)/build/mobile/robocop/fennec_ids.txt
$(PYTHON) $(DEPTH)/build/mobile/robocop/parse_ids.py -i $(DEPTH)/mobile/android/base/R.java -o $(DEPTH)/build/mobile/robocop/fennec_ids.txt
endif
stage-mochitest: robotium-id-map