diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-03-30 08:50:58 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-30 08:50:58 +0200 |
commit | 4e368f8199a61c6319621ad1b9d6c352f0319f41 (patch) | |
tree | 69c6e2296c4e183ecbe6cfd1e856619e3715ae01 /testing | |
parent | 59bf4204a84f7638d3f89a29bc7c04e5dc401369 (diff) | |
download | uxp-4e368f8199a61c6319621ad1b9d6c352f0319f41.tar.gz |
Remove base conditional code for crash reporter and injector.
Diffstat (limited to 'testing')
-rw-r--r-- | testing/gtest/mozilla/GTestRunner.cpp | 25 | ||||
-rw-r--r-- | testing/gtest/rungtests.py | 1 | ||||
-rw-r--r-- | testing/marionette/client/marionette_driver/geckoinstance.py | 3 | ||||
-rw-r--r-- | testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm | 9 | ||||
-rw-r--r-- | testing/mozbase/mozrunner/mozrunner/base/browser.py | 1 | ||||
-rw-r--r-- | testing/mozbase/mozrunner/mozrunner/base/device.py | 3 | ||||
-rwxr-xr-x | testing/mozbase/mozrunner/mozrunner/utils.py | 1 | ||||
-rwxr-xr-x | testing/runcppunittests.py | 1 | ||||
-rw-r--r-- | testing/talos/talos/ffsetup.py | 5 | ||||
-rwxr-xr-x | testing/xpcshell/runxpcshelltests.py | 3 |
10 files changed, 4 insertions, 48 deletions
diff --git a/testing/gtest/mozilla/GTestRunner.cpp b/testing/gtest/mozilla/GTestRunner.cpp index 0864db8cb8..544de81da9 100644 --- a/testing/gtest/mozilla/GTestRunner.cpp +++ b/testing/gtest/mozilla/GTestRunner.cpp @@ -6,9 +6,6 @@ #include "GTestRunner.h" #include "gtest/gtest.h" #include "mozilla/Attributes.h" -#ifdef MOZ_CRASHREPORTER -#include "nsICrashReporter.h" -#endif #include "testing/TestHarness.h" #include "prenv.h" #ifdef XP_WIN @@ -92,28 +89,6 @@ int RunGTestFunc() #ifdef XP_WIN mozilla::ipc::windows::InitUIThread(); #endif -#ifdef MOZ_CRASHREPORTER - nsCOMPtr<nsICrashReporter> crashreporter; - char *crashreporterStr = PR_GetEnv("MOZ_CRASHREPORTER"); - if (crashreporterStr && !strcmp(crashreporterStr, "1")) { - //TODO: move this to an even-more-common location to use in all - // C++ unittests - crashreporter = do_GetService("@mozilla.org/toolkit/crash-reporter;1"); - if (crashreporter) { - std::cerr << "Setting up crash reporting" << std::endl; - - nsCOMPtr<nsIProperties> dirsvc = - do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID); - nsCOMPtr<nsIFile> cwd; - nsresult rv = dirsvc->Get(NS_OS_CURRENT_WORKING_DIR, - NS_GET_IID(nsIFile), - getter_AddRefs(cwd)); - MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv)); - crashreporter->SetEnabled(true); - crashreporter->SetMinidumpPath(cwd); - } - } -#endif return RUN_ALL_TESTS(); } diff --git a/testing/gtest/rungtests.py b/testing/gtest/rungtests.py index e9e33cca2c..4999086800 100644 --- a/testing/gtest/rungtests.py +++ b/testing/gtest/rungtests.py @@ -89,7 +89,6 @@ class GTests(object): ) env["XPCOM_DEBUG_BREAK"] = "stack-and-abort" env["MOZ_CRASHREPORTER_NO_REPORT"] = "1" - env["MOZ_CRASHREPORTER"] = "1" env["MOZ_RUN_GTEST"] = "1" # Normally we run with GTest default output, override this to use the TBPL test format. env["MOZ_TBPL_PARSER"] = "1" diff --git a/testing/marionette/client/marionette_driver/geckoinstance.py b/testing/marionette/client/marionette_driver/geckoinstance.py index 7e2048187e..174168ed23 100644 --- a/testing/marionette/client/marionette_driver/geckoinstance.py +++ b/testing/marionette/client/marionette_driver/geckoinstance.py @@ -226,8 +226,7 @@ class GeckoInstance(object): # environment variables needed for crashreporting # https://developer.mozilla.org/docs/Environment_variables_affecting_crash_reporting - env.update({"MOZ_CRASHREPORTER": "1", - "MOZ_CRASHREPORTER_NO_REPORT": "1", + env.update({"MOZ_CRASHREPORTER_NO_REPORT": "1", "MOZ_CRASHREPORTER_SHUTDOWN": "1", }) diff --git a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm index eebcbb6bbd..d6cd836e77 100644 --- a/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm +++ b/testing/mochitest/BrowserTestUtils/BrowserTestUtils.jsm @@ -851,9 +851,6 @@ this.BrowserTestUtils = { crashBrowser: Task.async(function*(browser, shouldShowTabCrashPage=true) { let extra = {}; let KeyValueParser = {}; - if (AppConstants.MOZ_CRASHREPORTER) { - Cu.import("resource://gre/modules/KeyValueParser.jsm", KeyValueParser); - } if (!browser.isRemoteBrowser) { throw new Error("<xul:browser> needs to be remote in order to crash"); @@ -938,11 +935,7 @@ this.BrowserTestUtils = { extrafile.append(dumpID + '.extra'); if (extrafile.exists()) { dump(`\nNo .extra file for dumpID: ${dumpID}\n`); - if (AppConstants.MOZ_CRASHREPORTER) { - extra = KeyValueParser.parseKeyValuePairsFromFile(extrafile); - } else { - dump('\nCrashReporter not enabled - will not return any extra data\n'); - } + dump('\nWill not return any extra data\n'); } removeFile(minidumpDirectory, dumpID + '.dmp'); diff --git a/testing/mozbase/mozrunner/mozrunner/base/browser.py b/testing/mozbase/mozrunner/mozrunner/base/browser.py index 998e4ccc5e..6fc7348d58 100644 --- a/testing/mozbase/mozrunner/mozrunner/base/browser.py +++ b/testing/mozbase/mozrunner/mozrunner/base/browser.py @@ -75,6 +75,5 @@ class GeckoRuntimeRunner(BaseRunner): if not self.show_crash_reporter: # hide the crash reporter window self.env["MOZ_CRASHREPORTER_NO_REPORT"] = "1" - self.env["MOZ_CRASHREPORTER"] = "1" BaseRunner.start(self, *args, **kwargs) diff --git a/testing/mozbase/mozrunner/mozrunner/base/device.py b/testing/mozbase/mozrunner/mozrunner/base/device.py index 2252203d16..6eeef042f4 100644 --- a/testing/mozbase/mozrunner/mozrunner/base/device.py +++ b/testing/mozbase/mozrunner/mozrunner/base/device.py @@ -22,8 +22,7 @@ class DeviceRunner(BaseRunner): The base runner class used for running gecko on remote devices (or emulators), such as B2G. """ - env = {'MOZ_CRASHREPORTER': '1', - 'MOZ_CRASHREPORTER_NO_REPORT': '1', + env = {'MOZ_CRASHREPORTER_NO_REPORT': '1', 'MOZ_CRASHREPORTER_SHUTDOWN': '1', 'MOZ_HIDE_RESULTS_TABLE': '1', 'MOZ_LOG': 'signaling:3,mtransport:4,DataChannel:4,jsep:4,MediaPipelineFactory:4', diff --git a/testing/mozbase/mozrunner/mozrunner/utils.py b/testing/mozbase/mozrunner/mozrunner/utils.py index f96c94398d..79f26b8f29 100755 --- a/testing/mozbase/mozrunner/mozrunner/utils.py +++ b/testing/mozbase/mozrunner/mozrunner/utils.py @@ -132,7 +132,6 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False, if crashreporter and not debugger: env['MOZ_CRASHREPORTER_NO_REPORT'] = '1' - env['MOZ_CRASHREPORTER'] = '1' else: env['MOZ_CRASHREPORTER_DISABLE'] = '1' diff --git a/testing/runcppunittests.py b/testing/runcppunittests.py index d8b79f68f7..fdd6abc1f6 100755 --- a/testing/runcppunittests.py +++ b/testing/runcppunittests.py @@ -90,7 +90,6 @@ class CPPUnitTests(object): # been fixed to enable crash reporting env["XPCOM_DEBUG_BREAK"] = "stack-and-abort" env["MOZ_CRASHREPORTER_NO_REPORT"] = "1" - env["MOZ_CRASHREPORTER"] = "1" return env def build_environment(self): diff --git a/testing/talos/talos/ffsetup.py b/testing/talos/talos/ffsetup.py index 22a9dea07f..14ff576d54 100644 --- a/testing/talos/talos/ffsetup.py +++ b/testing/talos/talos/ffsetup.py @@ -67,10 +67,7 @@ class FFSetup(object): # for winxp e10s logging: # https://bugzilla.mozilla.org/show_bug.cgi?id=1037445 self.env['MOZ_WIN_INHERIT_STD_HANDLES_PRE_VISTA'] = '1' - if self.browser_config['symbols_path']: - self.env['MOZ_CRASHREPORTER'] = '1' - else: - self.env['MOZ_CRASHREPORTER_DISABLE'] = '1' + self.env['MOZ_CRASHREPORTER_DISABLE'] = '1' self.env['MOZ_DISABLE_NONLOCAL_CONNECTIONS'] = '1' diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py index 7c88343dc9..34af6639fb 100755 --- a/testing/xpcshell/runxpcshelltests.py +++ b/testing/xpcshell/runxpcshelltests.py @@ -910,9 +910,6 @@ class XPCShellTests(object): """ # Make assertions fatal self.env["XPCOM_DEBUG_BREAK"] = "stack-and-abort" - # Crash reporting interferes with debugging - if not self.debuggerInfo: - self.env["MOZ_CRASHREPORTER"] = "1" # Don't launch the crash reporter client self.env["MOZ_CRASHREPORTER_NO_REPORT"] = "1" # Don't permit remote connections by default. |