Remove temp files in audio_processing_unittest.cc.

These files are leaking, rapidly filling trybot disks.

BUG=4258
R=kjellander@webrtc.org
TBR=bjornv@webrtc.org
TEST=out/Debug/modules_unittests --gtest_filter=*AudioProcessingTest*Formats/0 && ls out

Review URL: https://webrtc-codereview.appspot.com/35979004

Cr-Commit-Position: refs/heads/master@{#8232}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8232 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
pbos@webrtc.org 2015-02-03 14:14:01 +00:00
parent 0e8bf6c4d3
commit 200ac007ef

View File

@ -271,6 +271,11 @@ std::string OutputFilePath(std::string name,
return temp_filenames[filename];
}
void ClearTempFiles() {
for (auto& kv : temp_filenames)
remove(kv.second.c_str());
}
void OpenFileAndReadMessage(const std::string filename,
::google::protobuf::MessageLite* msg) {
FILE* file = fopen(filename.c_str(), "rb");
@ -323,6 +328,7 @@ class ApmTest : public ::testing::Test {
static void TearDownTestCase() {
Trace::ReturnTrace();
ClearTempFiles();
}
// Used to select between int and float interface tests.
@ -2262,6 +2268,9 @@ class AudioProcessingTest
}
}
static void TearDownTestCase() {
ClearTempFiles();
}
// Runs a process pass on files with the given parameters and dumps the output
// to a file specified with |output_file_prefix|.
static void ProcessFormat(int input_rate,