Bug 921180 - Use b2g-bin if it exists, r=ahal
authorJonathan Griffin <jgriffin@mozilla.com>
Thu, 10 Oct 2013 10:25:59 -0700
changeset 150369 de4adb31aeb62b1e6472d63022adca2c8365b227
parent 150368 b063d4310a8a98ffed7be9bf9f132039bb1889e9
child 150370 1a9233d029191015a71024344d24089565e07eb4
push id34851
push userjgriffin@mozilla.com
push dateThu, 10 Oct 2013 21:45:20 +0000
treeherdermozilla-inbound@de4adb31aeb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs921180
milestone27.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 921180 - Use b2g-bin if it exists, r=ahal
testing/mochitest/runtestsb2g.py
--- a/testing/mochitest/runtestsb2g.py
+++ b/testing/mochitest/runtestsb2g.py
@@ -339,19 +339,20 @@ def run_desktop_mochitests(parser, optio
     kwargs = {}
     if options.marionette:
         host, port = options.marionette.split(':')
         kwargs['host'] = host
         kwargs['port'] = int(port)
     marionette = Marionette.getMarionetteOrExit(**kwargs)
     mochitest = B2GDesktopMochitest(marionette, options.profile_data_dir)
 
-    # b2g desktop builds don't always have a b2g-bin file
-    if options.app[-4:] == '-bin':
-        options.app = options.app[:-4]
+    # add a -bin suffix if b2g-bin exists, but just b2g was specified
+    if options.app[-4:] != '-bin':
+        if os.path.isfile("%s-bin" % options.app):
+            options.app = "%s-bin" % options.app
 
     options = MochitestOptions.verifyOptions(parser, options, mochitest)
     if options == None:
         sys.exit(1)
 
     if options.desktop and not options.profile:
         raise Exception("must specify --profile when specifying --desktop")