Bug 1429150 - Make the path to the root of the test data directory available via a pref draft
authorKirk Steuber <ksteuber@mozilla.com>
Wed, 07 Feb 2018 14:49:49 -0800
changeset 753191 2083298bf813206f209c250053cc7e921cbe32b6
parent 753190 3524a8f99ba5c5677e875c644446a1f87854a2ed
child 753192 d6f66495524c10d3e409ca0744bc7b8b3fc02714
push id98509
push userksteuber@mozilla.com
push dateFri, 09 Feb 2018 19:18:56 +0000
bugs1429150
milestone60.0a1
Bug 1429150 - Make the path to the root of the test data directory available via a pref In order to facilitate testing of enterprise policies that must be applied via a JSON at startup, the path to the test data will now be made available during testing. MozReview-Commit-ID: IUhXXsiPRYW
testing/mochitest/runtests.py
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1836,16 +1836,21 @@ toolbar#nav-bar {
         options.extraPrefs.append(
             "idle.lastDailyNotification=%d" %
             int(time.time()))
 
         # Enable tracing output for detailed failures in case of
         # failing connection attempts, and hangs (bug 1397201)
         options.extraPrefs.append("marionette.log.level=%s" % "TRACE")
 
+        if getattr(self, 'testRootAbs', None):
+            options.extraPrefs.append(
+                "mochitest.testRoot=%s" %
+                self.testRootAbs)
+
         # get extensions to install
         extensions = self.getExtensionsToInstall(options)
 
         # preferences
         preferences = [
             os.path.join(
                 SCRIPT_DIR,
                 'profile_data',