From b4e70523629de3f28a57b3318edb11c6ffc17af7 Mon Sep 17 00:00:00 2001 From: Gian-Carlo Pascutto Date: Mon, 10 Jul 2017 20:29:09 +0200 Subject: [PATCH] Bug 1308400 - Whitelist paths with test files during testing. r=Alex_Gaynor MozReview-Commit-ID: LMWAv3GP5c4 --HG-- extra : rebase_source : 80ae220e415510bb21c7f184eaaeb02ac27b91d0 --- testing/mochitest/runtests.py | 1 + testing/mozharness/configs/unittests/linux_unittest.py | 2 ++ testing/mozharness/scripts/desktop_unittest.py | 3 ++- testing/xpcshell/runxpcshelltests.py | 4 ++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 59d63062f6b8..b258f16ffc90 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1757,6 +1757,7 @@ toolbar#nav-bar { 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')) diff --git a/testing/mozharness/configs/unittests/linux_unittest.py b/testing/mozharness/configs/unittests/linux_unittest.py index 2dd955da58c3..2993ab8b9ef4 100644 --- a/testing/mozharness/configs/unittests/linux_unittest.py +++ b/testing/mozharness/configs/unittests/linux_unittest.py @@ -117,6 +117,7 @@ config = { "--screenshot-on-fail", "--cleanup-crashes", "--marionette-startup-timeout=180", + "--work-path=%(abs_work_dir)s", ], "run_filename": "runtests.py", "testsdir": "mochitest" @@ -148,6 +149,7 @@ config = { "--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" diff --git a/testing/mozharness/scripts/desktop_unittest.py b/testing/mozharness/scripts/desktop_unittest.py index a778722550bb..f0bd0daefc1f 100755 --- a/testing/mozharness/scripts/desktop_unittest.py +++ b/testing/mozharness/scripts/desktop_unittest.py @@ -250,6 +250,7 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix 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') @@ -373,13 +374,13 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix 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'], } # TestingMixin._download_and_extract_symbols() will set diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py index 01711d04722e..3093b72e3b07 100755 --- a/testing/xpcshell/runxpcshelltests.py +++ b/testing/xpcshell/runxpcshelltests.py @@ -950,8 +950,8 @@ class XPCShellTests(object): 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 self.mozInfo.get("topobjdir") is not None: - self.env["MOZ_DEVELOPER_OBJ_DIR"] = self.mozInfo["topobjdir"].encode() + if sys.platform.startswith('linux'): + self.env.setdefault('MOZ_SANDBOX_LOGGING', '1') # Disable the content process sandbox for the xpcshell tests. They # currently attempt to do things like bind() sockets, which is not