diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 21:26:46 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 21:26:46 +0000 |
commit | 5695dd36acba6750cdae8baa552d12cd6923a0ab (patch) | |
tree | 9fb4531d618b006a4cf37e3c51304d0a7a3bc715 /base/test | |
parent | df8c6cd3672638ef2562fcce2a637042b2b404ec (diff) | |
download | chromium_src-5695dd36acba6750cdae8baa552d12cd6923a0ab.zip chromium_src-5695dd36acba6750cdae8baa552d12cd6923a0ab.tar.gz chromium_src-5695dd36acba6750cdae8baa552d12cd6923a0ab.tar.bz2 |
Record out-of-proc-tests' FAILS/FLAKY failures in the XML output.
BUG=40473
TEST=Run browser_tests and see if failed FAILS_ or FLAKY_ tests are recorded in its XML output. Also make sure that failures of FAILS/FLAKY tests don't make the browser_tests exit with non-zero return value.
Review URL: http://codereview.chromium.org/2431003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48873 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/test')
-rw-r--r-- | base/test/test_suite.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/test/test_suite.h b/base/test/test_suite.h index 37045da..609a0e1 100644 --- a/base/test/test_suite.h +++ b/base/test/test_suite.h @@ -28,6 +28,10 @@ #include <gtk/gtk.h> #endif +// A command-line flag that makes a test failure always result in a non-zero +// process exit code. +const char kStrictFailureHandling[] = "strict_failure_handling"; + // Match function used by the GetTestCount method. typedef bool (*TestMatch)(const testing::TestInfo&); @@ -80,6 +84,8 @@ class TestSuite { // Returns true if the test failure should be ignored. static bool ShouldIgnoreFailure(const testing::TestInfo& test) { + if (CommandLine::ForCurrentProcess()->HasSwitch(kStrictFailureHandling)) + return false; return IsMarkedFlaky(test) || IsMarkedFailing(test); } |