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

Unified Diff: webrtc/audio/test/low_bandwidth_audio_test.py

Issue 2717683002: Adding placeholder for low bandwidth audio test (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/audio/test/low_bandwidth_audio_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/test/low_bandwidth_audio_test.py
diff --git a/webrtc/audio/test/low_bandwidth_audio_test.py b/webrtc/audio/test/low_bandwidth_audio_test.py
new file mode 100755
index 0000000000000000000000000000000000000000..aaba9d23984c587fce0a0a8b4686a80f29b5a080
--- /dev/null
+++ b/webrtc/audio/test/low_bandwidth_audio_test.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+# Copyright (c) 2017 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.
+
+"""
+This script is the wrapper that runs the low-bandwidth audio test.
+
+After running the test, post-process steps for calculating audio quality of the
+output files will be performed.
+"""
+
+import argparse
+import logging
+import os
+import subprocess
+import sys
+
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+SRC_DIR = os.path.normpath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir,
+ os.pardir))
+
+
+def _RunCommand(argv, cwd=SRC_DIR, **kwargs):
+ logging.info('Running %r', argv)
+ subprocess.check_call(argv, cwd=cwd, **kwargs)
+
+
+def _ParseArgs():
+ parser = argparse.ArgumentParser(description='Run low-bandwidth audio tests.')
+ parser.add_argument('build_dir',
+ help='Path to the build directory (e.g. out/Release).')
+ args = parser.parse_args()
+ return args
+
+
+def main():
+ # pylint: disable=W0101
+ logging.basicConfig(level=logging.INFO)
+
+ args = _ParseArgs()
+
+ test_executable = os.path.join(args.build_dir, 'low_bandwidth_audio_test')
+ if sys.platform == 'win32':
+ test_executable += '.exe'
+
+ _RunCommand([test_executable])
+
+
+if __name__ == '__main__':
+ sys.exit(main())
« 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