diff options
author | Abseil Team <absl-team@google.com> | 2020-03-23 15:15:58 -0400 |
---|---|---|
committer | Xiaoyi Zhang <zhangxy@google.com> | 2020-03-24 17:32:07 -0400 |
commit | 1ced315a483f4ecac21893ce6ceeb502afb82eff (patch) | |
tree | 73b84f4009cf19cb136015069293276af561dda4 /googletest/include/gtest/gtest.h | |
parent | 749148f1accc346d94825358a9a745b852961a11 (diff) | |
download | googletest-1ced315a483f4ecac21893ce6ceeb502afb82eff.tar.gz googletest-1ced315a483f4ecac21893ce6ceeb502afb82eff.tar.bz2 googletest-1ced315a483f4ecac21893ce6ceeb502afb82eff.zip |
Googletest export
Add --gtest_fail_fast support to googletest.
- Analogous functionality to to golang -test.failfast and python --failfast
- Stops test execution upon first test failure.
- Also add support Bazel equivalent env var (TESTBRIDGE_TEST_RUNNER_FAIL_FAST)
PiperOrigin-RevId: 302488880
Diffstat (limited to 'googletest/include/gtest/gtest.h')
-rw-r--r-- | googletest/include/gtest/gtest.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/googletest/include/gtest/gtest.h b/googletest/include/gtest/gtest.h index 0139fccf..deacb279 100644 --- a/googletest/include/gtest/gtest.h +++ b/googletest/include/gtest/gtest.h @@ -101,6 +101,10 @@ GTEST_DECLARE_bool_(catch_exceptions); // to let Google Test decide. GTEST_DECLARE_string_(color); +// This flag controls whether the test runner should continue execution past +// first failure. +GTEST_DECLARE_bool_(fail_fast); + // This flag sets up the filter to select by name using a glob pattern // the tests to run. If the filter is not given all tests are executed. GTEST_DECLARE_string_(filter); @@ -795,6 +799,9 @@ class GTEST_API_ TestInfo { // deletes it. void Run(); + // Skip and records the test result for this object. + void Skip(); + static void ClearTestResult(TestInfo* test_info) { test_info->result_.Clear(); } @@ -943,6 +950,9 @@ class GTEST_API_ TestSuite { // Runs every test in this TestSuite. void Run(); + // Skips the execution of tests under this TestSuite + void Skip(); + // Runs SetUpTestSuite() for this TestSuite. This wrapper is needed // for catching exceptions thrown from SetUpTestSuite(). void RunSetUpTestSuite() { |