Bug 1415379 - Add the entire _tests directory to the sandbox whitelist. r=ahal,Alex_Gaynor
mochitests needs access to TESTING_JS_MODULES which are installed in $(OBJDIR)\_tests\modules\
MozReview-Commit-ID: CMgDlj4uKeP
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1827,17 +1827,19 @@ toolbar#nav-bar {
prefs.update(self.extraPrefs(options.extraPrefs))
# Bug 1262954: For windows XP + e10s disable acceleration
if platform.system() in ("Windows", "Microsoft") and \
'5.1' in platform.version() and options.e10s:
prefs['layers.acceleration.disabled'] = True
- sandbox_whitelist_paths = [SCRIPT_DIR] + options.sandboxReadWhitelist
+ # Whitelist the _tests directory (../..) so that TESTING_JS_MODULES work
+ tests_dir = os.path.dirname(os.path.dirname(SCRIPT_DIR))
+ sandbox_whitelist_paths = [tests_dir] + options.sandboxReadWhitelist
if (platform.system() == "Linux" or
platform.system() in ("Windows", "Microsoft")):
# Trailing slashes are needed to indicate directories on Linux and Windows
sandbox_whitelist_paths = map(lambda p: os.path.join(p, ""),
sandbox_whitelist_paths)
# interpolate preferences
interpolation = {