Skip to content

Commit dedaf1c

Browse files
ehlemur-zzCommit bot
authored and
Commit bot
committed
Modify audio_processing_unittest to use ResourcePath instead of ProjectRootPath.
Move the resources to //resources and upload them to Google Storage. BUG=webrtc:6727 Review-Url: https://codereview.webrtc.org/2508943004 Cr-Commit-Position: refs/heads/master@{#15152}
1 parent bbc747c commit dedaf1c

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
/resources/**/*.frames
5858
/resources/**/*.gai
5959
/resources/**/*.jpg
60+
/resources/**/*.pb
6061
/resources/**/*.pcap
6162
/resources/**/*.pcm
6263
/resources/**/*.rtp
-308 Bytes
Binary file not shown.
-15.2 KB
Binary file not shown.
-15.2 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
31f83357d6f5a78c7eb828c8073ce35f7cd2b1fa
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
c2907879eee3f1abeeb1fe2e29dd25bdb4ef5961
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eb0db8379eb703a49cd08d6c5c53a15a6cfc6b9f

webrtc/modules/BUILD.gn

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ if (rtc_include_tests) {
138138
}
139139

140140
modules_unittests_resources = [
141-
"//data/audio_processing/output_data_fixed.pb",
142-
"//data/audio_processing/output_data_float.pb",
143-
"//data/audio_processing/output_data_mac.pb",
144141
"//data/voice_engine/audio_tiny48.wav",
145142
"//resources/att-downlink.rx",
146143
"//resources/att-uplink.rx",
@@ -161,6 +158,9 @@ if (rtc_include_tests) {
161158
"//resources/audio_processing/agc/agc_vad.dat",
162159
"//resources/audio_processing/agc/agc_voicing_prob.dat",
163160
"//resources/audio_processing/agc/agc_with_circular_buffer.dat",
161+
"//resources/audio_processing/output_data_fixed.pb",
162+
"//resources/audio_processing/output_data_float.pb",
163+
"//resources/audio_processing/output_data_mac.pb",
164164
"//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
165165
"//resources/audio_processing/transient/audio16kHz.pcm",
166166
"//resources/audio_processing/transient/audio32kHz.pcm",

webrtc/modules/audio_processing/audio_processing_unittest.cc

+6-10
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,6 @@ class ApmTest : public ::testing::Test {
391391
void VerifyDebugDumpTest(Format format);
392392

393393
const std::string output_path_;
394-
const std::string ref_path_;
395394
const std::string ref_filename_;
396395
std::unique_ptr<AudioProcessing> apm_;
397396
AudioFrame* frame_;
@@ -407,21 +406,18 @@ class ApmTest : public ::testing::Test {
407406

408407
ApmTest::ApmTest()
409408
: output_path_(test::OutputPath()),
410-
#ifndef WEBRTC_IOS
411-
ref_path_(test::ProjectRootPath() + "data/audio_processing/"),
412-
#else
413-
// On iOS test data is flat in the project root dir
414-
ref_path_(test::ProjectRootPath()),
415-
#endif
416409
#if defined(WEBRTC_AUDIOPROC_FIXED_PROFILE)
417-
ref_filename_(ref_path_ + "output_data_fixed.pb"),
410+
ref_filename_(test::ResourcePath("audio_processing/output_data_fixed",
411+
"pb")),
418412
#elif defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE)
419413
#if defined(WEBRTC_MAC)
420414
// A different file for Mac is needed because on this platform the AEC
421415
// constant |kFixedDelayMs| value is 20 and not 50 as it is on the rest.
422-
ref_filename_(ref_path_ + "output_data_mac.pb"),
416+
ref_filename_(test::ResourcePath("audio_processing/output_data_mac",
417+
"pb")),
423418
#else
424-
ref_filename_(ref_path_ + "output_data_float.pb"),
419+
ref_filename_(test::ResourcePath("audio_processing/output_data_float",
420+
"pb")),
425421
#endif
426422
#endif
427423
frame_(NULL),

0 commit comments

Comments
 (0)