aboutsummaryrefslogtreecommitdiff
path: root/pw_unit_test
diff options
context:
space:
mode:
authorCarlos Chinchilla <cachinchilla@google.com>2023-11-30 02:19:55 +0000
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-11-30 02:19:55 +0000
commita5da9446fb2c7f6e33f6d995e347858cefb2aec3 (patch)
tree2b1395768ca5420873587716f6bd63bc647290cd /pw_unit_test
parent5a521cb4f24cfd6797fbb14d287ec5e90f452253 (diff)
downloadpigweed-a5da9446fb2c7f6e33f6d995e347858cefb2aec3.tar.gz
pw_unit_test: Skip googletest tests if not set
Disable tests that use the full functionality of googletest when the unit test backend is not set or is the Pigweed light version. Change-Id: Ib2b5e023691ce2ed7b02a68f8ff1f9e7d9d55d5e Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/183089 Reviewed-by: Ted Pudlik <tpudlik@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed-service-accounts.iam.gserviceaccount.com> Pigweed-Auto-Submit: Carlos Chinchilla <cachinchilla@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'pw_unit_test')
-rw-r--r--pw_unit_test/BUILD.gn3
-rw-r--r--pw_unit_test/CMakeLists.txt3
2 files changed, 4 insertions, 2 deletions
diff --git a/pw_unit_test/BUILD.gn b/pw_unit_test/BUILD.gn
index 714acec38..5cddaf17a 100644
--- a/pw_unit_test/BUILD.gn
+++ b/pw_unit_test/BUILD.gn
@@ -127,7 +127,8 @@ pw_source_set("googletest_test_matchers") {
}
pw_test("googletest_test_matchers_test") {
- enable_if = pw_unit_test_GOOGLETEST_BACKEND != ""
+ enable_if = pw_unit_test_GOOGLETEST_BACKEND != "" &&
+ pw_unit_test_GOOGLETEST_BACKEND != "$dir_pw_unit_test:light"
sources = [ "googletest_test_matchers_test.cc" ]
deps = [ ":googletest_test_matchers" ]
}
diff --git a/pw_unit_test/CMakeLists.txt b/pw_unit_test/CMakeLists.txt
index 6892f46d0..464519bb3 100644
--- a/pw_unit_test/CMakeLists.txt
+++ b/pw_unit_test/CMakeLists.txt
@@ -74,7 +74,8 @@ pw_add_library(pw_unit_test.googletest_style_event_handler STATIC
googletest_style_event_handler.cc
)
-if(NOT ${pw_unit_test_GOOGLETEST_BACKEND} STREQUAL "")
+if(NOT ${pw_unit_test_GOOGLETEST_BACKEND} STREQUAL "" AND
+ NOT ${pw_unit_test_GOOGLETEST_BACKEND} STREQUAL "pw_unit_test.light")
pw_add_library(pw_unit_test.googletest_test_matchers INTERFACE
HEADERS
public/pw_unit_test/googletest_test_matchers.h