Backed out changeset 611c81436abe (bug 863445)
authorEd Morley <emorley@mozilla.com>
Mon, 13 May 2013 12:31:13 +0100
changeset 142611 8739db2431d070dbfc86bb71d9ae2dc6677b56e9
parent 142610 6d8a73f77af35ef3f4eaa72bcd7c0e098dfd1c40
child 142612 2e6cfac714f666381620f767bbe42f2595769f95
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 out611c81436abea784c03905f66711a14ca8e914b5
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 611c81436abe (bug 863445)
testing/mochitest/runtestsremote.py
testing/testsuite-targets.mk
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -75,34 +75,24 @@ class RemoteOptions(MochitestOptions):
                     help = "ssl port of the remote web server")
         defaults["sslPort"] = automation.DEFAULT_SSL_PORT
 
         self.add_option("--pidfile", action = "store",
                     type = "string", dest = "pidFile",
                     help = "name of the pidfile to generate")
         defaults["pidFile"] = ""
 
-        self.add_option("--robocop-ini", action = "store",
-                    type = "string", dest = "robocopIni",
-                    help = "name of the .ini file containing the list of tests to run")
-        defaults["robocopIni"] = ""
-
         self.add_option("--robocop", action = "store",
                     type = "string", dest = "robocop",
-                    help = "name of the .ini file containing the list of tests to run. [DEPRECATED- please use --robocop-ini")
+                    help = "name of the .ini file containing the list of tests to run")
         defaults["robocop"] = ""
 
-        self.add_option("--robocop-apk", action = "store",
-                    type = "string", dest = "robocopApk",
-                    help = "name of the Robocop APK to use for ADB test running")
-        defaults["robocopApk"] = ""
-
         self.add_option("--robocop-path", action = "store",
                     type = "string", dest = "robocopPath",
-                    help = "Path to the folder where robocop.apk is located at.  Primarily used for ADB test running. [DEPRECATED- please use --robocop-apk]")
+                    help = "Path to the folder where robocop.apk is located at.  Primarily used for ADB test running")
         defaults["robocopPath"] = ""
 
         self.add_option("--robocop-ids", action = "store",
                     type = "string", dest = "robocopIds",
                     help = "name of the file containing the view ID map (fennec_ids.txt)")
         defaults["robocopIds"] = ""
 
         self.add_option("--remoteTestRoot", action = "store",
@@ -163,47 +153,32 @@ class RemoteOptions(MochitestOptions):
             else:
                 options.xrePath = options.utilityPath
 
         if (options.pidFile != ""):
             f = open(options.pidFile, 'w')
             f.write("%s" % os.getpid())
             f.close()
 
-        # Robocop specific deprecated options.
-        if options.robocop:
-            if options.robocopIni:
-                print "ERROR: can not use deprecated --robocop and replacement --robocop-ini together"
-                return None
-            options.robocopIni = options.robocop
-            del options.robocop
-
-        if options.robocopPath:
-            if options.robocopApk:
-                print "ERROR: can not use deprecated --robocop-path and replacement --robocop-apk together"
+        # Robocop specific options
+        if options.robocop != "":
+            if not os.path.exists(options.robocop):
+                print "ERROR: Unable to find specified manifest '%s'" % options.robocop
                 return None
-            options.robocopApk = os.path.join(options.robocopPath, 'robocop.apk')
-            del options.robocopPath
+            options.robocop = os.path.abspath(options.robocop)
 
-        # Robocop specific options
-        if options.robocopIni != "":
-            if not os.path.exists(options.robocopIni):
-                print "ERROR: Unable to find specified robocop .ini manifest '%s'" % options.robocopIni
+        if options.robocopPath != "":
+            if not os.path.exists(os.path.join(options.robocopPath, 'robocop.apk')):
+                print "ERROR: Unable to find robocop.apk in path '%s'" % options.robocopPath
                 return None
-            options.robocopIni = os.path.abspath(options.robocopIni)
-
-        if options.robocopApk != "":
-            if not os.path.exists(options.robocopApk):
-                print "ERROR: Unable to find robocop APK '%s'" % options.robocopApk
-                return None
-            options.robocopApk = os.path.abspath(options.robocopApk)
+            options.robocopPath = os.path.abspath(options.robocopPath)
 
         if options.robocopIds != "":
             if not os.path.exists(options.robocopIds):
-                print "ERROR: Unable to find specified robocop IDs file '%s'" % options.robocopIds
+                print "ERROR: Unable to find specified IDs file '%s'" % options.robocopIds
                 return None
             options.robocopIds = os.path.abspath(options.robocopIds)
 
         # allow us to keep original application around for cleanup while running robocop via 'am'
         options.remoteappname = options.app
         return options
 
     def verifyOptions(self, options, mochitest):
@@ -328,17 +303,17 @@ class MochiRemote(Mochitest):
     def buildProfile(self, options):
         if self.localProfile:
             options.profilePath = self.localProfile
         manifest = Mochitest.buildProfile(self, options)
         self.localProfile = options.profilePath
         self._dm.removeDir(self.remoteProfile)
 
         # we do not need this for robotium based tests, lets save a LOT of time
-        if options.robocopIni:
+        if options.robocop:
             shutil.rmtree(os.path.join(options.profilePath, 'webapps'))
             shutil.rmtree(os.path.join(options.profilePath, 'extensions', 'staged', 'mochikit@mozilla.org'))
             shutil.rmtree(os.path.join(options.profilePath, 'extensions', 'staged', 'worker-test@mozilla.org'))
             shutil.rmtree(os.path.join(options.profilePath, 'extensions', 'staged', 'workerbootstrap-test@mozilla.org'))
             os.remove(os.path.join(options.profilePath, 'userChrome.css'))
             if os.path.exists(os.path.join(options.profilePath, 'tests.jar')):
                 os.remove(os.path.join(options.profilePath, 'tests.jar'))
             if os.path.exists(os.path.join(options.profilePath, 'tests.manifest')):
@@ -355,17 +330,17 @@ class MochiRemote(Mochitest):
     
     def buildURLOptions(self, options, env):
         self.localLog = options.logFile
         options.logFile = self.remoteLog
         options.profilePath = self.localProfile
         env["MOZ_HIDE_RESULTS_TABLE"] = "1"
         retVal = Mochitest.buildURLOptions(self, options, env)
 
-        if not options.robocopIni:
+        if not options.robocop:
             #we really need testConfig.js (for browser chrome)
             try:
                 self._dm.pushDir(options.profilePath, self.remoteProfile)
             except devicemanager.DMError:
                 print "Automation Error: Unable to copy profile to device."
                 raise
 
         options.profilePath = self.remoteProfile
@@ -510,17 +485,16 @@ class MochiRemote(Mochitest):
         return browserEnv
 
         
 def main():
     scriptdir = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
     auto = RemoteAutomation(None, "fennec")
     parser = RemoteOptions(auto, scriptdir)
     options, args = parser.parse_args()
-
     if (options.dm_trans == "adb"):
         if (options.deviceIP):
             dm = droid.DroidADB(options.deviceIP, options.devicePort, deviceRoot=options.remoteTestRoot)
         else:
             dm = droid.DroidADB(deviceRoot=options.remoteTestRoot)
     else:
          dm = droid.DroidSUT(options.deviceIP, options.devicePort, deviceRoot=options.remoteTestRoot)
     auto.setDeviceManager(dm)
@@ -547,22 +521,22 @@ def main():
     auto.setServerInfo(options.webServer, options.httpPort, options.sslPort)
 
     print dm.getInfo()
 
     procName = options.app.split('/')[-1]
     if (dm.processExist(procName)):
         dm.killProcess(procName)
 
-    if options.robocopIni != "":
+    if options.robocop != "":
         # sut may wait up to 300 s for a robocop am process before returning
         dm.default_timeout = 320
         mp = manifestparser.TestManifest(strict=False)
         # TODO: pull this in dynamically
-        mp.read(options.robocopIni)
+        mp.read(options.robocop)
         robocop_tests = mp.active_tests(exists=False)
         tests = []
         my_tests = tests
         for test in robocop_tests:
             tests.append(test['name'])
 
         if options.totalChunks:
             tests_per_chunk = math.ceil(len(tests) / (options.totalChunks * 1.0))
@@ -580,18 +554,18 @@ def main():
             fennec_ids = options.robocopIds
         dm.pushFile(fennec_ids, os.path.join(deviceRoot, "fennec_ids.txt"))
         options.extraPrefs.append('robocop.logfile="%s/robocop.log"' % deviceRoot)
         options.extraPrefs.append('browser.search.suggest.enabled=true')
         options.extraPrefs.append('browser.search.suggest.prompted=true')
         options.extraPrefs.append('browser.viewport.scaleRatio=100')
         options.extraPrefs.append('browser.chrome.dynamictoolbar=false')
 
-        if (options.dm_trans == 'adb' and options.robocopApk):
-          dm._checkCmd(["install", "-r", options.robocopApk])
+        if (options.dm_trans == 'adb' and options.robocopPath):
+          dm._checkCmd(["install", "-r", os.path.join(options.robocopPath, "robocop.apk")])
 
         retVal = None
         for test in robocop_tests:
             if options.testPath and options.testPath != test['name']:
                 continue
 
             if not test['name'] in my_tests:
                 continue
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -61,19 +61,19 @@ RUN_MOCHITEST_REMOTE = \
     --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-apk=$(DIST)/robocop.apk \
+    --robocop-path=$(DIST) \
     --robocop-ids=$(DIST)/fennec_ids.txt \
-    --robocop-ini=$(DEPTH)/build/mobile/robocop/robocop.ini \
+    --robocop=$(DEPTH)/build/mobile/robocop/robocop.ini \
     --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)
 
 ifndef NO_FAIL_ON_TEST_ERRORS
 define check_test_error_internal
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \