Permalink
Browse files

Bug 747117 - Mozrunner does not accept app packages with a final slas…

…h for the binary option. r=hskupin
  • Loading branch information...
1 parent 913a4e5 commit 632d560f5d41c81ccc8d5baaf453271867de1458 @dglol dglol committed with whimboo Apr 19, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 mozrunner/mozrunner/runner.py
@@ -84,9 +84,10 @@ def __init__(self, profile, binary, cmdargs=None, env=None,
raise OSError("Binary path does not exist: %s" % self.binary)
# allow Mac binaries to be specified as an app bundle
- if mozinfo.isMac and os.path.splitext(self.binary)[1] == '.app':
- info = readPlist("%s/Contents/Info.plist" % self.binary)
- self.binary = os.path.join(self.binary, "Contents/MacOS/%s" %
+ plist = '%s/Contents/Info.plist' % self.binary
+ if mozinfo.isMac and os.path.exists(plist):
+ info = readPlist(plist)
+ self.binary = os.path.join(self.binary, "Contents/MacOS/",
info['CFBundleExecutable'])
self.cmdargs = cmdargs or []

0 comments on commit 632d560

Please sign in to comment.