Bug 1160324 - Handle missing robocopApk files in runtestsremote.py. r=gbrown
authorNick Alexander <nalexander@mozilla.com>
Thu, 30 Apr 2015 14:28:14 -0700
changeset 273240 380fcf2381b5403b21972ca0b636288945cded2f
parent 273239 5b3682f97a33ff7d50ec75792e01416b8a6c2d3a
child 273241 f327d13afcf939239048d368291fa161229ecbe3
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1160324
milestone40.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 1160324 - Handle missing robocopApk files in runtestsremote.py. r=gbrown
testing/mochitest/runtestsremote.py
testing/mozbase/mozlog/mozlog/structured/commandline.py
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -487,27 +487,25 @@ def main(args):
     else:
         dm = droid.DroidSUT(
             options.deviceIP,
             options.devicePort,
             deviceRoot=options.remoteTestRoot)
     auto.setDeviceManager(dm)
     options = parser.verifyRemoteOptions(options, auto)
 
+    if options is None:
+        raise ValueError("Invalid options specified, use --help for a list of valid options")
+
     mochitest = MochiRemote(auto, dm, options)
 
     log = mochitest.log
     message_logger.logger = log
     mochitest.message_logger = message_logger
 
-    if (options is None):
-        log.error(
-            "Invalid options specified, use --help for a list of valid options")
-        return 1
-
     productPieces = options.remoteProductName.split('.')
     if (productPieces is not None):
         auto.setProduct(productPieces[0])
     else:
         auto.setProduct(options.remoteProductName)
     auto.setAppName(options.remoteappname)
 
     options = parser.verifyOptions(options, mochitest)
--- a/testing/mozbase/mozlog/mozlog/structured/commandline.py
+++ b/testing/mozbase/mozlog/mozlog/structured/commandline.py
@@ -174,16 +174,18 @@ def setup_logging(suite, args, defaults=
 
     logger = StructuredLogger(suite)
     # Keep track of any options passed for formatters.
     formatter_options = defaultdict(lambda: formatter_option_defaults.copy())
     # Keep track of formatters and list of streams specified.
     formatters = defaultdict(list)
     found = False
     found_stdout_logger = False
+    if args is None:
+        args = {}
     if not hasattr(args, 'iteritems'):
         args = vars(args)
 
     if defaults is None:
         if sys.__stdout__.isatty():
             defaults = {"mach": sys.stdout}
         else:
             defaults = {"raw": sys.stdout}