Commit Graph

28 Commits

Author SHA1 Message Date
Yannic Bonenberger
6fd262ecf7 Prepare for Bazel incompatible changes
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-08-07 17:08:10 +02:00
misterg
82f9c8d65d Googletest export
Internal Change

PiperOrigin-RevId: 245788057
2019-04-29 14:32:28 -04:00
Pavel Samolysov
91bfc08228 Enable CI on Windows (appveyor) with Bazel
Signed-off-by: Pavel Samolysov <samolisov@gmail.com>
2019-01-22 12:28:09 +03:00
Pavel Samolysov
c868da1988 Enable building as a shared library (dll) on Windows with Bazel
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>
2019-01-14 16:20:56 +03:00
misterg
3fd66989bb Googletest export
Fix bazel issue

PiperOrigin-RevId: 223829127
2018-12-03 14:22:48 -05:00
misterg
ba344cbc40 Googletest export
Fix bazel issue

PiperOrigin-RevId: 223823930
2018-12-03 13:58:20 -05:00
krzysio
105579a6e4 Googletest export
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-11-07 14:37:18 -05:00
misterg
a7b21c950d Googletest export
Internal Change

PiperOrigin-RevId: 215236414
2018-10-01 14:31:07 -04:00
durandal
be429c8924 Googletest export
Add myself to the authors table.

PiperOrigin-RevId: 214822035
2018-10-01 14:30:53 -04:00
Derek Mauro
82670da613 Merge branch 'master' into stacktrace 2018-07-12 16:51:04 -04:00
Derek Mauro
6c7878a151 Adds the UniversalPrinter for absl::variant. 2018-07-12 13:46:50 -04:00
Derek Mauro
4c41787764 Adds stacktrace support from Abseil to Google Test
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-07-10 14:30:42 -04:00
Gennadiy Civil
e6ec8bc52f Merges and also adding new bazel build mode 2018-01-31 12:05:18 -05:00
Gennadiy Civil
2a4683021a Ability to optionally depend on Abseil plus upstream of 183716547 2018-01-30 11:42:03 -05:00
Loo Rong Jie
cbd15d417e [Bazel] Detect Windows with cpu value x64_windows and x64_windows_msvc
and x64_windows_msvc
2018-01-09 08:29:44 +08:00
Zhongming Qu
99d0ef39a6 Also can build when included in source. 2017-08-18 04:00:02 -07:00
Zhongming Qu
9538687a89 Remove trailing whitespaces in BUILD.bazel 2017-08-18 03:59:53 -07:00
misterg
c3f65335b7 Addressing comments 2017-08-10 15:33:09 -04:00
misterg
cb5b05436d Added Copyright 2017-08-10 12:03:27 -04:00
misterg
b98e30b427 Initial Revision, review 164634031 2017-08-10 11:54:46 -04:00
misterg
66a036959f WIP 2017-08-09 14:37:58 -04:00
misterg
ac885f3ab2 WIP 2017-08-09 11:47:54 -04:00
misterg
e66b6bc868 WIP, win testing 2017-08-08 15:41:44 -04:00
misterg
8815087cfa WIP 2017-08-08 15:17:56 -04:00
misterg
aa31cb67c2 WIP 2017-08-02 15:40:14 -04:00
misterg
6615f7df11 WIP 2017-08-02 14:36:39 -04:00
misterg
b3edada290 WIP 2017-08-01 14:50:59 -04:00
misterg
f63e2a14a2 WIP 2017-08-01 14:36:29 -04:00