aboutsummaryrefslogtreecommitdiff
path: root/BUILD.bazel
AgeCommit message (Collapse)AuthorFilesLines
2024-02-27Reland ↵Abseil Team1-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
2024-02-21Rollback ↵Derek Mauro1-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
2024-02-13Support Fuchsia target builds.Abseil Team1-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
2023-05-08Add missing absl dependency from build.pateldeev1-0/+1
2022-04-26Use RE2 for the regex implementation when building with Bazel and using AbseilDerek Mauro1-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
2022-04-04Use the Abseil flags library when Abseil is presentDerek Mauro1-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
2021-10-08Fix linker errors on FreeBSD.Yesudeep Mangalapilly1-0/+12
2021-09-17Remove bazelbuild/rules_cc dependencyVertexwahn1-2/+0
2021-07-07Link -lregex on QNXManuel Binna1-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
2021-06-26Don't link pthread on QNXManuel Binna1-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
2021-05-25Googletest exportAbseil Team1-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
2021-04-26Googletest exportAbseil Team1-0/+10
Fix iOS logging issues in tests PiperOrigin-RevId: 370484087
2021-03-22Googletest exportAbseil Team1-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
2021-03-14Use @platforms instead of @bazel_tools for windows constraintEzekiel Warren1-1/+1
2020-08-12Export LICENSERob Earhart1-0/+2
This makes it easier to include the license in redistributions, as required by the license.
2020-05-29specialize UniversalPrinter<> for std::any (without support for RTTI)Krystian Kuzniarek1-0/+1
2019-08-07Prepare for Bazel incompatible changesYannic Bonenberger1-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")`.
2019-04-29Googletest exportmisterg1-2/+0
Internal Change PiperOrigin-RevId: 245788057
2019-01-22Enable CI on Windows (appveyor) with BazelPavel Samolysov1-0/+5
Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
2019-01-14Enable building as a shared library (dll) on Windows with BazelPavel Samolysov1-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>
2018-12-03Googletest exportmisterg1-2/+0
Fix bazel issue PiperOrigin-RevId: 223829127
2018-12-03Googletest exportmisterg1-0/+2
Fix bazel issue PiperOrigin-RevId: 223823930
2018-11-07Googletest exportkrzysio1-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
2018-10-01Googletest exportmisterg1-0/+180
Internal Change PiperOrigin-RevId: 215236414
2018-10-01Googletest exportdurandal1-180/+0
Add myself to the authors table. PiperOrigin-RevId: 214822035
2018-07-12Merge branch 'master' into stacktraceDerek Mauro1-0/+1
2018-07-12Adds the UniversalPrinter for absl::variant.Derek Mauro1-17/+19
2018-07-10Adds stacktrace support from Abseil to Google TestDerek Mauro1-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.
2018-01-31Merges and also adding new bazel build modeGennadiy Civil1-0/+1
2018-01-30Ability to optionally depend on Abseil plus upstream of 183716547Gennadiy Civil1-0/+20
2018-01-09[Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvcLoo Rong Jie1-3/+10
and x64_windows_msvc
2017-08-18Also can build when included in source.Zhongming Qu1-1/+1
2017-08-18Remove trailing whitespaces in BUILD.bazelZhongming Qu1-2/+2
2017-08-10Addressing commentsmisterg1-5/+1
2017-08-10Added Copyrightmisterg1-5/+32
2017-08-10Initial Revision, review 164634031misterg1-1/+2
2017-08-09WIPmisterg1-10/+7
2017-08-09WIPmisterg1-69/+9
2017-08-08WIP, win testingmisterg1-3/+3
2017-08-08WIPmisterg1-142/+60
2017-08-02WIPmisterg1-36/+20
2017-08-02WIPmisterg1-23/+15
2017-08-01WIPmisterg1-8/+8
2017-08-01WIPmisterg1-0/+292