commit | a80b43fb5100f72548d3f11cd8737e38563adee1 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Mon May 23 13:56:15 2022 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu May 26 03:13:29 2022 +0000 |
tree | c50b66652e817ec1679d14011ef1320eef15271e | |
parent | c592be595f28b1d9e0af1097f294742b21ce555d [diff] |
pw_unit_test: Restructure as a facade pw_unit_test has been being used as if it is a facade, without actually being structured as one. This causes problems when using upstream GoogleTest. Shared test code might depend on //pw_unit_test and pull in Pigweed's tests headers, even when pw_unit_test_PUBLIC_DEPS is configued to use upstream GoogleTest. Pigweed's test framework is not properly set up, resulting in odd behavior. Also, this means there are multiple versions of gtest/gtest.h, its macros, and ::testing::Test in the build. This change introduces the pw_unit_test_GOOGLETEST_BACKEND build arg and restructures pw_unit_test as a facade, so targets that depend on //pw_unit_test depend on the actual GoogleTest implementation in use, rather than just Pigweed's version. The Pigweed GoogleTest implementation is rebranded as //pw_unit_test:light. This is used as the default pw_unit_test backend. Bug: b/233073669 Change-Id: Ia5c54737a47ed5603ba570b0a356745d14c6015b Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/95843 Reviewed-by: Austin Foxley <afoxley@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com> Reviewed-by: Keir Mierle <keir@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/