зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061809 - [mozversion] Update retrieval of application information due to upcoming Mac signing changes. r=wlach
This commit is contained in:
Родитель
b87ce24352
Коммит
e60530ac05
|
@ -85,18 +85,24 @@ class LocalVersion(Version):
|
|||
|
||||
def __init__(self, binary, **kwargs):
|
||||
Version.__init__(self, **kwargs)
|
||||
path = None
|
||||
path = os.getcwd()
|
||||
|
||||
if binary:
|
||||
if not os.path.exists(binary):
|
||||
raise IOError('Binary path does not exist: %s' % binary)
|
||||
path = os.path.dirname(binary)
|
||||
else:
|
||||
if os.path.exists(os.path.join(os.getcwd(), 'application.ini')):
|
||||
path = os.getcwd()
|
||||
path = os.path.dirname(os.path.abspath(binary))
|
||||
|
||||
if not path:
|
||||
raise LocalAppNotFoundError()
|
||||
if not os.path.exists(os.path.join(path, 'application.ini')):
|
||||
# With new signed builds on OS X the ini files are located inside
|
||||
# of '/Contents/Resources'. Older builds have them next to the
|
||||
# binaries in '/Contents/MacOS'.
|
||||
if sys.platform == 'darwin':
|
||||
path = os.path.join(os.path.dirname(path), 'Resources')
|
||||
|
||||
if not os.path.exists(os.path.join(path, 'application.ini')):
|
||||
raise LocalAppNotFoundError()
|
||||
else:
|
||||
raise LocalAppNotFoundError()
|
||||
|
||||
self.get_gecko_info(path)
|
||||
|
||||
|
@ -275,7 +281,8 @@ def cli(args=sys.argv[1:]):
|
|||
dm_type = os.environ.get('DM_TRANS', 'adb')
|
||||
host = os.environ.get('TEST_DEVICE')
|
||||
|
||||
version = get_version(binary=options.binary, sources=options.sources,
|
||||
version = get_version(binary=options.binary,
|
||||
sources=options.sources,
|
||||
dm_type=dm_type, host=host,
|
||||
device_serial=options.device)
|
||||
for (key, value) in sorted(version.items()):
|
||||
|
|
Загрузка…
Ссылка в новой задаче