summaryrefslogtreecommitdiffstats
path: root/googletest/test/BUILD.bazel
Commit message (Collapse)AuthorAgeFilesLines
* Add googletest-message-test to the Bazel testsDerek Mauro2023-08-021-0/+1
| | | | | | | It appears to have been unintentionally left out PiperOrigin-RevId: 553141410 Change-Id: I8adac55a3df0ec12d6fe03446f71858fc702e178
* Use the Abseil flags library when Abseil is presentDerek Mauro2022-04-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When built with `--define=absl=1` under Bazel, GoogleTest flags use ABSL_FLAG instead of GoogleTest's own implementation. There are some minor behavior differences in this mode. The most notable difference is that unrecognized flags result in a flag parsing error, and are not returned to the user though a modified argc/argv, unless they appear after the positional argument delimiter ("--"). For example, to pass a non-Abseil flag, you would have to do ./mytest --gtest_color=false -- --myflag=myvalue The documentation at https://abseil.io/docs/cpp/guides/flags may be helpful in understanding the behavior. There are some other minor differences. For example, passing --help results in the program returning 1 instead of 0. https://github.com/google/googletest/issues/3646 PiperOrigin-RevId: 439312700 Change-Id: Id696a25f50f24a5b1785c45ca8fa59794f86fd5c
* Remove bazelbuild/rules_cc dependencyrefs/pull/3574/headVertexwahn2021-09-171-1/+0
|
* Don't link pthread on QNXrefs/pull/3465/headManuel Binna2021-06-261-0/+1
| | | | | | | On QNX, pthread is part of libc [1]. There's no separate pthread library to link. [1] https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.lib_ref/topic/p/pthread_create.html
* Googletest exportAbseil Team2021-04-081-1/+0
| | | | | | Migrate away from deprecated --heap_check=strict PiperOrigin-RevId: 367226846
* Googletest exportAbseil Team2021-03-221-0/+4
| | | | | | | | | | | | | | | | | | | | Print std::u8string, std::u16string, and std::u32string as string literals Previously, these types were printed as "{ U+123, U+456, U+789 }". However, printed output in that form is difficult to compare against any literals that might be defined in code. Instead, just treat these types like std::string and std::wstring, escaping non-ASCII characters with a hexadecimal escape sequence. The tests have also been updated to cover the new functionality: as a bonus, the tests now also pass with the MSVC toolchain. Internally, the code has been reorganized to primarily operate in terms of char32_t, under the assumption that char32_t will always be at least as big as wchar_t. While that assumption is currently true, perhaps it won't be in the future... PiperOrigin-RevId: 364033132
* Googletest exportAbseil Team2021-02-181-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly skip tests after fatal global environment setup errors Previously the tests were all skipped, but the resulting output claimed all tests passed. Before: ``` [----------] Global test environment set-up. <failure message> [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (83 ms total) [ PASSED ] 1 test. [ FAILED ] 0 tests, listed below: ``` After: ``` [==========] Running 1 test from 1 test suite. [----------] Global test environment set-up. <failure message> [----------] 1 test from SomeTest [ RUN ] SomeTest.DoesFoo <...>: Skipped [ SKIPPED ] SomeTest.DoesFoo (0 ms) [----------] 1 test from SomeTest (0 ms total) [----------] Global test environment tear-down [==========] 1 test from 1 test suite ran. (68 ms total) [ PASSED ] 0 tests. [ SKIPPED ] 1 test, listed below: [ SKIPPED ] SomeTest.DoesFoo [ FAILED ] 0 tests, listed below: ``` PiperOrigin-RevId: 358026389
* Googletest exportdmauro2020-12-221-0/+9
| | | | | | Internal Change PiperOrigin-RevId: 347631521
* Googletest exportdmauro2020-12-101-0/+2
| | | | | | Fix a missing Bazel build dependency PiperOrigin-RevId: 346783462
* Googletest exportAbseil Team2020-03-241-0/+16
| | | | | | | | | | 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
* Googletest exportAbseil Team2020-03-171-2/+0
| | | | | | Internal change PiperOrigin-RevId: 299345492
* Googletest exportAbseil Team2020-02-071-0/+1
| | | | | | | | Deleted an orphaned duplicate file and exclude another that shouldn't be part of :gtest_all_test. This showed up while trying to debug the presubmit failure for: https://github.com/google/googletest/pull/2683 PiperOrigin-RevId: 291398123
* Googletest exportAbseil Team2019-12-061-0/+16
| | | | | | | | | | Change googletest to notice failures during SetUpTestSuite() and TearDownTestSuite(). Previously, errors that occurred during those functions were logged but otherwise ignored. After this change, such failures will cause the test to fail and a brief summary will be printed at the bottom of the test log. See https://github.com/google/googletest/issues/2330. PiperOrigin-RevId: 284033342
* [googletest] Output skip messagerefs/pull/2517/headAlexey Spiridonov2019-10-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | Closes #2208 Previously, skip messages were invisible, so debugging skips was hard. Now we have this: ``` $ ./googletest/gtest_skip_test Running main() from /home/lesha/github/snarkmaster/googletest/googletest/src/gtest_main.cc [==========] Running 3 tests from 2 test suites. [----------] Global test environment set-up. [----------] 1 test from SkipTest [ RUN ] SkipTest.DoesSkip /home/lesha/github/snarkmaster/googletest/googletest/test/gtest_skip_test.cc:38: Skipped skipping single test [ SKIPPED ] SkipTest.DoesSkip (0 ms) [----------] 1 test from SkipTest (1 ms total) ... ```
* Prepare for Bazel incompatible changesYannic Bonenberger2019-08-071-0/+3
| | | | | | Fixes googletest for upcoming `--incompatible_load_cc_rules_from_bzl` (https://github.com/bazelbuild/bazel/issues/8743) and `--incompatible_load_python_rules_from_bzl` (https://github.com/bazelbuild/bazel/issues/9006). This change was automatically generated with `buildifier -lint=fix -warnings=all $(find . -name "BUILD" -o -name "BUILD.bazel" -o -name "*.bzl")`.
* Merge pull request #2203 from ngie-eign:issue-2189Gennadiy Civil2019-04-031-0/+17
|\ | | | | | | PiperOrigin-RevId: 241803437
| * Handle GTEST_SKIP() when calling `Environment::SetUp()`refs/pull/2203/headEnji Cooper2019-03-301-0/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gtest prior to this change would completely ignore `GTEST_SKIP()` if called in `Environment::SetUp()`, instead of bailing out early, unlike `Test::SetUp()`, which would cause the tests themselves to be skipped. The only way (prior to this change) to skip the tests would be to trigger a fatal error via `GTEST_FAIL()`. Desirable behavior, in this case, when dealing with `Environment::SetUp()` is to check for prerequisites on a system (example, kernel supports a particular featureset, e.g., capsicum), and skip the tests. The alternatives prior to this change would be undesirable: - Failing sends the wrong message to the test user, as the result of the tests is indeterminate, not failed. - Having to add per-test class abstractions that override `SetUp()` to test for the capsicum feature set, then skip all of the tests in their respective SetUp fixtures, would be a lot of human and computational work; checking for the feature would need to be done for all of the tests, instead of once for all of the tests. For those reasons, making `Environment::SetUp()` handle `GTEST_SKIP()`, by not executing the testcases, is the most desirable solution. In order to properly diagnose what happened when running the tests if they are skipped, print out the diagnostics in an ad hoc manner. Update the documentation to note this change and integrate a new test, gtest_skip_in_environment_setup_test, into the test suite. This change addresses #2189. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Googletest exportmisterg2018-12-171-0/+7
| | | | | | Internal Change PiperOrigin-RevId: 225849972
* Googletest exportkrzysio2018-11-071-48/+18
| | | | | | | | Improve Bazel build files. New target gtest_prod allows access to the FRIEND_TEST macro without depending on the entirety of GTest in production executables. Additionally, duplicate config_setting rules were removed and formatting was adjusted. PiperOrigin-RevId: 220279205
* Project import generated by Copybara.Abseil Team2018-10-111-0/+524
| | | | PiperOrigin-RevId: 216423319
* Internal Changemisterg2018-10-111-524/+0
| | | | PiperOrigin-RevId: 216417182
* Update BUILD.bazelGennadiy Civil2018-10-091-5/+2
| | | Remove references to googletest-tuple-test.cc
* cmake fixesGennadiy Civil2018-08-021-2/+2
|
* fixes testsGennadiy Civil2018-08-021-2/+2
|
* cleaning up and adding test changes to CMakeGennadiy Civil2018-08-021-1/+1
|
* various changes to testsGennadiy Civil2018-08-011-7/+49
|
* more test changesGennadiy Civil2018-08-011-3/+3
|
* adding googletest-json-output unitestGennadiy Civil2018-08-011-0/+21
|
* more test changesGennadiy Civil2018-08-011-0/+14
|
* more tests changesGennadiy Civil2018-08-011-5/+25
|
* googletest list tests unitestGennadiy Civil2018-08-011-5/+5
|
* gtest catch exceptions test and gtest shuffle testGennadiy Civil2018-08-011-20/+16
|
* changes to googletest break on failure and googletest filter unittestsGennadiy Civil2018-08-011-16/+23
|
* changes for googletest env var testGennadiy Civil2018-08-011-6/+6
|
* googltest-color-test changesGennadiy Civil2018-08-011-5/+5
|
* googletest-output-test changesGennadiy Civil2018-08-011-6/+7
|
* Formatting changes and upstreaming one testGennadiy Civil2018-08-011-0/+8
|
* Adds stacktrace support from Abseil to Google TestDerek Mauro2018-07-101-20/+42
| | | | | | | | | | | | | | | | | | | This change adds the ability to generate stacktraces in Google Test on both failures of assertions/expectations and on crashes. The stacktrace support is conditionally available only when using Abseil with Google Test. To use this support, run the test under Bazel with a command like this: bazel test --define absl=1 --test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1 //path/to/your:test The "--define absl=1" part enables stacktraces on assertion/expectation failures. The "--test_env=GTEST_INSTALL_FAILURE_SIGNAL_HANDLER=1" part enables the signal handler that logs a stacktrace in the event of a crash (this also requires the "--define absl=1" part). This is not the default since it may interfere with existing tests.
* Eliminate GTEST_TEST_FILTER_ENV_VAR_.refs/pull/1622/headRohan Joyce2018-06-141-0/+16
| | | | | | | | GTEST_TEST_FILTER_ENV_VAR_ was used to specify an environment variable to obtain the default test filter from. By default it was unset which broke "--test_filter" for bazel. This CL eliminates GTEST_TEST_FILTER_ENV_VAR_ and explicitly obtains the default test filter from the environment variable TESTBRIDGE_TEST_ONLY if it exists.
* mergesrefs/pull/1469/headGennadiy Civil2018-02-221-0/+10
|
* Add ability to throw from ASSERTAlexey Sokolov2018-02-081-0/+7
| | | | | | | while not losing benefits of EXPECT, and not killing the whole test, as with --gtest_throw_on_failure. 183822976
* Adding python tests to Bazel build file. refs/pull/1412/headGennadiy Civil2018-01-181-1/+243
|
* [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvcrefs/pull/1388/headLoo Rong Jie2018-01-091-3/+6
| | | | and x64_windows_msvc
* Addressing Commentsrefs/pull/1191/headmisterg2017-08-101-46/+22
|
* Added Copyrightmisterg2017-08-101-4/+32
|
* Initial Revision, review 164634031misterg2017-08-101-2/+0
|
* WIPmisterg2017-08-091-29/+3
|
* WIP, win testingmisterg2017-08-081-4/+7
|
* WIP, windows testingmisterg2017-08-081-2/+2
|
* WIP, windows testingmisterg2017-08-081-2/+2
|