diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 0c36221b7d..1f7f52104a 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -685,6 +685,23 @@ if (rtc_include_tests) { } # TODO(pbos): Rename test suite, this is no longer "just" for video targets. + if (is_android || is_ios) { + video_engine_tests_resources = [ + "//resources/foreman_cif_short.yuv", + "//resources/voice_engine/audio_long16.pcm", + ] + } + + if (is_ios) { + bundle_data("video_engine_tests_bundle_data") { + testonly = true + sources = video_engine_tests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("video_engine_tests") { testonly = true deps = [ @@ -702,13 +719,12 @@ if (rtc_include_tests) { } if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] + data = video_engine_tests_resources shard_timeout = 900 } - if (is_android || is_ios) { - data = [ - "//resources/foreman_cif_short.yuv", - "//resources/voice_engine/audio_long16.pcm", - ] + + if (is_ios) { + deps += [ ":video_engine_tests_bundle_data" ] } } @@ -735,6 +751,33 @@ if (rtc_include_tests) { } } + if (is_android || is_ios) { + webrtc_perf_tests_resources = [ + "//resources/audio_coding/speech_mono_16kHz.pcm", + "//resources/audio_coding/testfile32kHz.pcm", + "//resources/ConferenceMotion_1280_720_50.yuv", + "//resources/difficult_photo_1850_1110.yuv", + "//resources/foreman_cif.yuv", + "//resources/google-wifi-3mbps.rx", + "//resources/paris_qcif.yuv", + "//resources/photo_1850_1110.yuv", + "//resources/presentation_1850_1110.yuv", + "//resources/verizon4g-downlink.rx", + "//resources/voice_engine/audio_long16.pcm", + "//resources/web_screenshot_1850_1110.yuv", + ] + } + + if (is_ios) { + bundle_data("webrtc_perf_tests_bundle_data") { + testonly = true + sources = webrtc_perf_tests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("webrtc_perf_tests") { testonly = true configs += [ @@ -770,22 +813,12 @@ if (rtc_include_tests) { ] if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] - data = [ - "//resources/audio_coding/speech_mono_16kHz.pcm", - "//resources/audio_coding/testfile32kHz.pcm", - "//resources/ConferenceMotion_1280_720_50.yuv", - "//resources/difficult_photo_1850_1110.yuv", - "//resources/foreman_cif.yuv", - "//resources/google-wifi-3mbps.rx", - "//resources/paris_qcif.yuv", - "//resources/photo_1850_1110.yuv", - "//resources/presentation_1850_1110.yuv", - "//resources/verizon4g-downlink.rx", - "//resources/voice_engine/audio_long16.pcm", - "//resources/web_screenshot_1850_1110.yuv", - ] + data = webrtc_perf_tests_resources shard_timeout = 2700 } + if (is_ios) { + deps += [ ":webrtc_perf_tests_bundle_data" ] + } if (is_clang) { # Suppress warnings from the Chromium Clang plugin. # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. diff --git a/webrtc/common_video/BUILD.gn b/webrtc/common_video/BUILD.gn index 7c03ffdb40..ed5a738782 100644 --- a/webrtc/common_video/BUILD.gn +++ b/webrtc/common_video/BUILD.gn @@ -82,6 +82,20 @@ source_set("common_video") { } if (rtc_include_tests) { + if (is_android || is_ios) { + common_video_resources = [ "//resources/foreman_cif.yuv" ] + } + + if (is_ios) { + bundle_data("common_video_unittests_bundle_data") { + testonly = true + sources = common_video_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("common_video_unittests") { testonly = true @@ -118,13 +132,12 @@ if (rtc_include_tests) { if (is_android) { deps += [ "//testing/android/native_test:native_test_support" ] + data = common_video_resources shard_timeout = 900 } - if (is_android || is_ios) { - data = [ - "//resources/foreman_cif.yuv", - ] + if (is_ios) { + deps += [ ":common_video_unittests_bundle_data" ] } } } diff --git a/webrtc/media/BUILD.gn b/webrtc/media/BUILD.gn index c1eaea257d..0014e2d615 100644 --- a/webrtc/media/BUILD.gn +++ b/webrtc/media/BUILD.gn @@ -298,6 +298,28 @@ if (rtc_include_tests) { } } + if (is_android || is_ios) { + rtc_media_unittests_resources = [ + "//resources/media/captured-320x240-2s-48.frames", + "//resources/media/faces.1280x720_P420.yuv", + "//resources/media/faces_I420.jpg", + "//resources/media/faces_I422.jpg", + "//resources/media/faces_I444.jpg", + "//resources/media/faces_I411.jpg", + "//resources/media/faces_I400.jpg", + ] + } + + if (is_ios) { + bundle_data("rtc_media_unittests_bundle_data") { + testonly = true + sources = rtc_media_unittests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("rtc_media_unittests") { testonly = true @@ -355,18 +377,12 @@ if (rtc_include_tests) { if (is_android) { deps += [ "//testing/android/native_test:native_test_support" ] + data = rtc_media_unittests_resources shard_timeout = 900 } - if (is_android || is_ios) { - data = [ - "//resources/media/captured-320x240-2s-48.frames", - "//resources/media/faces.1280x720_P420.yuv", - "//resources/media/faces_I420.jpg", - "//resources/media/faces_I422.jpg", - "//resources/media/faces_I444.jpg", - "//resources/media/faces_I411.jpg", - "//resources/media/faces_I400.jpg", - ] + + if (is_ios) { + deps += [ ":rtc_media_unittests_bundle_data" ] } deps += [ diff --git a/webrtc/modules/BUILD.gn b/webrtc/modules/BUILD.gn index 873c978680..92284a1da6 100644 --- a/webrtc/modules/BUILD.gn +++ b/webrtc/modules/BUILD.gn @@ -33,6 +33,25 @@ group("modules") { } if (rtc_include_tests) { + if (is_android || is_ios) { + modules_tests_resources = [ + "//resources/audio_coding/testfile32kHz.pcm", + "//resources/audio_coding/teststereo32kHz.pcm", + "//resources/foreman_cif.yuv", + "//resources/paris_qcif.yuv", + ] + } + + if (is_ios) { + bundle_data("modules_tests_bundle_data") { + testonly = true + sources = modules_tests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("modules_tests") { testonly = true @@ -84,15 +103,12 @@ if (rtc_include_tests) { if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] + data = modules_tests_resources shard_timeout = 900 } - if (is_android || is_ios) { - data = [ - "//resources/audio_coding/testfile32kHz.pcm", - "//resources/audio_coding/teststereo32kHz.pcm", - "//resources/foreman_cif.yuv", - "//resources/paris_qcif.yuv", - ] + + if (is_ios) { + deps += [ ":modules_tests_bundle_data" ] } if (is_clang) { @@ -109,6 +125,121 @@ if (rtc_include_tests) { } } + if (is_android || is_ios) { + modules_unittests_resources = [ + "//data/audio_processing/output_data_fixed.pb", + "//data/audio_processing/output_data_float.pb", + "//data/audio_processing/output_data_mac.pb", + "//data/voice_engine/audio_tiny48.wav", + "//resources/att-downlink.rx", + "//resources/att-uplink.rx", + "//resources/audio_coding/neteq_opus.rtp", + "//resources/audio_coding/neteq_universal_new.rtp", + "//resources/audio_coding/speech_mono_16kHz.pcm", + "//resources/audio_coding/speech_mono_32_48kHz.pcm", + "//resources/audio_coding/testfile32kHz.pcm", + "//resources/audio_coding/teststereo32kHz.pcm", + "//resources/audio_device/audio_short16.pcm", + "//resources/audio_device/audio_short44.pcm", + "//resources/audio_device/audio_short48.pcm", + "//resources/audio_processing/agc/agc_audio.pcm", + "//resources/audio_processing/agc/agc_no_circular_buffer.dat", + "//resources/audio_processing/agc/agc_pitch_gain.dat", + "//resources/audio_processing/agc/agc_pitch_lag.dat", + "//resources/audio_processing/agc/agc_spectral_peak.dat", + "//resources/audio_processing/agc/agc_vad.dat", + "//resources/audio_processing/agc/agc_voicing_prob.dat", + "//resources/audio_processing/agc/agc_with_circular_buffer.dat", + "//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm", + "//resources/audio_processing/transient/audio16kHz.pcm", + "//resources/audio_processing/transient/audio32kHz.pcm", + "//resources/audio_processing/transient/audio48kHz.pcm", + "//resources/audio_processing/transient/audio8kHz.pcm", + "//resources/audio_processing/transient/detect16kHz.dat", + "//resources/audio_processing/transient/detect32kHz.dat", + "//resources/audio_processing/transient/detect48kHz.dat", + "//resources/audio_processing/transient/detect8kHz.dat", + "//resources/audio_processing/transient/double-utils.dat", + "//resources/audio_processing/transient/float-utils.dat", + "//resources/audio_processing/transient/suppressed16kHz.pcm", + "//resources/audio_processing/transient/suppressed32kHz.pcm", + "//resources/audio_processing/transient/suppressed8kHz.pcm", + "//resources/audio_processing/transient/wpd0.dat", + "//resources/audio_processing/transient/wpd1.dat", + "//resources/audio_processing/transient/wpd2.dat", + "//resources/audio_processing/transient/wpd3.dat", + "//resources/audio_processing/transient/wpd4.dat", + "//resources/audio_processing/transient/wpd5.dat", + "//resources/audio_processing/transient/wpd6.dat", + "//resources/audio_processing/transient/wpd7.dat", + "//resources/deflicker_before_cif_short.yuv", + "//resources/far16_stereo.pcm", + "//resources/far32_stereo.pcm", + "//resources/far44_stereo.pcm", + "//resources/far48_stereo.pcm", + "//resources/far8_stereo.pcm", + "//resources/foremanColorEnhanced_cif_short.yuv", + "//resources/foreman_cif.yuv", + "//resources/foreman_cif_short.yuv", + "//resources/near16_stereo.pcm", + "//resources/near32_stereo.pcm", + "//resources/near44_stereo.pcm", + "//resources/near48_stereo.pcm", + "//resources/near8_stereo.pcm", + "//resources/ref03.aecdump", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin", + "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin", + "//resources/short_mixed_mono_48.dat", + "//resources/short_mixed_mono_48_arm.dat", + "//resources/short_mixed_mono_48.pcm", + "//resources/short_mixed_stereo_48.dat", + "//resources/short_mixed_stereo_48.pcm", + "//resources/sprint-downlink.rx", + "//resources/sprint-uplink.rx", + "//resources/synthetic-trace.rx", + "//resources/tmobile-downlink.rx", + "//resources/tmobile-uplink.rx", + "//resources/utility/encapsulated_pcm16b_8khz.wav", + "//resources/utility/encapsulated_pcmu_8khz.wav", + "//resources/verizon3g-downlink.rx", + "//resources/verizon3g-uplink.rx", + "//resources/verizon4g-downlink.rx", + "//resources/verizon4g-uplink.rx", + ] + } + + if (is_ios) { + bundle_data("modules_unittests_bundle_data") { + testonly = true + sources = modules_unittests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("modules_unittests") { testonly = true @@ -514,115 +645,11 @@ if (rtc_include_tests) { "audio_device/android/ensure_initialized.cc", "audio_device/android/ensure_initialized.h", ] + data = modules_unittests_resources shard_timeout = 900 } - - if (is_android || is_ios) { - data = [ - "//data/audio_processing/output_data_fixed.pb", - "//data/audio_processing/output_data_float.pb", - "//data/audio_processing/output_data_mac.pb", - "//data/voice_engine/audio_tiny48.wav", - "//resources/att-downlink.rx", - "//resources/att-uplink.rx", - "//resources/audio_coding/neteq_opus.rtp", - "//resources/audio_coding/neteq_universal_new.rtp", - "//resources/audio_coding/speech_mono_16kHz.pcm", - "//resources/audio_coding/speech_mono_32_48kHz.pcm", - "//resources/audio_coding/testfile32kHz.pcm", - "//resources/audio_coding/teststereo32kHz.pcm", - "//resources/audio_device/audio_short16.pcm", - "//resources/audio_device/audio_short44.pcm", - "//resources/audio_device/audio_short48.pcm", - "//resources/audio_processing/agc/agc_audio.pcm", - "//resources/audio_processing/agc/agc_no_circular_buffer.dat", - "//resources/audio_processing/agc/agc_pitch_gain.dat", - "//resources/audio_processing/agc/agc_pitch_lag.dat", - "//resources/audio_processing/agc/agc_spectral_peak.dat", - "//resources/audio_processing/agc/agc_vad.dat", - "//resources/audio_processing/agc/agc_voicing_prob.dat", - "//resources/audio_processing/agc/agc_with_circular_buffer.dat", - "//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm", - "//resources/audio_processing/transient/audio16kHz.pcm", - "//resources/audio_processing/transient/audio32kHz.pcm", - "//resources/audio_processing/transient/audio48kHz.pcm", - "//resources/audio_processing/transient/audio8kHz.pcm", - "//resources/audio_processing/transient/detect16kHz.dat", - "//resources/audio_processing/transient/detect32kHz.dat", - "//resources/audio_processing/transient/detect48kHz.dat", - "//resources/audio_processing/transient/detect8kHz.dat", - "//resources/audio_processing/transient/double-utils.dat", - "//resources/audio_processing/transient/float-utils.dat", - "//resources/audio_processing/transient/suppressed16kHz.pcm", - "//resources/audio_processing/transient/suppressed32kHz.pcm", - "//resources/audio_processing/transient/suppressed8kHz.pcm", - "//resources/audio_processing/transient/wpd0.dat", - "//resources/audio_processing/transient/wpd1.dat", - "//resources/audio_processing/transient/wpd2.dat", - "//resources/audio_processing/transient/wpd3.dat", - "//resources/audio_processing/transient/wpd4.dat", - "//resources/audio_processing/transient/wpd5.dat", - "//resources/audio_processing/transient/wpd6.dat", - "//resources/audio_processing/transient/wpd7.dat", - "//resources/deflicker_before_cif_short.yuv", - "//resources/far16_stereo.pcm", - "//resources/far32_stereo.pcm", - "//resources/far44_stereo.pcm", - "//resources/far48_stereo.pcm", - "//resources/far8_stereo.pcm", - "//resources/foremanColorEnhanced_cif_short.yuv", - "//resources/foreman_cif.yuv", - "//resources/foreman_cif_short.yuv", - "//resources/near16_stereo.pcm", - "//resources/near32_stereo.pcm", - "//resources/near44_stereo.pcm", - "//resources/near48_stereo.pcm", - "//resources/near8_stereo.pcm", - "//resources/ref03.aecdump", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin", - "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin", - "//resources/short_mixed_mono_48.dat", - "//resources/short_mixed_mono_48_arm.dat", - "//resources/short_mixed_mono_48.pcm", - "//resources/short_mixed_stereo_48.dat", - "//resources/short_mixed_stereo_48.pcm", - "//resources/sprint-downlink.rx", - "//resources/sprint-uplink.rx", - "//resources/synthetic-trace.rx", - "//resources/tmobile-downlink.rx", - "//resources/tmobile-uplink.rx", - "//resources/utility/encapsulated_pcm16b_8khz.wav", - "//resources/utility/encapsulated_pcmu_8khz.wav", - "//resources/verizon3g-downlink.rx", - "//resources/verizon3g-uplink.rx", - "//resources/verizon4g-downlink.rx", - "//resources/verizon4g-uplink.rx", - ] - } - if (is_ios) { + deps += [ ":modules_unittests_bundle_data" ] configs += [ "..:common_objc", "//build/config/compiler:enable_arc", @@ -635,8 +662,6 @@ if (rtc_include_tests) { ] ldflags = [ "-ObjC" ] - - # TODO(kjellander): Mac bundle files. } } } diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn index 72a471d9a6..27c1060e44 100644 --- a/webrtc/modules/audio_coding/BUILD.gn +++ b/webrtc/modules/audio_coding/BUILD.gn @@ -981,6 +981,21 @@ if (rtc_include_tests) { ] } # insert_packet_with_timing + if (is_android || is_ios) { + audio_decoder_unittests_resources = + [ "//resources/audio_coding/testfile32kHz.pcm" ] + } + + if (is_ios) { + bundle_data("audio_decoder_unittests_bundle_data") { + testonly = true + sources = audio_decoder_unittests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("audio_decoder_unittests") { testonly = true sources = [ @@ -1013,13 +1028,11 @@ if (rtc_include_tests) { if (is_android) { deps += [ "//testing/android/native_test:native_test_native_code" ] + data = audio_decoder_unittests_resources shard_timeout = 900 } - - if (is_android || is_ios) { - data = [ - "//resources/audio_coding/testfile32kHz.pcm", - ] + if (is_ios) { + deps += [ ":audio_decoder_unittests_bundle_data" ] } } # audio_decoder_unittests diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 9fd7d1af69..993ff59267 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -279,6 +279,28 @@ source_set("test_support_main_threaded_mac") { ] } +if (is_android || is_ios) { + test_support_unittests_resources = [ + "//resources/foreman_cif_short.yuv", + "//resources/video_coding/frame-ethernet-ii.pcap", + "//resources/video_coding/frame-loopback.pcap", + "//resources/video_coding/pltype103.rtp", + "//resources/video_coding/pltype103_header_only.rtp", + "//resources/video_coding/ssrcs-2.pcap", + "//resources/video_coding/ssrcs-3.pcap", + ] +} + +if (is_ios) { + bundle_data("test_support_unittests_bundle_data") { + testonly = true + sources = test_support_unittests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } +} + test("test_support_unittests") { deps = [] sources = [ @@ -318,19 +340,12 @@ test("test_support_unittests") { if (is_android) { deps += [ "//testing/android/native_test:native_test_support" ] + data = test_support_unittests_resources shard_timeout = 900 } - if (is_android || is_ios) { - data = [ - "//resources/foreman_cif_short.yuv", - "//resources/video_coding/frame-ethernet-ii.pcap", - "//resources/video_coding/frame-loopback.pcap", - "//resources/video_coding/pltype103.rtp", - "//resources/video_coding/pltype103_header_only.rtp", - "//resources/video_coding/ssrcs-2.pcap", - "//resources/video_coding/ssrcs-3.pcap", - ] + if (is_ios) { + deps += [ ":test_support_unittests_bundle_data" ] } deps += [ diff --git a/webrtc/tools/BUILD.gn b/webrtc/tools/BUILD.gn index fae82f622f..1a6379ba6a 100644 --- a/webrtc/tools/BUILD.gn +++ b/webrtc/tools/BUILD.gn @@ -322,6 +322,20 @@ if (rtc_include_tests) { ] } + if (is_android || is_ios) { + tools_unittests_resources = [ "//resources/foreman_cif_short.yuv" ] + } + + if (is_ios) { + bundle_data("tools_unittests_bundle_data") { + testonly = true + sources = tools_unittests_resources + outputs = [ + "{{bundle_resources_dir}}/{{source_file_part}}", + ] + } + } + test("tools_unittests") { testonly = true @@ -353,12 +367,11 @@ if (rtc_include_tests) { if (is_android) { deps += [ "//testing/android/native_test:native_test_support" ] + data = tools_unittests_resources shard_timeout = 900 } - if (is_android || is_ios) { - data = [ - "//resources/foreman_cif.yuv", - ] + if (is_ios) { + deps += [ ":tools_unittests_bundle_data" ] } }