Backed out changeset 2d5c2f191920 (bug 863445) for breaking Android Nightlies
authorEd Morley <emorley@mozilla.com>
Mon, 13 May 2013 12:31:39 +0100
changeset 142612 2e6cfac714f666381620f767bbe42f2595769f95
parent 142611 8739db2431d070dbfc86bb71d9ae2dc6677b56e9
child 142629 d7ce9089999719d5186595d160f25123a4e63e39
child 143260 d256188763e7710c303c78fbc7a41fee92c15864
child 169845 fd52a4cb0d8454b1bb83979681bf1a596b796846
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs863445
milestone23.0a1
backs out2d5c2f19192085903b3d024e3f8530596bd61d18
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 2d5c2f191920 (bug 863445) for breaking Android Nightlies
build/mobile/robocop/Makefile.in
build/mobile/robocop/parse_ids.py
mobile/android/base/Makefile.in
mobile/android/base/fennec-ids-generator.py
testing/testsuite-targets.mk
toolkit/mozapps/installer/packager.mk
--- a/build/mobile/robocop/Makefile.in
+++ b/build/mobile/robocop/Makefile.in
@@ -59,16 +59,17 @@ 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 \
+  $(srcdir)/parse_ids.py \
   $(NULL)
 robocop-deps := $(notdir $(robocop_FILES))
 
 MOCHITEST_ROBOCOP_FILES := \
   $(wildcard $(TESTPATH)/*.html) \
   $(wildcard $(TESTPATH)/*.jpg) \
   $(wildcard $(TESTPATH)/*.sjs) \
   $(wildcard $(TESTPATH)/test*.js) \
rename from mobile/android/base/fennec-ids-generator.py
rename to build/mobile/robocop/parse_ids.py
--- a/mobile/android/base/fennec-ids-generator.py
+++ b/build/mobile/robocop/parse_ids.py
@@ -7,57 +7,58 @@ import os
 import sys
 import optparse
 
 def getFile(filename):
   fHandle = open(filename, 'r')
   data = fHandle.read()
   fHandle.close()
   return data
-
+  
 def findIDs(data):
   start_function = False
   reID = re.compile('.*public static final class id {.*')
   reEnd = re.compile('.*}.*')
   idlist = []
-
+  
   for line in data.split('\n'):
     if reEnd.match(line):
       start_function = False
-
+      
     if start_function:
       id_value = line.split(' ')[-1]
       idlist.append(id_value.split(';')[0].split('='))
-
+      
     if reID.match(line):
       start_function = True
-
+      
   return idlist
-
-
+  
+  
 def printIDs(outputFile, idlist):
   fOutput = open(outputFile, 'w')
   for item in idlist:
     fOutput.write("%s=%s\n" % (item[0], item[1]))
   fOutput.close()
 
 def main(args=sys.argv[1:]):
   parser = optparse.OptionParser()
   parser.add_option('-o', '--output', dest='outputFile', default='',
                     help="output file with the id=value pairs")
   parser.add_option('-i', '--input', dest='inputFile', default='',
                     help="filename of the input R.java file")
   options, args = parser.parse_args(args)
-
+  
   if options.inputFile == '':
     print "Error: please provide input file: -i <filename>"
     sys.exit(1)
 
   if options.outputFile == '':
     print "Error: please provide output file: -o <filename>"
     sys.exit(1)
 
   data = getFile(os.path.abspath(options.inputFile));
   idlist = findIDs(data)
   printIDs(os.path.abspath(options.outputFile), idlist)
 
 if __name__ == "__main__":
     main()
+
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -1098,20 +1098,16 @@ ALL_JARS = \
   jars/sync-thirdparty.jar \
   jars/gecko-mozglue.jar \
   $(NULL)
 
 ifdef MOZ_WEBRTC
 ALL_JARS += jars/webrtc.jar
 endif
 
-INSTALL_TARGETS += fennec_ids
-fennec_ids_FILES := fennec_ids.txt
-fennec_ids_DEST := $(DIST)
-
 include $(topsrcdir)/config/rules.mk
 
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
 
 # Note that we're going to set up a dependency directly between embed_android.dex and the java files
 # Instead of on the .class files, since more than one .class file might be produced per .java file
 # Sync dependencies are provided in a single jar. Sync classes themselves are delivered as source,
@@ -1268,16 +1264,13 @@ RES_BRANDING_DRAWABLE_MDPI = $(addprefix
 
 
 R.java: $(MOZ_APP_ICON) $(RESOURCES) $(RES_DRAWABLE) $(RES_BRANDING_DRAWABLE_MDPI) $(PP_RES_XML) res/drawable-mdpi/icon.png res/drawable-hdpi/icon.png res/drawable-xhdpi/icon.png res/drawable-xxhdpi/icon.png res/values/strings.xml AndroidManifest.xml FORCE
 	$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar -S res -J . --custom-package org.mozilla.gecko
 
 gecko.ap_: AndroidManifest.xml res/drawable-mdpi/icon.png res/drawable-hdpi/icon.png res/drawable-xhdpi/icon.png res/drawable-xxhdpi/icon.png $(RESOURCES) $(RES_DRAWABLE) $(RES_BRANDING_DRAWABLE_MDPI) $(PP_RES_XML) res/values/strings.xml FORCE
 	$(AAPT) package -f -M AndroidManifest.xml -I $(ANDROID_SDK)/android.jar  -S res -F $@
 
-fennec_ids.txt: fennec-ids-generator.py R.java
-	$(PYTHON) $(topsrcdir)/mobile/android/base/fennec-ids-generator.py -i R.java -o $@
-
 libs:: classes.dex package-name.txt jni-stubs.inc
 	$(INSTALL) classes.dex $(FINAL_TARGET)
 	$(INSTALL) package-name.txt $(FINAL_TARGET)
 	@(diff jni-stubs.inc $(topsrcdir)/mozglue/android/jni-stubs.inc >/dev/null) || \
 	 (echo "*** Error: The jni-stubs have changed. Copy $(CURDIR)/jni-stubs.inc to $(topsrcdir)/mozglue/android" && exit 1)
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -60,23 +60,21 @@ RUN_MOCHITEST_REMOTE = \
   $(PYTHON) _tests/testing/mochitest/runtestsremote.py --autorun --close-when-done \
     --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} \
     --testing-modules-dir=$(call core_abspath,_tests/modules) \
     $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 RUN_MOCHITEST_ROBOTIUM = \
   rm -f ./$@.log && \
-  $(PYTHON) _tests/testing/mochitest/runtestsremote.py \
-    --robocop-path=$(DIST) \
-    --robocop-ids=$(DIST)/fennec_ids.txt \
-    --robocop=$(DEPTH)/build/mobile/robocop/robocop.ini \
+  $(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} \
-    $(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
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \
 	  echo "$@ failed:"; \
 	  echo "$$errors"; \
           $(if $(1),echo $(1)) \
@@ -92,16 +90,17 @@ mochitest-remote:
 	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
         echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
     else \
         $(RUN_MOCHITEST_REMOTE); \
     fi
 
+mochitest-robotium: robotium-id-map
 mochitest-robotium: DM_TRANS?=adb
 mochitest-robotium:
 	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
         echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
     else \
         $(RUN_MOCHITEST_ROBOTIUM); \
@@ -431,20 +430,26 @@ make-stage-dir:
 	$(NSINSTALL) -D $(PKG_STAGE)/jetpack
 	$(NSINSTALL) -D $(PKG_STAGE)/peptest
 	$(NSINSTALL) -D $(PKG_STAGE)/mozbase
 	$(NSINSTALL) -D $(PKG_STAGE)/modules
 
 stage-b2g: make-stage-dir
 	$(NSINSTALL) $(topsrcdir)/b2g/test/b2g-unittest-requirements.txt $(PKG_STAGE)/b2g
 
+robotium-id-map:
+ifeq ($(MOZ_BUILD_APP),mobile/android)
+	$(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
 stage-mochitest: make-stage-dir
 	$(MAKE) -C $(DEPTH)/testing/mochitest stage-package
 ifeq ($(MOZ_BUILD_APP),mobile/android)
-	$(NSINSTALL) $(DIST)/fennec_ids.txt $(PKG_STAGE)/mochitest
+	$(NSINSTALL) $(DEPTH)/build/mobile/robocop/fennec_ids.txt $(PKG_STAGE)/mochitest
 endif
 
 stage-reftest: make-stage-dir
 	$(MAKE) -C $(DEPTH)/layout/tools/reftest stage-package
 
 stage-xpcshell: make-stage-dir
 	$(MAKE) -C $(DEPTH)/testing/xpcshell stage-package
 
--- a/toolkit/mozapps/installer/packager.mk
+++ b/toolkit/mozapps/installer/packager.mk
@@ -323,16 +323,18 @@ GECKO_APP_AP_PATH = $(call core_abspath,
 
 ifdef ENABLE_TESTS
 INNER_ROBOCOP_PACKAGE=echo
 ifeq ($(MOZ_BUILD_APP),mobile/android)
 UPLOAD_EXTRA_FILES += robocop.apk
 UPLOAD_EXTRA_FILES += fennec_ids.txt
 ROBOCOP_PATH = $(call core_abspath,$(_ABS_DIST)/../build/mobile/robocop)
 INNER_ROBOCOP_PACKAGE= \
+  $(PYTHON) $(abspath $(topsrcdir)/build/mobile/robocop/parse_ids.py) -i $(call core_abspath,$(DEPTH)/mobile/android/base/R.java) -o $(call core_abspath,$(DEPTH)/build/mobile/robocop/fennec_ids.txt) && \
+  $(NSINSTALL) $(call core_abspath,$(DEPTH)/build/mobile/robocop/fennec_ids.txt) $(_ABS_DIST) && \
   $(APKBUILDER) $(_ABS_DIST)/robocop-raw.apk -v $(APKBUILDER_FLAGS) -z $(ROBOCOP_PATH)/robocop.ap_ -f $(ROBOCOP_PATH)/classes.dex && \
   $(JARSIGNER) $(_ABS_DIST)/robocop-raw.apk && \
   $(ZIPALIGN) -f -v 4 $(_ABS_DIST)/robocop-raw.apk $(_ABS_DIST)/robocop.apk
 endif
 else
 INNER_ROBOCOP_PACKAGE=echo 'Testing is disabled - No Robocop for you'
 endif