Rewrite the lib link test to just be a binary.
This works on mobile and has less dependencies. There's no upside to
using gtest since I'm not planning on running the test anyway, so this
is a much better solution.
Bug: webrtc:11027
Change-Id: Id63af7086b9d9c9199c62bc8654b4202a4a1f759
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157380
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29529}
diff --git a/BUILD.gn b/BUILD.gn
index f7eca78..cdc2b4e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -42,6 +42,7 @@
":rtc_unittests",
":slow_tests",
":video_engine_tests",
+ ":webrtc_lib_link_test",
":webrtc_nonparallel_tests",
":webrtc_perf_tests",
"common_audio:common_audio_unittests",
@@ -73,9 +74,6 @@
} else {
deps += [ "modules/video_capture:video_capture_tests" ]
}
- if (!is_android && !is_ios) {
- deps += [ ":webrtc_lib_link_test" ]
- }
if (rtc_enable_protobuf) {
deps += [
"audio:low_bandwidth_audio_test",
@@ -466,19 +464,17 @@
}
}
- if (rtc_include_tests && !is_android && !is_ios) {
- # Note: This test can't work on mobile because the test runner machinery
- # on those platforms depend on abseil, which will link-clash with libwebrtc.
- rtc_test("webrtc_lib_link_test") {
+ if (rtc_include_tests) {
+ rtc_executable("webrtc_lib_link_test") {
testonly = true
sources = [
"webrtc_lib_link_test.cc",
]
deps = [
+ # NOTE: Don't add deps here. If this test fails to link, it means you
+ # need to add stuff to the webrtc static lib target above.
":webrtc",
- "//test:test_main",
- "//testing/gtest",
]
}
}