Skip unit test if GYP_DEFINES="rtc_use_h264=1" is not set.
Unit test would fail in default configuration (e.g. rtc_use_h264=0), cause it tests instantiating H264 specifics.
BUG=webrtc:6194, webrtc:6198
Review-Url: https://codereview.webrtc.org/2228733004
Cr-Commit-Position: refs/heads/master@{#13929}
diff --git a/webrtc/media/BUILD.gn b/webrtc/media/BUILD.gn
index 7793dfa..e2d9217 100644
--- a/webrtc/media/BUILD.gn
+++ b/webrtc/media/BUILD.gn
@@ -290,6 +290,7 @@
test("rtc_media_unittests") {
testonly = true
+ defines = []
deps = []
sources = [
"base/codec_unittest.cc",
@@ -322,6 +323,9 @@
]
public_configs = [ "..:common_inherited_config" ]
+ if (rtc_use_h264) {
+ defines += [ "WEBRTC_USE_H264" ]
+ }
if (is_win) {
cflags = [
"/wd4245", # conversion from int to size_t, signed/unsigned mismatch.