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
--- 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',