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

Side by Side Diff: webrtc/audio/test/low_bandwidth_audio_test.py

Issue 2935263002: Also scan stderr for audio files to test, due to change in Android test_runner (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """ 10 """
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 example_path = os.path.join(SRC_DIR, 'resources', 191 example_path = os.path.join(SRC_DIR, 'resources',
192 'voice_engine', 'audio_tiny48.wav') 192 'voice_engine', 'audio_tiny48.wav')
193 if _RunPolqa(polqa_path, example_path, example_path): 193 if _RunPolqa(polqa_path, example_path, example_path):
194 analyzers.append(Analyzer(_RunPolqa, polqa_path, 48000)) 194 analyzers.append(Analyzer(_RunPolqa, polqa_path, 48000))
195 195
196 for analyzer in analyzers: 196 for analyzer in analyzers:
197 # Start the test executable that produces audio files. 197 # Start the test executable that produces audio files.
198 test_process = subprocess.Popen( 198 test_process = subprocess.Popen(
199 _LogCommand(test_command + ['--sample_rate_hz=%d' % 199 _LogCommand(test_command + ['--sample_rate_hz=%d' %
200 analyzer.sample_rate_hz]), 200 analyzer.sample_rate_hz]),
201 stdout=subprocess.PIPE) 201 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
202 try: 202 try:
203 lines = iter(test_process.stdout.readline, '') 203 lines = iter(test_process.stdout.readline, '')
204 for result in ExtractTestRuns(lines, echo=True): 204 for result in ExtractTestRuns(lines, echo=True):
205 (android_device, test_name, reference_file, degraded_file) = result 205 (android_device, test_name, reference_file, degraded_file) = result
206 206
207 adb_prefix = (args.adb_path,) 207 adb_prefix = (args.adb_path,)
208 if android_device: 208 if android_device:
209 adb_prefix += ('-s', android_device) 209 adb_prefix += ('-s', android_device)
210 210
211 reference_file = _GetFile(reference_file, out_dir, 211 reference_file = _GetFile(reference_file, out_dir,
(...skipping 11 matching lines...) Expand all
223 os.remove(reference_file) 223 os.remove(reference_file)
224 os.remove(degraded_file) 224 os.remove(degraded_file)
225 finally: 225 finally:
226 test_process.terminate() 226 test_process.terminate()
227 227
228 return test_process.wait() 228 return test_process.wait()
229 229
230 230
231 if __name__ == '__main__': 231 if __name__ == '__main__':
232 sys.exit(main()) 232 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698