Bug 1380402 - Set MOZ_DEVELOPER_REPO_DIR in the environment when running TPS on mac. r?markh draft
authorThom Chiovoloni <tchiovoloni@mozilla.com>
Wed, 12 Jul 2017 14:13:24 -0400
changeset 607679 cb275d42aafc33a524864dc2cbb185bf7e5f2096
parent 607616 0c098eb60dd15df7d90d100fb1d181b12d53a2ab
child 637122 99f7469b5e2cd46b19816a4b67479efdf38df9e8
push id68083
push userbmo:tchiovoloni@mozilla.com
push dateWed, 12 Jul 2017 18:13:46 +0000
reviewersmarkh
bugs1380402
milestone56.0a1
Bug 1380402 - Set MOZ_DEVELOPER_REPO_DIR in the environment when running TPS on mac. r?markh MozReview-Commit-ID: 2jtresePxiu
testing/tps/tps/cli.py
--- a/testing/tps/tps/cli.py
+++ b/testing/tps/tps/cli.py
@@ -101,16 +101,20 @@ def main():
                                     'services', 'sync', 'tps', 'extensions')
     else:
         if sys.platform == 'win32':
             # replace msys-style paths with proper Windows paths
             m = re.match('^\/\w\/', extensionDir)
             if m:
                 extensionDir = '%s:/%s' % (m.group(0)[1:2], extensionDir[3:])
                 extensionDir = extensionDir.replace('/', '\\')
+    if sys.platform == 'darwin':
+        # Needed to avoid tab crashes on mac due to level 3 sandboxing
+        sourceRoot = os.path.join(extensionDir, '..', '..', '..', '..')
+        os.environ['MOZ_DEVELOPER_REPO_DIR'] = os.path.abspath(sourceRoot)
 
     TPS = TPSTestRunner(extensionDir,
                         binary=options.binary,
                         config=config,
                         debug=options.debug,
                         ignore_unused_engines=options.ignore_unused_engines,
                         logfile=options.logfile,
                         mobile=options.mobile,