summaryrefslogtreecommitdiffstats
path: root/BUILD.bazel
Commit message (Collapse)AuthorAgeFilesLines
* Reland ↵Abseil Team2024-02-271-0/+17
| | | | | | | | | | | https://github.com/google/googletest/commit/9756ee7cbaef1b6652065616ab832810a6032bbf Since Fuchsia engineers rarely work within this repo, initialize a lightweight fake @fuchsia_sdk repo rather than distributing the Fuchsia SDK here. Tested locally via `bazel query --[no]enable_bzlmod "deps(set(//googletest/test:gtest_all_test))"` (#4472) PiperOrigin-RevId: 610826859 Change-Id: I7d41b1dbe9e7f133fe535d7337dc5bff5bf97d3a
* Rollback ↵Derek Mauro2024-02-211-17/+0
| | | | | | | | | | | https://github.com/google/googletest/commit/9756ee7cbaef1b6652065616ab832810a6032bbf The commit breaks some bazel commands without @fuchsia_sdk being listed as a dependency. Fixes #4472 PiperOrigin-RevId: 609057667 Change-Id: I32ea8237862d7c10add55304ecc4547a7304ce36
* Support Fuchsia target builds.Abseil Team2024-02-141-0/+17
| | | | | | | | | | | | | | | | | | The Fuchsia team has been using either fork branches (https://fuchsia.googlesource.com/third_ party/github.com/google/googletest/+/refs/heads/sandbox/fuchsia_bazel_sdk) or patch files (https://cs.opensource.google/fuchsia/fuchsia/+/main:build/bazel/patches/googletest/fuchsia-support.bundle) to support googletest-based tests that run against a Fuchsia target device. As our SDK is maturing and @platforms//os:fuchsia constraint has been added for a while now, upstream Fuchsia gtest support to reduce technical debt and overhead. This change is noop for non-fuchsia platform builds. PiperOrigin-RevId: 606843739 Change-Id: I61e0eb9c641f288d7ae57354fc0b484fce013223
* Add missing absl dependency from build.refs/pull/4234/headpateldeev2023-05-081-0/+1
|
* Use RE2 for the regex implementation when building with Bazel and using AbseilDerek Mauro2022-04-261-0/+1
| | | | | | | | | | | | | | | | | | | bazel build --define=absl=1 ... A dependency on RE2 is now required when building GoogleTest with Abseil. Using RE2 will provide a consistent cross-platform regex experience. Users will need to add the com_googlesource_code_re2, bazel_skylib, and platforms repository to their WORKSPACE files. See our WORKSPACE file in the root directory of this project for an example of how to add the dependencies. Please note that the com_googlesource_code_re2 dependency must use a commit from the `abseil` branch of the project: https://github.com/google/re2/tree/abseil PiperOrigin-RevId: 444650118 Change-Id: I45c55b26684c0c50d721a05b81c5f8a0c092400f
* Use the Abseil flags library when Abseil is presentDerek Mauro2022-04-041-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix linker errors on FreeBSD.refs/pull/3602/headYesudeep Mangalapilly2021-10-081-0/+12
|
* Remove bazelbuild/rules_cc dependencyrefs/pull/3574/headVertexwahn2021-09-171-2/+0
|
* Link -lregex on QNXrefs/pull/3484/headManuel Binna2021-07-071-1/+1
| | | | | | According to the 2nd point on [1], -lregex is required on QNX. [1] https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.ide.userguide/topic/writing_test_programs.html
* Don't link pthread on QNXrefs/pull/3465/headManuel Binna2021-06-261-0/+7
| | | | | | | 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-05-251-10/+0
| | | | | | | | | | | | | | | | | Remove the dependency on Objective C++ in iOS builds. 252ce9c52d304659eff6be558209c811b7191963 introduced the use of NSTemporaryDirectory() on iOS, which requires Core Foundation, and Objective C++. This CL replaces NSTemporaryDirectory() with an equivalent solution (according to Apple's documentation at [1]) available to C/C++ code. Avoiding Objective C++ and Core Foundation makes it easier to integrate googletest in projects that can't use the supplied Bazel build files. [1] https://developer.apple.com/library/archive/documentation/Security/Conceptual/SecureCodingGuide/Articles/RaceConditions.html#//apple_ref/doc/uid/TP40002585-SW10 PiperOrigin-RevId: 375474990
* Googletest exportAbseil Team2021-04-261-0/+10
| | | | | | Fix iOS logging issues in tests PiperOrigin-RevId: 370484087
* Googletest exportAbseil Team2021-03-221-0/+8
| | | | | | | | | | | | | | | | | | | | 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
* Use @platforms instead of @bazel_tools for windows constraintrefs/pull/3315/headEzekiel Warren2021-03-151-1/+1
|
* Export LICENSErefs/pull/2984/headRob Earhart2020-08-121-0/+2
| | | This makes it easier to include the license in redistributions, as required by the license.
* specialize UniversalPrinter<> for std::any (without support for RTTI)Krystian Kuzniarek2020-05-291-0/+1
|
* Prepare for Bazel incompatible changesYannic Bonenberger2019-08-071-8/+10
| | | | | | 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")`.
* Googletest exportmisterg2019-04-291-2/+0
| | | | | | Internal Change PiperOrigin-RevId: 245788057
* Enable CI on Windows (appveyor) with Bazelrefs/pull/2061/headPavel Samolysov2019-01-221-0/+5
| | | | Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
* Enable building as a shared library (dll) on Windows with BazelPavel Samolysov2019-01-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the google test library is being built as a shared library using Bazel, so that there is a rule like cc_test( name = "iterator_traits_test", linkstatic = 0, deps = ["@gtest//:gtest_main"], ... ) in a BUILD file, the following error appears on Windows: INFO: Found 1 test target... ERROR: C:/../external/gtest/BUILD.bazel:55:1: output 'external/gtest/gtest.if.lib' was not created ERROR: C:/../external/gtest/BUILD.bazel:55:1: not all outputs were created or valid Target //test:iterator_traits_test failed to build The reason is a missing "win_def_file" attribute of the "gtest" and "gtest_main" rules in the BUILD.bazel inside the google test library package. The "windows_export_all_symbols" feature is added to the rules, this feature forces Bazel to export all symbols from the google test library to linker. I believe exporting all symbols from a testing library makes no problem for the application from a point of view on encapsulation. Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
* Googletest exportmisterg2018-12-031-2/+0
| | | | | | Fix bazel issue PiperOrigin-RevId: 223829127
* Googletest exportmisterg2018-12-031-0/+2
| | | | | | Fix bazel issue PiperOrigin-RevId: 223823930
* Googletest exportkrzysio2018-11-071-43/+29
| | | | | | | | 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
* Googletest exportrefs/pull/1875/headmisterg2018-10-011-0/+180
| | | | | | Internal Change PiperOrigin-RevId: 215236414
* Googletest exportdurandal2018-10-011-180/+0
| | | | | | Add myself to the authors table. PiperOrigin-RevId: 214822035
* Merge branch 'master' into stacktracerefs/pull/1653/headDerek Mauro2018-07-121-0/+1
|\
| * Adds the UniversalPrinter for absl::variant.refs/pull/1662/headDerek Mauro2018-07-121-17/+19
| |
* | Adds stacktrace support from Abseil to Google TestDerek Mauro2018-07-101-17/+21
|/ | | | | | | | | | | | | | | | | | | 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.
* Merges and also adding new bazel build moderefs/pull/1435/headGennadiy Civil2018-01-311-0/+1
|
* Ability to optionally depend on Abseil plus upstream of 183716547refs/pull/1434/headGennadiy Civil2018-01-301-0/+20
|
* [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvcrefs/pull/1388/headLoo Rong Jie2018-01-091-3/+10
| | | | and x64_windows_msvc
* Also can build when included in source.Zhongming Qu2017-08-181-1/+1
|
* Remove trailing whitespaces in BUILD.bazelZhongming Qu2017-08-181-2/+2
|
* Addressing commentsmisterg2017-08-101-5/+1
|
* Added Copyrightmisterg2017-08-101-5/+32
|
* Initial Revision, review 164634031misterg2017-08-101-1/+2
|
* WIPrefs/pull/1190/headmisterg2017-08-091-10/+7
|
* WIPmisterg2017-08-091-69/+9
|
* WIP, win testingmisterg2017-08-081-3/+3
|
* WIPmisterg2017-08-081-142/+60
|
* WIPmisterg2017-08-021-36/+20
|
* WIPmisterg2017-08-021-23/+15
|
* WIPmisterg2017-08-011-8/+8
|
* WIPmisterg2017-08-011-0/+292