Add a BUILD.gn file for resources.

All build target resources will be moved there in a second step.

Change-Id: Iadbb582e133feb375399c839870c7b298f3934c6
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/377282
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43913}
This commit is contained in:
Jeremy Leconte 2025-02-18 10:39:42 +01:00 committed by WebRTC LUCI CQ
parent b9f8636c5a
commit 0f2354087d
3 changed files with 191 additions and 171 deletions

View File

@ -708,20 +708,6 @@ if (rtc_include_tests && !build_with_chromium) {
} }
# TODO(pbos): Rename test suite, this is no longer "just" for video targets. # TODO(pbos): Rename test suite, this is no longer "just" for video targets.
video_engine_tests_resources = [
"resources/ConferenceMotion_1280_720_50.yuv",
"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}}" ]
}
}
rtc_test("video_engine_tests") { rtc_test("video_engine_tests") {
testonly = true testonly = true
deps = [ deps = [
@ -737,36 +723,16 @@ if (rtc_include_tests && !build_with_chromium) {
"video:video_tests", "video:video_tests",
"video/adaptation:video_adaptation_tests", "video/adaptation:video_adaptation_tests",
] ]
data = video_engine_tests_resources
data_deps = [ "resources:video_engine_tests_data" ]
if (is_android) { if (is_android) {
use_default_launcher = false use_default_launcher = false
deps += [ "//build/android/gtest_apk:native_test_instrumentation_test_runner_java" ] deps += [ "//build/android/gtest_apk:native_test_instrumentation_test_runner_java" ]
shard_timeout = 900 shard_timeout = 900
} }
if (is_ios) { if (is_ios) {
deps += [ ":video_engine_tests_bundle_data" ] deps += [ "resources:video_engine_tests_bundle_data" ]
}
}
webrtc_perf_tests_resources = [
"resources/ConferenceMotion_1280_720_50.yuv",
"resources/audio_coding/speech_mono_16kHz.pcm",
"resources/audio_coding/speech_mono_32_48kHz.pcm",
"resources/audio_coding/testfile32kHz.pcm",
"resources/difficult_photo_1850_1110.yuv",
"resources/foreman_cif.yuv",
"resources/paris_qcif.yuv",
"resources/photo_1850_1110.yuv",
"resources/presentation_1850_1110.yuv",
"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}}" ]
} }
} }
@ -782,14 +748,15 @@ if (rtc_include_tests && !build_with_chromium) {
"video:video_pc_full_stack_tests", "video:video_pc_full_stack_tests",
] ]
data = webrtc_perf_tests_resources data_deps = [ "resources:webrtc_perf_tests_data" ]
if (is_android) { if (is_android) {
use_default_launcher = false use_default_launcher = false
deps += [ "//build/android/gtest_apk:native_test_instrumentation_test_runner_java" ] deps += [ "//build/android/gtest_apk:native_test_instrumentation_test_runner_java" ]
shard_timeout = 4500 shard_timeout = 4500
} }
if (is_ios) { if (is_ios) {
deps += [ ":webrtc_perf_tests_bundle_data" ] deps += [ "resources:webrtc_perf_tests_bundle_data" ]
} }
} }

View File

@ -43,21 +43,6 @@ rtc_source_set("module_fec_api") {
} }
if (rtc_include_tests && !build_with_chromium) { if (rtc_include_tests && !build_with_chromium) {
modules_tests_resources = [
"../resources/audio_coding/testfile16kHz.pcm",
"../resources/audio_coding/testfile32kHz.pcm",
"../resources/audio_coding/teststereo32kHz.pcm",
"../resources/foreman_cif.yuv",
]
if (is_ios) {
bundle_data("modules_tests_bundle_data") {
testonly = true
sources = modules_tests_resources
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
rtc_test("modules_tests") { rtc_test("modules_tests") {
testonly = true testonly = true
@ -74,7 +59,7 @@ if (rtc_include_tests && !build_with_chromium) {
deps += [ "desktop_capture:desktop_capture_modules_tests" ] deps += [ "desktop_capture:desktop_capture_modules_tests" ]
} }
data = modules_tests_resources data_deps = [ "../resources:modules_tests_data" ]
if (is_android) { if (is_android) {
use_default_launcher = false use_default_launcher = false
@ -88,121 +73,9 @@ if (rtc_include_tests && !build_with_chromium) {
} }
if (is_ios) { if (is_ios) {
deps += [ ":modules_tests_bundle_data" ] deps += [ "../resources:modules_tests_bundle_data" ]
} }
} }
modules_unittests_resources = [
"../resources/audio_coding/neteq_opus.rtp",
"../resources/audio_coding/neteq_opus_dtx.rtp",
"../resources/audio_coding/neteq_universal_new.rtp",
"../resources/audio_coding/speech_4_channels_48k_one_second.wav",
"../resources/audio_coding/speech_mono_16kHz.pcm",
"../resources/audio_coding/speech_mono_32_48kHz.pcm",
"../resources/audio_coding/testfile16kHz.pcm",
"../resources/audio_coding/testfile32kHz.pcm",
"../resources/audio_coding/testfile_fake_stereo_32kHz.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/output_data_fixed.pb",
"../resources/audio_processing/output_data_float.pb",
"../resources/audio_processing/output_data_float_avx2.pb",
"../resources/audio_processing/output_data_mac.pb",
"../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/far16_stereo.pcm",
"../resources/far176_stereo.pcm",
"../resources/far192_stereo.pcm",
"../resources/far22_stereo.pcm",
"../resources/far32_stereo.pcm",
"../resources/far44_stereo.pcm",
"../resources/far48_stereo.pcm",
"../resources/far88_stereo.pcm",
"../resources/far8_stereo.pcm",
"../resources/far96_stereo.pcm",
"../resources/foreman_cif.yuv",
"../resources/foreman_cif_short.yuv",
"../resources/near16_stereo.pcm",
"../resources/near176_stereo.pcm",
"../resources/near192_stereo.pcm",
"../resources/near22_stereo.pcm",
"../resources/near32_stereo.pcm",
"../resources/near44_stereo.pcm",
"../resources/near48_mono.pcm",
"../resources/near48_stereo.pcm",
"../resources/near88_stereo.pcm",
"../resources/near8_stereo.pcm",
"../resources/near96_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.pcm",
"../resources/short_mixed_mono_48_arm.dat",
"../resources/short_mixed_stereo_48.dat",
"../resources/short_mixed_stereo_48.pcm",
"../resources/voice_engine/audio_tiny48.wav",
]
if (is_ios) {
bundle_data("modules_unittests_bundle_data") {
testonly = true
sources = modules_unittests_resources
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
rtc_test("modules_unittests") { rtc_test("modules_unittests") {
testonly = true testonly = true
defines = [] defines = []
@ -232,7 +105,7 @@ if (rtc_include_tests && !build_with_chromium) {
deps += [ "desktop_capture:desktop_capture_unittests" ] deps += [ "desktop_capture:desktop_capture_unittests" ]
} }
data = modules_unittests_resources data_deps = [ "../resources:modules_unittests_data" ]
if (is_android) { if (is_android) {
use_default_launcher = false use_default_launcher = false
@ -241,7 +114,7 @@ if (rtc_include_tests && !build_with_chromium) {
} }
if (is_ios) { if (is_ios) {
info_plist = "../test/ios/Info.plist" info_plist = "../test/ios/Info.plist"
deps += [ ":modules_unittests_bundle_data" ] deps += [ "../resources:modules_unittests_bundle_data" ]
configs += [ "..:common_objc" ] configs += [ "..:common_objc" ]
ldflags = [ "-ObjC" ] ldflags = [ "-ObjC" ]
} }

180
resources/BUILD.gn Normal file
View File

@ -0,0 +1,180 @@
# Copyright (c) 2025 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../webrtc.gni")
modules_tests_resources = [
"audio_coding/testfile16kHz.pcm",
"audio_coding/testfile32kHz.pcm",
"audio_coding/teststereo32kHz.pcm",
"foreman_cif.yuv",
]
group("modules_tests_data") {
data = modules_tests_resources
}
if (is_ios) {
bundle_data("modules_tests_bundle_data") {
testonly = true
sources = modules_tests_resources
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
modules_unittests_resources = [
"audio_coding/neteq_opus.rtp",
"audio_coding/neteq_opus_dtx.rtp",
"audio_coding/neteq_universal_new.rtp",
"audio_coding/speech_4_channels_48k_one_second.wav",
"audio_coding/speech_mono_16kHz.pcm",
"audio_coding/speech_mono_32_48kHz.pcm",
"audio_coding/testfile16kHz.pcm",
"audio_coding/testfile32kHz.pcm",
"audio_coding/testfile_fake_stereo_32kHz.pcm",
"audio_coding/teststereo32kHz.pcm",
"audio_device/audio_short16.pcm",
"audio_device/audio_short44.pcm",
"audio_device/audio_short48.pcm",
"audio_processing/agc/agc_audio.pcm",
"audio_processing/agc/agc_no_circular_buffer.dat",
"audio_processing/agc/agc_pitch_gain.dat",
"audio_processing/agc/agc_pitch_lag.dat",
"audio_processing/agc/agc_spectral_peak.dat",
"audio_processing/agc/agc_vad.dat",
"audio_processing/agc/agc_voicing_prob.dat",
"audio_processing/agc/agc_with_circular_buffer.dat",
"audio_processing/output_data_fixed.pb",
"audio_processing/output_data_float.pb",
"audio_processing/output_data_float_avx2.pb",
"audio_processing/output_data_mac.pb",
"audio_processing/transient/ajm-macbook-1-spke16m.pcm",
"audio_processing/transient/audio16kHz.pcm",
"audio_processing/transient/audio32kHz.pcm",
"audio_processing/transient/audio48kHz.pcm",
"audio_processing/transient/audio8kHz.pcm",
"audio_processing/transient/detect16kHz.dat",
"audio_processing/transient/detect32kHz.dat",
"audio_processing/transient/detect48kHz.dat",
"audio_processing/transient/detect8kHz.dat",
"audio_processing/transient/double-utils.dat",
"audio_processing/transient/float-utils.dat",
"audio_processing/transient/suppressed16kHz.pcm",
"audio_processing/transient/suppressed32kHz.pcm",
"audio_processing/transient/suppressed8kHz.pcm",
"audio_processing/transient/wpd0.dat",
"audio_processing/transient/wpd1.dat",
"audio_processing/transient/wpd2.dat",
"audio_processing/transient/wpd3.dat",
"audio_processing/transient/wpd4.dat",
"audio_processing/transient/wpd5.dat",
"audio_processing/transient/wpd6.dat",
"audio_processing/transient/wpd7.dat",
"far16_stereo.pcm",
"far176_stereo.pcm",
"far192_stereo.pcm",
"far22_stereo.pcm",
"far32_stereo.pcm",
"far44_stereo.pcm",
"far48_stereo.pcm",
"far88_stereo.pcm",
"far8_stereo.pcm",
"far96_stereo.pcm",
"foreman_cif.yuv",
"foreman_cif_short.yuv",
"near16_stereo.pcm",
"near176_stereo.pcm",
"near192_stereo.pcm",
"near22_stereo.pcm",
"near32_stereo.pcm",
"near44_stereo.pcm",
"near48_mono.pcm",
"near48_stereo.pcm",
"near88_stereo.pcm",
"near8_stereo.pcm",
"near96_stereo.pcm",
"ref03.aecdump",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
"remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
"short_mixed_mono_48.dat",
"short_mixed_mono_48.pcm",
"short_mixed_mono_48_arm.dat",
"short_mixed_stereo_48.dat",
"short_mixed_stereo_48.pcm",
"voice_engine/audio_tiny48.wav",
]
group("modules_unittests_data") {
data = modules_unittests_resources
}
if (is_ios) {
bundle_data("modules_unittests_bundle_data") {
testonly = true
sources = modules_unittests_resources
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
webrtc_perf_tests_resources = [
"ConferenceMotion_1280_720_50.yuv",
"audio_coding/speech_mono_16kHz.pcm",
"audio_coding/speech_mono_32_48kHz.pcm",
"audio_coding/testfile32kHz.pcm",
"difficult_photo_1850_1110.yuv",
"foreman_cif.yuv",
"paris_qcif.yuv",
"photo_1850_1110.yuv",
"presentation_1850_1110.yuv",
"voice_engine/audio_long16.pcm",
"web_screenshot_1850_1110.yuv",
]
group("webrtc_perf_tests_data") {
data = webrtc_perf_tests_resources
}
if (is_ios) {
bundle_data("webrtc_perf_tests_bundle_data") {
testonly = true
sources = webrtc_perf_tests_resources
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
video_engine_tests_resources = [
"ConferenceMotion_1280_720_50.yuv",
"foreman_cif_short.yuv",
"voice_engine/audio_long16.pcm",
]
group("video_engine_tests_data") {
data = video_engine_tests_resources
}
if (is_ios) {
bundle_data("video_engine_tests_bundle_data") {
testonly = true
sources = video_engine_tests_resources
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}