Backout e814e12508af (bug 799107), 45863b00372b (bug 801633),
authorJoel Maher <jmaher@mozilla.com>
Mon, 15 Oct 2012 13:33:37 -0400
changeset 110429 1d60a0de1ec1b5372a68e39d656c416c2b07e797
parent 110428 621cfd13ceaf4c3cce0aaaef12323544789f1650
child 110430 224fddb79a387bdb46eace136268ead5f7a99ae5
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs799107, 801633
milestone19.0a1
backs oute814e12508af61b1470d9f6f751b35fc27303283
Backout e814e12508af (bug 799107), 45863b00372b (bug 801633),
build/mobile/robocop/FennecNativeDriver.java.in
mobile/android/base/tests/BaseTest.java.in
testing/mochitest/runtestsremote.py
testing/talos/talos.json
--- a/build/mobile/robocop/FennecNativeDriver.java.in
+++ b/build/mobile/robocop/FennecNativeDriver.java.in
@@ -388,17 +388,17 @@ public class FennecNativeDriver implemen
      *  Takes a string of "key=value" pairs split by \n and creates a hash table.
      */
     public static HashMap convertTextToTable(String data)
     {
         HashMap retVal = new HashMap();
 
         String[] lines = data.split("\n");
         for (int i = 0; i < lines.length; i++) {
-            String[] parts = lines[i].split("=", 2);
+            String[] parts = lines[i].split("=");
             retVal.put(parts[0].trim(), parts[1].trim());
         }
         return retVal;
     }
 
     public static void logAllStackTraces(LogLevel level) {
         StringBuffer sb = new StringBuffer();
         sb.append("Dumping ALL the threads!\n");
--- a/mobile/android/base/tests/BaseTest.java.in
+++ b/mobile/android/base/tests/BaseTest.java.in
@@ -61,24 +61,16 @@ abstract class BaseTest extends Activity
         String configFile = FennecNativeDriver.getFile(rootPath + "/robotium.config");
         HashMap config = FennecNativeDriver.convertTextToTable(configFile);
 
         // Create the intent to be used with all the important arguments.
         Intent i = new Intent(Intent.ACTION_MAIN);
         mProfile = (String)config.get("profile");
         i.putExtra("args", "-no-remote -profile " + mProfile);
 
-        String envString = (String)config.get("envvars");
-        if (envString != "") {
-            String[] envStrings = envString.split(",");
-            for (int iter = 0; iter < envStrings.length; iter++) {
-                i.putExtra("env" + iter, envStrings[iter]);
-            }
-        }
-
         // Start the activity
         setActivityIntent(i);
         mActivity = getActivity();
 
         mLogFile = (String)config.get("logfile");
         mBaseUrl = ((String)config.get("host")).replaceAll("(/$)", "");
         mRawBaseUrl = ((String)config.get("rawhost")).replaceAll("(/$)", "");
 
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -381,51 +381,16 @@ class MochiRemote(Mochitest):
         # TODO: Consider not printing to stdout because we might be duplicating output
         print '\n'.join(logFile)
         with open(self.localLog, 'w') as localLog:
             localLog.write('\n'.join(logFile))
 
         if failed > 0:
             return 1
         return 0
-
-    def buildRobotiumConfig(self, options, browserEnv):
-        deviceRoot = self._dm.getDeviceRoot()
-        fHandle = tempfile.NamedTemporaryFile(suffix='.config',
-                                              prefix='robotium-',
-                                              dir=os.getcwd(),
-                                              delete=False)
-        fHandle.write("profile=%s\n" % (self.remoteProfile))
-        fHandle.write("logfile=%s\n" % (options.remoteLogFile))
-        fHandle.write("host=http://mochi.test:8888/tests\n")
-        fHandle.write("rawhost=http://%s:%s/tests\n" % (options.remoteWebServer, options.httpPort))
-
-        if browserEnv:
-            envstr = ""
-            delim = ""
-            for key, value in browserEnv.items():
-                try:
-                    value.index(',')
-                    print "Found: Error an ',' in our value, unable to process value."
-                except ValueError, e:
-                    envstr += "%s%s=%s" % (delim, key, value)
-                    delim = ","
-
-            fHandle.write("envvars=%s\n" % envstr)
-        fHandle.close()
-
-        self._dm.removeFile(os.path.join(deviceRoot, "robotium.config"))
-        self._dm.pushFile(fHandle.name, os.path.join(deviceRoot, "robotium.config"))
-        os.unlink(fHandle.name)
-
-    def buildBrowserEnv(self, options):
-        browserEnv = Mochitest.buildBrowserEnv(self, options)
-        self.buildRobotiumConfig(options, browserEnv)
-        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):
@@ -464,18 +429,31 @@ def main():
         dm.killProcess(procName)
     
     if options.robocop != "":
         mp = manifestparser.TestManifest(strict=False)
         # TODO: pull this in dynamically
         mp.read(options.robocop)
         robocop_tests = mp.active_tests(exists=False)
 
-        deviceRoot = dm.getDeviceRoot()      
+        fHandle = tempfile.NamedTemporaryFile(suffix='.config',
+                                              prefix='robotium-',
+                                              dir=os.getcwd(),
+                                              delete=False)
+        fHandle.write("profile=%s\n" % (mochitest.remoteProfile))
+        fHandle.write("logfile=%s\n" % (options.remoteLogFile))
+        fHandle.write("host=http://mochi.test:8888/tests\n")
+        fHandle.write("rawhost=http://%s:%s/tests\n" % (options.remoteWebServer, options.httpPort))
+        fHandle.close()
+        deviceRoot = dm.getDeviceRoot()
+      
         dm.removeFile(os.path.join(deviceRoot, "fennec_ids.txt"))
+        dm.removeFile(os.path.join(deviceRoot, "robotium.config"))
+        dm.pushFile(fHandle.name, os.path.join(deviceRoot, "robotium.config"))
+        os.unlink(fHandle.name)
         fennec_ids = os.path.abspath("fennec_ids.txt")
         if not os.path.exists(fennec_ids) and options.robocopIds:
             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')
 
--- a/testing/talos/talos.json
+++ b/testing/talos/talos.json
@@ -1,6 +1,6 @@
 {
     "talos.zip": {
-        "url": "http://build.mozilla.org/talos/zips/talos.524c6ff1736b.zip",
+        "url": "http://build.mozilla.org/talos/zips/talos.a210f048087b.zip",
         "path": ""
     }
 }