Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1719)

Unified Diff: webrtc/modules/BUILD.gn

Issue 2292853002: GN: Fix resource files for iOS test target (Closed)
Patch Set: Moved declaration to before first use for Android Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/BUILD.gn
diff --git a/webrtc/modules/BUILD.gn b/webrtc/modules/BUILD.gn
index 873c97868040e78eb792faeb5b6a10f2e9a86f4e..92284a1da6c4e77f6b949c7d7cd643dda335a52d 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.
}
}
}

Powered by Google App Engine
This is Rietveld 408576698