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

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

Issue 2717683002: Adding placeholder for low bandwidth audio test (Closed)
Patch Set: Created 3 years, 9 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 | « webrtc/audio/test/low_bandwidth_audio_test.cc ('k') | 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
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3 #
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
6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree.
9
10 """
11 This script is the wrapper that runs the low-bandwidth audio test.
12
13 After running the test, post-process steps for calculating audio quality of the
14 output files will be performed.
15 """
16
17 import argparse
18 import logging
19 import os
20 import subprocess
21 import sys
22
23
24 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
25 SRC_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir,
26 os.pardir))
27
28
29 def _RunCommand(argv, cwd=SRC_DIR, **kwargs):
30 logging.info('Running %r', argv)
31 subprocess.check_call(argv, cwd=cwd, **kwargs)
32
33
34 def _ParseArgs():
35 parser = argparse.ArgumentParser(description='Run low-bandwidth audio tests.')
36 parser.add_argument('build_dir',
37 help='Path to the build directory (e.g. out/Release).')
38 args = parser.parse_args()
39 return args
40
41
42 def main():
43 # pylint: disable=W0101
44 logging.basicConfig(level=logging.INFO)
45
46 args = _ParseArgs()
47
48 test_executable = os.path.join(args.build_dir, 'low_bandwidth_audio_test')
49 if sys.platform == 'win32':
50 test_executable += '.exe'
51
52 _RunCommand([test_executable])
53
54
55 if __name__ == '__main__':
56 sys.exit(main())
OLDNEW
« no previous file with comments | « webrtc/audio/test/low_bandwidth_audio_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698