Bug 899047 - Set mochitest appname in verifyOptions to fix fennec regression, r=gbrown
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 31 Jul 2013 16:45:54 -0400
changeset 153100 f76c013e50a691e5fd5bcc1bfbb1feba3d79a017
parent 153098 60d17705f2fc0b682ff510077f937d4d1487ca00
child 153101 51f5228300fcede12d50281d811332483c2596c6
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs899047
milestone25.0a1
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
Bug 899047 - Set mochitest appname in verifyOptions to fix fennec regression, r=gbrown
testing/mochitest/mochitest_options.py
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -40,17 +40,17 @@ class MochitestOptions(optparse.OptionPa
           "dest": "closeWhenDone",
           "default": False,
           "help": "close the application when tests are done running",
         }],
         [["--appname"],
         { "action": "store",
           "type": "string",
           "dest": "app",
-          "default": build_obj.get_binary_path() if build_obj is not None else None,
+          "default": None,
           "help": "absolute path to application, overriding default",
         }],
         [["--utility-path"],
         { "action": "store",
           "type": "string",
           "dest": "utilityPath",
           "default": build_obj.bindir if build_obj is not None else None,
           "help": "absolute path to directory containing utility programs (xpcshell, ssltunnel, certutil)",
@@ -336,16 +336,22 @@ class MochitestOptions(optparse.OptionPa
             self.add_option(*option[0], **option[1])
 
         self.set_defaults(**defaults)
         self.set_usage(self.__doc__)
 
     def verifyOptions(self, options, mochitest):
         """ verify correct options and cleanup paths """
 
+        if options.app is None:
+            if build_obj is not None:
+                options.app = build_obj.get_binary_path()
+            else:
+                self.error("could not find the application path, --appname must be specified")
+
         if options.totalChunks is not None and options.thisChunk is None:
             self.error("thisChunk must be specified when totalChunks is specified")
 
         if options.totalChunks:
             if not 1 <= options.thisChunk <= options.totalChunks:
                 self.error("thisChunk must be between 1 and totalChunks")
 
         if options.xrePath is None: