Bug 1311723 - Look for mozinfo.json in the correct place when running interactive loaners, r=armenzg
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 21 Oct 2016 12:24:17 -0400
changeset 318984 85832226cbd70af940e2f093a28ebc9ec018fb48
parent 318983 3e9509be9108f44c41c757ebeed15566e6e5c499
child 318985 4bb2763b87104a03707a3f82c67545669e46050d
push id30857
push userryanvm@gmail.com
push dateSun, 23 Oct 2016 17:08:16 +0000
treeherdermozilla-central@3d0ad7bb854d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarmenzg
bugs1311723
milestone52.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 1311723 - Look for mozinfo.json in the correct place when running interactive loaners, r=armenzg MozReview-Commit-ID: K8fqlo0x4Oc
layout/tools/reftest/mach_test_package_commands.py
testing/mochitest/mach_test_package_commands.py
--- a/layout/tools/reftest/mach_test_package_commands.py
+++ b/layout/tools/reftest/mach_test_package_commands.py
@@ -24,17 +24,17 @@ def run_reftest(context, **kwargs):
 
     if not args.tests:
         args.tests = [os.path.join('layout', 'reftests', 'reftest.list')]
 
     test_root = os.path.join(context.package_root, 'reftest', 'tests')
     normalize = partial(context.normalize_test_path, test_root)
     args.tests = map(normalize, args.tests)
 
-    if mozinfo.info['buildapp'] == 'mobile/android':
+    if mozinfo.info.get('buildapp') == 'mobile/android':
         return run_reftest_android(context, args)
     return run_reftest_desktop(context, args)
 
 
 def run_reftest_desktop(context, args):
     from runreftest import run_test_harness
 
     args.app = args.app or context.firefox_bin
@@ -65,17 +65,17 @@ def run_reftest_android(context, args):
     return run_test_harness(parser, args)
 
 
 def setup_argument_parser():
     import mozinfo
     import reftestcommandline
 
     global parser
-    mozinfo.find_and_update_from_json(os.path.dirname(here))
+    mozinfo.find_and_update_from_json(here)
     if mozinfo.info.get('buildapp') == 'mobile/android':
         parser = reftestcommandline.RemoteArgumentsParser()
     else:
         parser = reftestcommandline.DesktopArgumentsParser()
     return parser
 
 
 @CommandProvider
--- a/testing/mochitest/mach_test_package_commands.py
+++ b/testing/mochitest/mach_test_package_commands.py
@@ -23,17 +23,17 @@ def run_mochitest(context, **kwargs):
     args.certPath = context.certs_dir
 
     if args.test_paths:
         test_root = os.path.join(context.package_root, 'mochitest', 'tests')
         normalize = partial(context.normalize_test_path, test_root)
         args.test_paths = map(normalize, args.test_paths)
 
     import mozinfo
-    if mozinfo.info['buildapp'] == 'mobile/android':
+    if mozinfo.info.get('buildapp') == 'mobile/android':
         return run_mochitest_android(context, args)
     return run_mochitest_desktop(context, args)
 
 
 def run_mochitest_desktop(context, args):
     args.app = args.app or context.firefox_bin
     args.utilityPath = context.bin_dir
     args.extraProfileFiles.append(os.path.join(context.bin_dir, 'plugins'))
@@ -56,17 +56,17 @@ def run_mochitest_android(context, args)
         args.adbPath = config['exes']['adb'] % {'abs_work_dir': context.mozharness_workdir}
 
     from runtestsremote import run_test_harness
     return run_test_harness(parser, args)
 
 
 def setup_argument_parser():
     import mozinfo
-    mozinfo.find_and_update_from_json(os.path.dirname(here))
+    mozinfo.find_and_update_from_json(here)
     app = 'generic'
     if mozinfo.info.get('buildapp') == 'mobile/android':
         app = 'android'
 
     from mochitest_options import MochitestArgumentParser
     global parser
     parser = MochitestArgumentParser(app=app)
     return parser