Bug 1308400 - Whitelist paths with test files during testing. r?Alex_Gaynor
MozReview-Commit-ID: LMWAv3GP5c4
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1747,16 +1747,17 @@ toolbar#nav-bar {
if (mozinfo.info["asan"] or mozinfo.info["debug"]) and \
options.flavor == 'browser' and options.timeout is None:
self.log.info("Increasing default timeout to 90 seconds")
options.extraPrefs.append("testing.browserTestHarness.timeout=90")
options.extraPrefs.append(
"browser.tabs.remote.autostart=%s" %
('true' if options.e10s else 'false'))
+
options.extraPrefs.append(
"dom.ipc.tabs.nested.enabled=%s" %
('true' if options.nested_oop else 'false'))
# get extensions to install
extensions = self.getExtensionsToInstall(options)
# preferences
--- a/testing/mozharness/configs/unittests/linux_unittest.py
+++ b/testing/mozharness/configs/unittests/linux_unittest.py
@@ -112,16 +112,17 @@ config = {
"--setpref=webgl.force-enabled=true",
"--quiet",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--use-test-media-devices",
"--screenshot-on-fail",
"--cleanup-crashes",
"--marionette-startup-timeout=180",
+ "--work-path=%(abs_work_dir)s",
],
"run_filename": "runtests.py",
"testsdir": "mochitest"
},
"mozbase": {
"options": [
"-b",
"%(binary_path)s"
@@ -143,16 +144,17 @@ config = {
"options": [
"--appname=%(binary_path)s",
"--utility-path=tests/bin",
"--extra-profile-file=tests/bin/plugins",
"--symbols-path=%(symbols_path)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--cleanup-crashes",
+ "--work-path=%(abs_work_dir)s",
],
"run_filename": "runreftest.py",
"testsdir": "reftest"
},
"xpcshell": {
"options": [
"--symbols-path=%(symbols_path)s",
"--test-plugin-path=%(test_plugin_path)s",
--- a/testing/mozharness/scripts/desktop_unittest.py
+++ b/testing/mozharness/scripts/desktop_unittest.py
@@ -236,16 +236,17 @@ class DesktopUnittest(TestingMixin, Merc
def query_abs_dirs(self):
if self.abs_dirs:
return self.abs_dirs
abs_dirs = super(DesktopUnittest, self).query_abs_dirs()
c = self.config
dirs = {}
+ dirs['abs_work_dir'] = abs_dirs['abs_work_dir']
dirs['abs_app_install_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'application')
dirs['abs_test_install_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tests')
dirs['abs_test_extensions_dir'] = os.path.join(dirs['abs_test_install_dir'], 'extensions')
dirs['abs_test_bin_dir'] = os.path.join(dirs['abs_test_install_dir'], 'bin')
dirs['abs_test_bin_plugins_dir'] = os.path.join(dirs['abs_test_bin_dir'],
'plugins')
dirs['abs_test_bin_components_dir'] = os.path.join(dirs['abs_test_bin_dir'],
'components')
@@ -359,16 +360,17 @@ class DesktopUnittest(TestingMixin, Merc
raw_log_file = os.path.join(dirs['abs_blob_upload_dir'],
'%s_raw.log' % suite)
error_summary_file = os.path.join(dirs['abs_blob_upload_dir'],
'%s_errorsummary.log' % suite)
str_format_values = {
'binary_path': self.binary_path,
'symbols_path': self._query_symbols_url(),
+ 'abs_work_dir' : dirs['abs_work_dir'],
'abs_app_dir': abs_app_dir,
'abs_res_dir': abs_res_dir,
'raw_log_file': raw_log_file,
'error_summary_file': error_summary_file,
'gtest_dir': os.path.join(dirs['abs_test_install_dir'],
'gtest'),
'abs_work_dir': dirs['abs_work_dir'],
}
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -945,16 +945,18 @@ class XPCShellTests(object):
self.env["MOZ_CRASHREPORTER_NO_REPORT"] = "1"
# Don't permit remote connections by default.
# MOZ_DISABLE_NONLOCAL_CONNECTIONS can be set to "0" to temporarily
# enable non-local connections for the purposes of local testing.
# Don't override the user's choice here. See bug 1049688.
self.env.setdefault('MOZ_DISABLE_NONLOCAL_CONNECTIONS', '1')
if self.mozInfo.get("topsrcdir") is not None:
self.env["MOZ_DEVELOPER_REPO_DIR"] = self.mozInfo["topsrcdir"].encode()
+ if sys.platform.startswith('linux'):
+ self.env.setdefault('MOZ_DISABLE_CONTENT_SANDBOX', '1')
# Disable the content process sandbox for the xpcshell tests. They
# currently attempt to do things like bind() sockets, which is not
# compatible with the sandbox.
self.env["MOZ_DISABLE_CONTENT_SANDBOX"] = "1"
def buildEnvironment(self):
"""