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}
This commit is contained in:
@ -290,6 +290,7 @@ if (rtc_include_tests) {
|
||||
test("rtc_media_unittests") {
|
||||
testonly = true
|
||||
|
||||
defines = []
|
||||
deps = []
|
||||
sources = [
|
||||
"base/codec_unittest.cc",
|
||||
@ -322,6 +323,9 @@ if (rtc_include_tests) {
|
||||
]
|
||||
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.
|
||||
|
||||
@ -3595,7 +3595,11 @@ TEST_F(WebRtcVideoChannel2Test, GetRtpReceiveParametersCodecs) {
|
||||
EXPECT_EQ(kVp9Codec.ToCodecParameters(), rtp_parameters.codecs[1]);
|
||||
}
|
||||
|
||||
#if defined(WEBRTC_USE_H264)
|
||||
TEST_F(WebRtcVideoChannel2Test, GetRtpReceiveFmtpSprop) {
|
||||
#else
|
||||
TEST_F(WebRtcVideoChannel2Test, DISABLED_GetRtpReceiveFmtpSprop) {
|
||||
#endif
|
||||
cricket::VideoRecvParameters parameters;
|
||||
cricket::VideoCodec kH264sprop1(101, "H264", 640, 400, 15);
|
||||
kH264sprop1.SetParam("sprop-parameter-sets", "uvw");
|
||||
|
||||
@ -294,6 +294,11 @@
|
||||
4389, # signed/unsigned mismatch.
|
||||
],
|
||||
'conditions': [
|
||||
['rtc_use_h264==1', {
|
||||
'defines': [
|
||||
'WEBRTC_USE_H264'
|
||||
]
|
||||
}],
|
||||
['OS=="win"', {
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
|
||||
Reference in New Issue
Block a user