Remove low_bandwidth_audio_test.

Change-Id: Ide4d34e1dada9dc1448f89a79cc7b803ea4b5f46
Bug: b/284448060
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307160
Reviewed-by: Henrik Lundin <hlundin@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40191}
This commit is contained in:
Jeremy Leconte 2023-05-31 10:10:44 +02:00 committed by WebRTC LUCI CQ
parent 6110fd933a
commit 3d6e88e6ac
11 changed files with 4 additions and 1036 deletions

View file

@ -102,7 +102,6 @@ if (!build_with_chromium) {
}
if (rtc_enable_protobuf) {
deps += [
"audio:low_bandwidth_audio_perf_test",
"logging:rtc_event_log_rtp_dump",
"tools_webrtc/perf:webrtc_dashboard_upload",
]

View file

@ -828,7 +828,6 @@ def RunPythonTests(input_api, output_api):
test_directories = [
input_api.PresubmitLocalPath(),
Join('rtc_tools', 'py_event_log_analyzer'),
Join('audio', 'test', 'unittests'),
] + [
root for root, _, files in os.walk(Join('tools_webrtc')) if any(
f.endswith('_test.py') and f not in excluded_files for f in files)

View file

@ -247,104 +247,4 @@ if (rtc_include_tests) {
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
}
if (rtc_enable_protobuf && !build_with_chromium) {
rtc_test("low_bandwidth_audio_test") {
testonly = true
sources = [
"test/low_bandwidth_audio_test.cc",
"test/low_bandwidth_audio_test_flags.cc",
"test/pc_low_bandwidth_audio_test.cc",
]
deps = [
":audio_end_to_end_test",
"../api:create_network_emulation_manager",
"../api:create_peerconnection_quality_test_fixture",
"../api:network_emulation_manager_api",
"../api:peer_connection_quality_test_fixture_api",
"../api:simulated_network_api",
"../api:time_controller",
"../api/test/metrics:chrome_perf_dashboard_metrics_exporter",
"../api/test/metrics:global_metrics_logger_and_exporter",
"../api/test/metrics:metrics_exporter",
"../api/test/metrics:stdout_metrics_exporter",
"../api/test/pclf:media_configuration",
"../api/test/pclf:media_quality_test_params",
"../api/test/pclf:peer_configurer",
"../call:simulated_network",
"../common_audio",
"../system_wrappers",
"../test:fileutils",
"../test:test_common",
"../test:test_main",
"../test:test_support",
"../test:video_test_constants",
"../test/pc/e2e:network_quality_metrics_reporter",
"//testing/gtest",
]
absl_deps = [
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/strings",
]
if (is_android) {
use_default_launcher = false
deps += [
"//build/android/gtest_apk:native_test_instrumentation_test_runner_java",
"//testing/android/native_test:native_test_java",
"//testing/android/native_test:native_test_support",
]
}
data = [
"../resources/voice_engine/audio_tiny16.wav",
"../resources/voice_engine/audio_tiny48.wav",
]
}
group("low_bandwidth_audio_perf_test") {
testonly = true
deps = [
":low_bandwidth_audio_test",
"//third_party/catapult/tracing/tracing/proto:histogram_proto",
"//third_party/protobuf:py_proto_runtime",
]
data = [
"test/low_bandwidth_audio_test.py",
"../resources/voice_engine/audio_tiny16.wav",
"../resources/voice_engine/audio_tiny48.wav",
"${root_out_dir}/pyproto/tracing/tracing/proto/histogram_pb2.py",
]
# TODO(http://crbug.com/1029452): Create a cleaner target with just the
# tracing python code. We don't need Polymer for instance.
data_deps = [ "//third_party/catapult/tracing:convert_chart_json" ]
if (is_win) {
data += [ "${root_out_dir}/low_bandwidth_audio_test.exe" ]
} else {
data += [ "${root_out_dir}/low_bandwidth_audio_test" ]
}
if (is_linux || is_chromeos || is_android || is_fuchsia) {
data += [
"../tools_webrtc/audio_quality/linux/PolqaOem64",
"../tools_webrtc/audio_quality/linux/pesq",
]
}
if (is_win) {
data += [
"../tools_webrtc/audio_quality/win/PolqaOem64.dll",
"../tools_webrtc/audio_quality/win/PolqaOem64.exe",
"../tools_webrtc/audio_quality/win/pesq.exe",
"../tools_webrtc/audio_quality/win/vcomp120.dll",
]
}
if (is_mac) {
data += [ "../tools_webrtc/audio_quality/mac/pesq" ]
}
}
}
}

View file

@ -1,3 +0,0 @@
# Script to launch low_bandwidth_audio_test.
per-file low_bandwidth_audio_test.py=mbonadei@webrtc.org
per-file low_bandwidth_audio_test.py=jleconte@webrtc.org

View file

@ -1,111 +0,0 @@
/*
* 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.
*/
#include "absl/flags/declare.h"
#include "absl/flags/flag.h"
#include "api/test/simulated_network.h"
#include "audio/test/audio_end_to_end_test.h"
#include "system_wrappers/include/sleep.h"
#include "test/testsupport/file_utils.h"
#include "test/video_test_constants.h"
ABSL_DECLARE_FLAG(int, sample_rate_hz);
ABSL_DECLARE_FLAG(bool, quick);
namespace webrtc {
namespace test {
namespace {
std::string FileSampleRateSuffix() {
return std::to_string(absl::GetFlag(FLAGS_sample_rate_hz) / 1000);
}
class AudioQualityTest : public AudioEndToEndTest {
public:
AudioQualityTest() = default;
private:
std::string AudioInputFile() const {
return test::ResourcePath(
"voice_engine/audio_tiny" + FileSampleRateSuffix(), "wav");
}
std::string AudioOutputFile() const {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
return webrtc::test::OutputPath() + "LowBandwidth_" + test_info->name() +
"_" + FileSampleRateSuffix() + ".wav";
}
std::unique_ptr<TestAudioDeviceModule::Capturer> CreateCapturer() override {
return TestAudioDeviceModule::CreateWavFileReader(AudioInputFile());
}
std::unique_ptr<TestAudioDeviceModule::Renderer> CreateRenderer() override {
return TestAudioDeviceModule::CreateBoundedWavFileWriter(
AudioOutputFile(), absl::GetFlag(FLAGS_sample_rate_hz));
}
void PerformTest() override {
if (absl::GetFlag(FLAGS_quick)) {
// Let the recording run for a small amount of time to check if it works.
SleepMs(1000);
} else {
// Sleep for whole audio duration which is 5.4 seconds.
SleepMs(5400);
}
}
void OnStreamsStopped() override {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
// Output information about the input and output audio files so that further
// processing can be done by an external process.
printf("TEST %s %s %s\n", test_info->name(), AudioInputFile().c_str(),
AudioOutputFile().c_str());
}
};
class Mobile2GNetworkTest : public AudioQualityTest {
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
std::vector<AudioReceiveStreamInterface::Config>*
receive_configs) override {
send_config->send_codec_spec = AudioSendStream::Config::SendCodecSpec(
test::VideoTestConstants::kAudioSendPayloadType,
{"OPUS",
48000,
2,
{{"maxaveragebitrate", "6000"}, {"ptime", "60"}, {"stereo", "1"}}});
}
BuiltInNetworkBehaviorConfig GetSendTransportConfig() const override {
BuiltInNetworkBehaviorConfig pipe_config;
pipe_config.link_capacity_kbps = 12;
pipe_config.queue_length_packets = 1500;
pipe_config.queue_delay_ms = 400;
return pipe_config;
}
};
} // namespace
using LowBandwidthAudioTest = CallTest;
TEST_F(LowBandwidthAudioTest, GoodNetworkHighBitrate) {
AudioQualityTest test;
RunBaseTest(&test);
}
TEST_F(LowBandwidthAudioTest, Mobile2GNetwork) {
Mobile2GNetworkTest test;
RunBaseTest(&test);
}
} // namespace test
} // namespace webrtc

View file

@ -1,365 +0,0 @@
#!/usr/bin/env vpython3
# 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 collections
import json
import logging
import os
import re
import shutil
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))
NO_TOOLS_ERROR_MESSAGE = (
'Could not find PESQ or POLQA at %s.\n'
'\n'
'To fix this run:\n'
' python %s %s\n'
'\n'
'Note that these tools are Google-internal due to licensing, so in order '
'to use them you will have to get your own license and manually put them '
'in the right location.\n'
'See https://cs.chromium.org/chromium/src/third_party/webrtc/tools_webrtc/'
'download_tools.py?rcl=bbceb76f540159e2dba0701ac03c514f01624130&l=13')
def _LogCommand(command):
logging.info('Running %r', command)
return command
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).')
parser.add_argument('--remove',
action='store_true',
help='Remove output audio files after testing.')
parser.add_argument(
'--android',
action='store_true',
help='Perform the test on a connected Android device instead.')
parser.add_argument('--adb-path', help='Path to adb binary.', default='adb')
parser.add_argument('--num-retries',
default='0',
help='Number of times to retry the test on Android.')
parser.add_argument(
'--isolated-script-test-perf-output',
default=None,
help='Path to store perf results in histogram proto format.')
parser.add_argument(
'--isolated-script-test-output',
default=None,
help='Path to output an empty JSON file which Chromium infra requires.')
return parser.parse_known_args()
def _GetPlatform():
if sys.platform == 'win32':
return 'win'
if sys.platform == 'darwin':
return 'mac'
if sys.platform.startswith('linux'):
return 'linux'
raise AssertionError('Unknown platform %s' % sys.platform)
def _GetExtension():
return '.exe' if sys.platform == 'win32' else ''
def _GetPathToTools():
tools_dir = os.path.join(SRC_DIR, 'tools_webrtc')
toolchain_dir = os.path.join(tools_dir, 'audio_quality')
platform = _GetPlatform()
ext = _GetExtension()
pesq_path = os.path.join(toolchain_dir, platform, 'pesq' + ext)
if not os.path.isfile(pesq_path):
pesq_path = None
polqa_path = os.path.join(toolchain_dir, platform, 'PolqaOem64' + ext)
if not os.path.isfile(polqa_path):
polqa_path = None
if (platform != 'mac' and not polqa_path) or not pesq_path:
logging.error(NO_TOOLS_ERROR_MESSAGE, toolchain_dir,
os.path.join(tools_dir, 'download_tools.py'), toolchain_dir)
return pesq_path, polqa_path
def ExtractTestRuns(lines, echo=False):
"""Extracts information about tests from the output of a test runner.
Produces tuples
(android_device, test_name, reference_file, degraded_file, cur_perf_results).
"""
for line in lines:
if echo:
sys.stdout.write(line)
# Output from Android has a prefix with the device name.
android_prefix_re = r'(?:I\b.+\brun_tests_on_device\((.+?)\)\s*)?'
test_re = r'^' + android_prefix_re + (r'TEST (\w+) ([^ ]+?) ([^\s]+)'
r' ?([^\s]+)?\s*$')
match = re.search(test_re, line)
if match:
yield match.groups()
def _GetFile(file_path,
out_dir,
move=False,
android=False,
adb_prefix=('adb', )):
out_file_name = os.path.basename(file_path)
out_file_path = os.path.join(out_dir, out_file_name)
if android:
# Pull the file from the connected Android device.
adb_command = adb_prefix + ('pull', file_path, out_dir)
subprocess.check_call(_LogCommand(adb_command))
if move:
# Remove that file.
adb_command = adb_prefix + ('shell', 'rm', file_path)
subprocess.check_call(_LogCommand(adb_command))
elif os.path.abspath(file_path) != os.path.abspath(out_file_path):
if move:
shutil.move(file_path, out_file_path)
else:
shutil.copy(file_path, out_file_path)
return out_file_path
def _RunPesq(executable_path,
reference_file,
degraded_file,
sample_rate_hz=16000):
directory = os.path.dirname(reference_file)
assert os.path.dirname(degraded_file) == directory
# Analyze audio.
command = [
executable_path,
'+%d' % sample_rate_hz,
os.path.basename(reference_file),
os.path.basename(degraded_file)
]
# Need to provide paths in the current directory due to a bug in PESQ:
# On Mac, for some 'path/to/file.wav', if 'file.wav' is longer than
# 'path/to', PESQ crashes.
out = subprocess.check_output(_LogCommand(command),
cwd=directory,
universal_newlines=True,
stderr=subprocess.STDOUT)
# Find the scores in stdout of PESQ.
match = re.search(
r'Prediction \(Raw MOS, MOS-LQO\):\s+=\s+([\d.]+)\s+([\d.]+)', out)
if match:
raw_mos, _ = match.groups()
return {'pesq_mos': (raw_mos, 'unitless')}
logging.error('PESQ: %s', out.splitlines()[-1])
return {}
def _RunPolqa(executable_path, reference_file, degraded_file):
# Analyze audio.
command = [
executable_path, '-q', '-LC', 'NB', '-Ref', reference_file, '-Test',
degraded_file
]
process = subprocess.Popen(_LogCommand(command),
universal_newlines=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = process.communicate()
# Find the scores in stdout of POLQA.
match = re.search(r'\bMOS-LQO:\s+([\d.]+)', out)
if process.returncode != 0 or not match:
if process.returncode == 2:
logging.warning('%s (2)', err.strip())
logging.warning('POLQA license error, skipping test.')
else:
logging.error('%s (%d)', err.strip(), process.returncode)
return {}
mos_lqo, = match.groups()
return {'polqa_mos_lqo': (mos_lqo, 'unitless')}
def _MergeInPerfResultsFromCcTests(histograms, run_perf_results_file):
from tracing.value import histogram_set
cc_histograms = histogram_set.HistogramSet()
with open(run_perf_results_file, 'rb') as f:
contents = f.read()
if not contents:
return
cc_histograms.ImportProto(contents)
histograms.Merge(cc_histograms)
Analyzer = collections.namedtuple(
'Analyzer', ['name', 'func', 'executable', 'sample_rate_hz'])
def _ConfigurePythonPath(args):
script_dir = os.path.dirname(os.path.realpath(__file__))
checkout_root = os.path.abspath(os.path.join(script_dir, os.pardir,
os.pardir))
# TODO(https://crbug.com/1029452): Use a copy rule and add these from the
# out dir like for the third_party/protobuf code.
sys.path.insert(
0, os.path.join(checkout_root, 'third_party', 'catapult', 'tracing'))
# The low_bandwidth_audio_perf_test gn rule will build the protobuf stub
# for python, so put it in the path for this script before we attempt to
# import it.
histogram_proto_path = os.path.join(os.path.abspath(args.build_dir),
'pyproto', 'tracing', 'tracing', 'proto')
sys.path.insert(0, histogram_proto_path)
proto_stub_path = os.path.join(os.path.abspath(args.build_dir), 'pyproto')
sys.path.insert(0, proto_stub_path)
# Fail early in case the proto hasn't been built.
try:
#pylint: disable=unused-import
import histogram_pb2
except ImportError as e:
raise ImportError('Could not import histogram_pb2. You need to build the '
'low_bandwidth_audio_perf_test target before invoking '
'this script. Expected to find '
'histogram_pb2.py in %s.' % histogram_proto_path) from e
def main():
logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s',
level=logging.INFO,
datefmt='%Y-%m-%d %H:%M:%S')
logging.info('Invoked with %s', str(sys.argv))
args, extra_test_args = _ParseArgs()
_ConfigurePythonPath(args)
# Import catapult modules here after configuring the pythonpath.
from tracing.value import histogram_set
from tracing.value.diagnostics import reserved_infos
from tracing.value.diagnostics import generic_set
pesq_path, polqa_path = _GetPathToTools()
if pesq_path is None:
return 1
out_dir = os.path.join(args.build_dir, '..')
if args.android:
test_command = [
os.path.join(args.build_dir, 'bin', 'run_low_bandwidth_audio_test'),
'-v', '--num-retries', args.num_retries
]
else:
test_command = [os.path.join(args.build_dir, 'low_bandwidth_audio_test')]
analyzers = [Analyzer('pesq', _RunPesq, pesq_path, 16000)]
# Check if POLQA can run at all, or skip the 48 kHz tests entirely.
example_path = os.path.join(SRC_DIR, 'resources', 'voice_engine',
'audio_tiny48.wav')
if polqa_path and _RunPolqa(polqa_path, example_path, example_path):
analyzers.append(Analyzer('polqa', _RunPolqa, polqa_path, 48000))
histograms = histogram_set.HistogramSet()
for analyzer in analyzers:
# Start the test executable that produces audio files.
test_process = subprocess.Popen(_LogCommand(test_command + [
'--sample_rate_hz=%d' % analyzer.sample_rate_hz,
'--test_case_prefix=%s' % analyzer.name,
] + extra_test_args),
universal_newlines=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
perf_results_file = None
try:
lines = iter(test_process.stdout.readline, '')
for result in ExtractTestRuns(lines, echo=True):
(android_device, test_name, reference_file, degraded_file,
perf_results_file) = result
adb_prefix = (args.adb_path, )
if android_device:
adb_prefix += ('-s', android_device)
reference_file = _GetFile(reference_file,
out_dir,
android=args.android,
adb_prefix=adb_prefix)
degraded_file = _GetFile(degraded_file,
out_dir,
move=True,
android=args.android,
adb_prefix=adb_prefix)
analyzer_results = analyzer.func(analyzer.executable, reference_file,
degraded_file)
for metric, (value, units) in list(analyzer_results.items()):
hist = histograms.CreateHistogram(metric, units, [value])
user_story = generic_set.GenericSet([test_name])
hist.diagnostics[reserved_infos.STORIES.name] = user_story
# Output human readable results.
print('RESULT %s: %s= %s %s' % (metric, test_name, value, units))
if args.remove:
os.remove(reference_file)
os.remove(degraded_file)
finally:
test_process.terminate()
if perf_results_file:
perf_results_file = _GetFile(perf_results_file,
out_dir,
move=True,
android=args.android,
adb_prefix=adb_prefix)
_MergeInPerfResultsFromCcTests(histograms, perf_results_file)
if args.remove:
os.remove(perf_results_file)
if args.isolated_script_test_perf_output:
with open(args.isolated_script_test_perf_output, 'wb') as f:
f.write(histograms.AsProto().SerializeToString())
if args.isolated_script_test_output:
with open(args.isolated_script_test_output, 'w') as f:
json.dump({"version": 3}, f)
return test_process.wait()
if __name__ == '__main__':
sys.exit(main())

View file

@ -1,28 +0,0 @@
/*
* Copyright (c) 2019 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.
*/
// #ifndef AUDIO_TEST_LOW_BANDWIDTH_AUDIO_TEST_FLAGS_H_
// #define AUDIO_TEST_LOW_BANDWIDTH_AUDIO_TEST_FLAGS_H_
#include "absl/flags/flag.h"
ABSL_FLAG(int,
sample_rate_hz,
16000,
"Sample rate (Hz) of the produced audio files.");
ABSL_FLAG(bool,
quick,
false,
"Don't do the full audio recording. "
"Used to quickly check that the test runs without crashing.");
ABSL_FLAG(std::string, test_case_prefix, "", "Test case prefix.");
// #endif // AUDIO_TEST_LOW_BANDWIDTH_AUDIO_TEST_FLAGS_H_

View file

@ -1,174 +0,0 @@
/*
* Copyright (c) 2019 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.
*/
#include <memory>
#include "absl/flags/declare.h"
#include "absl/flags/flag.h"
#include "absl/strings/string_view.h"
#include "api/test/create_network_emulation_manager.h"
#include "api/test/create_peerconnection_quality_test_fixture.h"
#include "api/test/metrics/chrome_perf_dashboard_metrics_exporter.h"
#include "api/test/metrics/global_metrics_logger_and_exporter.h"
#include "api/test/metrics/metrics_exporter.h"
#include "api/test/metrics/stdout_metrics_exporter.h"
#include "api/test/network_emulation_manager.h"
#include "api/test/pclf/media_configuration.h"
#include "api/test/pclf/media_quality_test_params.h"
#include "api/test/pclf/peer_configurer.h"
#include "api/test/peerconnection_quality_test_fixture.h"
#include "api/test/simulated_network.h"
#include "api/test/time_controller.h"
#include "call/simulated_network.h"
#include "test/gtest.h"
#include "test/pc/e2e/network_quality_metrics_reporter.h"
#include "test/testsupport/file_utils.h"
ABSL_DECLARE_FLAG(std::string, test_case_prefix);
ABSL_DECLARE_FLAG(int, sample_rate_hz);
ABSL_DECLARE_FLAG(bool, quick);
namespace webrtc {
namespace test {
using ::webrtc::webrtc_pc_e2e::AudioConfig;
using ::webrtc::webrtc_pc_e2e::PeerConfigurer;
using ::webrtc::webrtc_pc_e2e::RunParams;
namespace {
constexpr int kTestDurationMs = 5400;
constexpr int kQuickTestDurationMs = 100;
std::string GetMetricTestCaseName() {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
std::string test_case_prefix(absl::GetFlag(FLAGS_test_case_prefix));
if (test_case_prefix.empty()) {
return test_info->name();
}
return test_case_prefix + "_" + test_info->name();
}
std::unique_ptr<webrtc_pc_e2e::PeerConnectionE2EQualityTestFixture>
CreateTestFixture(absl::string_view test_case_name,
TimeController& time_controller,
std::pair<EmulatedNetworkManagerInterface*,
EmulatedNetworkManagerInterface*> network_links,
rtc::FunctionView<void(PeerConfigurer*)> alice_configurer,
rtc::FunctionView<void(PeerConfigurer*)> bob_configurer) {
auto fixture = webrtc_pc_e2e::CreatePeerConnectionE2EQualityTestFixture(
std::string(test_case_name), time_controller,
/*audio_quality_analyzer=*/nullptr,
/*video_quality_analyzer=*/nullptr);
auto alice = std::make_unique<PeerConfigurer>(
network_links.first->network_dependencies());
auto bob = std::make_unique<PeerConfigurer>(
network_links.second->network_dependencies());
alice_configurer(alice.get());
bob_configurer(bob.get());
fixture->AddPeer(std::move(alice));
fixture->AddPeer(std::move(bob));
fixture->AddQualityMetricsReporter(
std::make_unique<webrtc_pc_e2e::NetworkQualityMetricsReporter>(
network_links.first, network_links.second,
test::GetGlobalMetricsLogger()));
return fixture;
}
std::string FileSampleRateSuffix() {
return std::to_string(absl::GetFlag(FLAGS_sample_rate_hz) / 1000);
}
std::string AudioInputFile() {
return test::ResourcePath("voice_engine/audio_tiny" + FileSampleRateSuffix(),
"wav");
}
std::string AudioOutputFile() {
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
return webrtc::test::OutputPath() + "PCLowBandwidth_" + test_info->name() +
"_" + FileSampleRateSuffix() + ".wav";
}
std::string PerfResultsOutputFile() {
return webrtc::test::OutputPath() + "PCLowBandwidth_perf_" +
FileSampleRateSuffix() + ".pb";
}
void LogTestResults() {
std::string perf_results_output_file = PerfResultsOutputFile();
std::vector<std::unique_ptr<MetricsExporter>> exporters;
exporters.push_back(std::make_unique<StdoutMetricsExporter>());
exporters.push_back(std::make_unique<ChromePerfDashboardMetricsExporter>(
perf_results_output_file));
EXPECT_TRUE(
ExportPerfMetric(*GetGlobalMetricsLogger(), std::move(exporters)));
const ::testing::TestInfo* const test_info =
::testing::UnitTest::GetInstance()->current_test_info();
// Output information about the input and output audio files so that further
// processing can be done by an external process.
printf("TEST %s %s %s %s\n", test_info->name(), AudioInputFile().c_str(),
AudioOutputFile().c_str(), perf_results_output_file.c_str());
}
} // namespace
TEST(PCLowBandwidthAudioTest, PCGoodNetworkHighBitrate) {
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
CreateNetworkEmulationManager();
auto fixture = CreateTestFixture(
GetMetricTestCaseName(), *network_emulation_manager->time_controller(),
network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(
BuiltInNetworkBehaviorConfig()),
[](PeerConfigurer* alice) {
AudioConfig audio;
audio.stream_label = "alice-audio";
audio.input_file_name = AudioInputFile();
audio.output_dump_file_name = AudioOutputFile();
audio.sampling_frequency_in_hz = absl::GetFlag(FLAGS_sample_rate_hz);
alice->SetAudioConfig(std::move(audio));
},
[](PeerConfigurer* bob) {});
fixture->Run(RunParams(TimeDelta::Millis(
absl::GetFlag(FLAGS_quick) ? kQuickTestDurationMs : kTestDurationMs)));
LogTestResults();
}
TEST(PCLowBandwidthAudioTest, PC40kbpsNetwork) {
std::unique_ptr<NetworkEmulationManager> network_emulation_manager =
CreateNetworkEmulationManager();
BuiltInNetworkBehaviorConfig config;
config.link_capacity_kbps = 40;
config.queue_length_packets = 1500;
config.queue_delay_ms = 400;
config.loss_percent = 1;
auto fixture = CreateTestFixture(
GetMetricTestCaseName(), *network_emulation_manager->time_controller(),
network_emulation_manager->CreateEndpointPairWithTwoWayRoutes(config),
[](PeerConfigurer* alice) {
AudioConfig audio;
audio.stream_label = "alice-audio";
audio.input_file_name = AudioInputFile();
audio.output_dump_file_name = AudioOutputFile();
audio.sampling_frequency_in_hz = absl::GetFlag(FLAGS_sample_rate_hz);
alice->SetAudioConfig(std::move(audio));
},
[](PeerConfigurer* bob) {});
fixture->Run(RunParams(TimeDelta::Millis(
absl::GetFlag(FLAGS_quick) ? kQuickTestDurationMs : kTestDurationMs)));
LogTestResults();
}
} // namespace test
} // namespace webrtc

View file

@ -1,239 +0,0 @@
#!/usr/bin/env python3
# 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.
from __future__ import absolute_import
import os
import unittest
import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARENT_DIR = os.path.join(SCRIPT_DIR, os.pardir)
sys.path.append(PARENT_DIR)
import low_bandwidth_audio_test
class TestExtractTestRuns(unittest.TestCase):
def _TestLog(self, log, *expected):
self.assertEqual(
tuple(low_bandwidth_audio_test.ExtractTestRuns(log.splitlines(True))),
expected)
def testLinux(self):
self._TestLog(
LINUX_LOG,
(None, 'GoodNetworkHighBitrate',
'/webrtc/src/resources/voice_engine/audio_tiny16.wav',
'/webrtc/src/out/LowBandwidth_GoodNetworkHighBitrate.wav', None),
(None, 'Mobile2GNetwork',
'/webrtc/src/resources/voice_engine/audio_tiny16.wav',
'/webrtc/src/out/LowBandwidth_Mobile2GNetwork.wav', None),
(None, 'PCGoodNetworkHighBitrate',
'/webrtc/src/resources/voice_engine/audio_tiny16.wav',
'/webrtc/src/out/PCLowBandwidth_PCGoodNetworkHighBitrate.wav',
'/webrtc/src/out/PCLowBandwidth_perf_48.json'),
(None, 'PCMobile2GNetwork',
'/webrtc/src/resources/voice_engine/audio_tiny16.wav',
'/webrtc/src/out/PCLowBandwidth_PCMobile2GNetwork.wav',
'/webrtc/src/out/PCLowBandwidth_perf_48.json'))
def testAndroid(self):
self._TestLog(
ANDROID_LOG,
('ddfa6149', 'Mobile2GNetwork',
'/sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav',
'/sdcard/chromium_tests_root/LowBandwidth_Mobile2GNetwork.wav', None),
('TA99205CNO', 'GoodNetworkHighBitrate',
'/sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav',
'/sdcard/chromium_tests_root/LowBandwidth_GoodNetworkHighBitrate.wav',
None),
('ddfa6149', 'PCMobile2GNetwork',
'/sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav',
'/sdcard/chromium_tests_root/PCLowBandwidth_PCMobile2GNetwork.wav',
'/sdcard/chromium_tests_root/PCLowBandwidth_perf_48.json'),
('TA99205CNO', 'PCGoodNetworkHighBitrate',
'/sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav',
('/sdcard/chromium_tests_root/'
'PCLowBandwidth_PCGoodNetworkHighBitrate.wav'),
'/sdcard/chromium_tests_root/PCLowBandwidth_perf_48.json'))
LINUX_LOG = r'''\
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from LowBandwidthAudioTest
[ RUN ] LowBandwidthAudioTest.GoodNetworkHighBitrate
TEST GoodNetworkHighBitrate /webrtc/src/resources/voice_engine/audio_tiny16.wav /webrtc/src/out/LowBandwidth_GoodNetworkHighBitrate.wav
[ OK ] LowBandwidthAudioTest.GoodNetworkHighBitrate (5932 ms)
[ RUN ] LowBandwidthAudioTest.Mobile2GNetwork
TEST Mobile2GNetwork /webrtc/src/resources/voice_engine/audio_tiny16.wav /webrtc/src/out/LowBandwidth_Mobile2GNetwork.wav
[ OK ] LowBandwidthAudioTest.Mobile2GNetwork (6333 ms)
[----------] 2 tests from LowBandwidthAudioTest (12265 ms total)
[----------] 2 tests from PCLowBandwidthAudioTest
[ RUN ] PCLowBandwidthAudioTest.PCGoodNetworkHighBitrate
TEST PCGoodNetworkHighBitrate /webrtc/src/resources/voice_engine/audio_tiny16.wav /webrtc/src/out/PCLowBandwidth_PCGoodNetworkHighBitrate.wav /webrtc/src/out/PCLowBandwidth_perf_48.json
[ OK ] PCLowBandwidthAudioTest.PCGoodNetworkHighBitrate (5932 ms)
[ RUN ] PCLowBandwidthAudioTest.PCMobile2GNetwork
TEST PCMobile2GNetwork /webrtc/src/resources/voice_engine/audio_tiny16.wav /webrtc/src/out/PCLowBandwidth_PCMobile2GNetwork.wav /webrtc/src/out/PCLowBandwidth_perf_48.json
[ OK ] PCLowBandwidthAudioTest.PCMobile2GNetwork (6333 ms)
[----------] 2 tests from PCLowBandwidthAudioTest (12265 ms total)
[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (12266 ms total)
[ PASSED ] 2 tests.
'''
ANDROID_LOG = r'''\
I 0.000s Main command: /webrtc/src/build/android/test_runner.py gtest --suite low_bandwidth_audio_test --output-directory /webrtc/src/out/debug-android --runtime-deps-path /webrtc/src/out/debug-android/gen.runtime/webrtc/audio/low_bandwidth_audio_test__test_runner_script.runtime_deps -v
I 0.007s Main [host]> /webrtc/src/third_party/android_sdk/public/build-tools/24.0.2/aapt dump xmltree /webrtc/src/out/debug-android/low_bandwidth_audio_test_apk/low_bandwidth_audio_test-debug.apk AndroidManifest.xml
I 0.028s TimeoutThread-1-for-MainThread [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb devices
I 0.062s TimeoutThread-1-for-prepare_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO wait-for-device
I 0.063s TimeoutThread-1-for-prepare_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 wait-for-device
I 0.102s TimeoutThread-1-for-prepare_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( ( c=/data/local/tmp/cache_token;echo $EXTERNAL_STORAGE;cat $c 2>/dev/null||echo;echo "77611072-160c-11d7-9362-705b0f464195">$c &&getprop )>/data/local/tmp/temp_file-5ea34389e3f92 );echo %$?'
I 0.105s TimeoutThread-1-for-prepare_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( ( c=/data/local/tmp/cache_token;echo $EXTERNAL_STORAGE;cat $c 2>/dev/null||echo;echo "77618afc-160c-11d7-bda4-705b0f464195">$c &&getprop )>/data/local/tmp/temp_file-b995cef6e0e3d );echo %$?'
I 0.204s TimeoutThread-1-for-prepare_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 pull /data/local/tmp/temp_file-b995cef6e0e3d /tmp/tmpieAgDj/tmp_ReadFileWithPull
I 0.285s TimeoutThread-1-for-prepare_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( test -d /storage/emulated/legacy );echo %$?'
I 0.285s TimeoutThread-1-for-delete_temporary_file(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell 'rm -f /data/local/tmp/temp_file-b995cef6e0e3d'
I 0.302s TimeoutThread-1-for-prepare_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO pull /data/local/tmp/temp_file-5ea34389e3f92 /tmp/tmpvlyG3I/tmp_ReadFileWithPull
I 0.352s TimeoutThread-1-for-prepare_device(ddfa6149) condition 'sd_card_ready' met (0.3s)
I 0.353s TimeoutThread-1-for-prepare_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( pm path android );echo %$?'
I 0.369s TimeoutThread-1-for-prepare_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( test -d /sdcard );echo %$?'
I 0.370s TimeoutThread-1-for-delete_temporary_file(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell 'rm -f /data/local/tmp/temp_file-5ea34389e3f92'
I 0.434s TimeoutThread-1-for-prepare_device(TA99205CNO) condition 'sd_card_ready' met (0.4s)
I 0.434s TimeoutThread-1-for-prepare_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( pm path android );echo %$?'
I 1.067s TimeoutThread-1-for-prepare_device(ddfa6149) condition 'pm_ready' met (1.0s)
I 1.067s TimeoutThread-1-for-prepare_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( getprop sys.boot_completed );echo %$?'
I 1.115s TimeoutThread-1-for-prepare_device(ddfa6149) condition 'boot_completed' met (1.1s)
I 1.181s TimeoutThread-1-for-prepare_device(TA99205CNO) condition 'pm_ready' met (1.1s)
I 1.181s TimeoutThread-1-for-prepare_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( getprop sys.boot_completed );echo %$?'
I 1.242s TimeoutThread-1-for-prepare_device(TA99205CNO) condition 'boot_completed' met (1.2s)
I 1.268s TimeoutThread-1-for-individual_device_set_up(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( pm path org.chromium.native_test );echo %$?'
I 1.269s TimeoutThread-1-for-individual_device_set_up(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( pm path org.chromium.native_test );echo %$?'
I 2.008s calculate_device_checksums [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *1225256* ]]&&exit 2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a /data/app/org.chromium.native_test-2/base.apk;: );echo %$?'
I 2.008s calculate_host_checksums [host]> /webrtc/src/out/debug-android/md5sum_bin_host /webrtc/src/out/debug-android/low_bandwidth_audio_test_apk/low_bandwidth_audio_test-debug.apk
I 2.019s calculate_device_checksums [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *1225256* ]]&&exit 2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a /data/app/org.chromium.native_test-1/base.apk;: );echo %$?'
I 2.020s calculate_host_checksums [host]> /webrtc/src/out/debug-android/md5sum_bin_host /webrtc/src/out/debug-android/low_bandwidth_audio_test_apk/low_bandwidth_audio_test-debug.apk
I 2.172s TimeoutThread-1-for-individual_device_set_up(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( p=org.chromium.native_test;if [[ "$(ps)" = *$p* ]]; then am force-stop $p; fi );echo %$?'
I 2.183s TimeoutThread-1-for-individual_device_set_up(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( p=org.chromium.native_test;if [[ "$(ps)" = *$p* ]]; then am force-stop $p; fi );echo %$?'
I 2.290s calculate_device_checksums [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *1225256* ]]&&exit 2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a /sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav;: );echo %$?'
I 2.291s calculate_host_checksums [host]> /webrtc/src/out/debug-android/md5sum_bin_host /webrtc/src/resources/voice_engine/audio_tiny16.wav
I 2.373s calculate_device_checksums [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *1225256* ]]&&exit 2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a /storage/emulated/legacy/chromium_tests_root/resources/voice_engine/audio_tiny16.wav;: );echo %$?'
I 2.374s calculate_host_checksums [host]> /webrtc/src/out/debug-android/md5sum_bin_host /webrtc/src/resources/voice_engine/audio_tiny16.wav
I 2.390s calculate_device_checksums [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *1225256* ]]&&exit 2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a /sdcard/chromium_tests_root/icudtl.dat;: );echo %$?'
I 2.390s calculate_host_checksums [host]> /webrtc/src/out/debug-android/md5sum_bin_host /webrtc/src/out/debug-android/icudtl.dat
I 2.472s calculate_device_checksums [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( a=/data/local/tmp/md5sum/md5sum_bin;! [[ $(ls -l $a) = *1225256* ]]&&exit 2;export LD_LIBRARY_PATH=/data/local/tmp/md5sum;$a /storage/emulated/legacy/chromium_tests_root/icudtl.dat;: );echo %$?'
I 2.472s calculate_host_checksums [host]> /webrtc/src/out/debug-android/md5sum_bin_host /webrtc/src/out/debug-android/icudtl.dat
I 2.675s TimeoutThread-1-for-list_tests(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( ( p=org.chromium.native_test;am instrument -w -e "$p".NativeTestInstrumentationTestRunner.ShardNanoTimeout 30000000000 -e "$p".NativeTestInstrumentationTestRunner.NativeTestActivity "$p".NativeUnitTestActivity -e "$p".NativeTestInstrumentationTestRunner.StdoutFile /sdcard/temp_file-6407c967884af.gtest_out -e "$p".NativeTest.CommandLineFlags --gtest_list_tests "$p"/"$p".NativeTestInstrumentationTestRunner )>/data/local/tmp/temp_file-d21ebcd0977d9 );echo %$?'
I 2.675s TimeoutThread-1-for-list_tests(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( ( p=org.chromium.native_test;am instrument -w -e "$p".NativeTestInstrumentationTestRunner.ShardNanoTimeout 30000000000 -e "$p".NativeTestInstrumentationTestRunner.NativeTestActivity "$p".NativeUnitTestActivity -e "$p".NativeTestInstrumentationTestRunner.StdoutFile /storage/emulated/legacy/temp_file-fa09560c3259.gtest_out -e "$p".NativeTest.CommandLineFlags --gtest_list_tests "$p"/"$p".NativeTestInstrumentationTestRunner )>/data/local/tmp/temp_file-95ad995999939 );echo %$?'
I 3.739s TimeoutThread-1-for-list_tests(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 pull /data/local/tmp/temp_file-95ad995999939 /tmp/tmpSnnF6Y/tmp_ReadFileWithPull
I 3.807s TimeoutThread-1-for-delete_temporary_file(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell 'rm -f /data/local/tmp/temp_file-95ad995999939'
I 3.812s TimeoutThread-1-for-list_tests(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( TZ=utc ls -a -l /storage/emulated/legacy/ );echo %$?'
I 3.866s TimeoutThread-1-for-list_tests(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( cat /storage/emulated/legacy/temp_file-fa09560c3259.gtest_out );echo %$?'
I 3.912s TimeoutThread-1-for-delete_temporary_file(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell 'rm -f /storage/emulated/legacy/temp_file-fa09560c3259.gtest_out'
I 4.256s TimeoutThread-1-for-list_tests(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO pull /data/local/tmp/temp_file-d21ebcd0977d9 /tmp/tmpokPF5b/tmp_ReadFileWithPull
I 4.324s TimeoutThread-1-for-delete_temporary_file(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell 'rm -f /data/local/tmp/temp_file-d21ebcd0977d9'
I 4.342s TimeoutThread-1-for-list_tests(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( TZ=utc ls -a -l /sdcard/ );echo %$?'
I 4.432s TimeoutThread-1-for-list_tests(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( cat /sdcard/temp_file-6407c967884af.gtest_out );echo %$?'
I 4.476s TimeoutThread-1-for-delete_temporary_file(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell 'rm -f /sdcard/temp_file-6407c967884af.gtest_out'
I 4.483s Main Using external sharding settings. This is shard 0/1
I 4.483s Main STARTING TRY #1/3
I 4.484s Main Will run 2 tests on 2 devices: TA99205CNO, ddfa6149
I 4.486s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( pm dump org.chromium.native_test | grep dataDir=; echo "PIPESTATUS: ${PIPESTATUS[@]}" );echo %$?'
I 4.486s TimeoutThread-1-for-run_tests_on_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( pm dump org.chromium.native_test | grep dataDir=; echo "PIPESTATUS: ${PIPESTATUS[@]}" );echo %$?'
I 5.551s run_tests_on_device(TA99205CNO) flags:
I 5.552s run_tests_on_device(ddfa6149) flags:
I 5.554s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( ( p=org.chromium.native_test;am instrument -w -e "$p".NativeTestInstrumentationTestRunner.ShardNanoTimeout 120000000000 -e "$p".NativeTestInstrumentationTestRunner.NativeTestActivity "$p".NativeUnitTestActivity -e "$p".NativeTestInstrumentationTestRunner.Test LowBandwidthAudioTest.GoodNetworkHighBitrate -e "$p".NativeTestInstrumentationTestRunner.StdoutFile /sdcard/temp_file-ffe7b76691cb7.gtest_out "$p"/"$p".NativeTestInstrumentationTestRunner )>/data/local/tmp/temp_file-c9d83b3078ab1 );echo %$?'
I 5.556s TimeoutThread-1-for-run_tests_on_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( ( p=org.chromium.native_test;am instrument -w -e "$p".NativeTestInstrumentationTestRunner.ShardNanoTimeout 120000000000 -e "$p".NativeTestInstrumentationTestRunner.NativeTestActivity "$p".NativeUnitTestActivity -e "$p".NativeTestInstrumentationTestRunner.Test LowBandwidthAudioTest.Mobile2GNetwork -e "$p".NativeTestInstrumentationTestRunner.StdoutFile /storage/emulated/legacy/temp_file-f0ceb1a05ea8.gtest_out "$p"/"$p".NativeTestInstrumentationTestRunner )>/data/local/tmp/temp_file-245ef307a5b32 );echo %$?'
I 12.956s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO pull /data/local/tmp/temp_file-c9d83b3078ab1 /tmp/tmpRQhTcM/tmp_ReadFileWithPull
I 13.024s TimeoutThread-1-for-delete_temporary_file(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell 'rm -f /data/local/tmp/temp_file-c9d83b3078ab1'
I 13.032s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( TZ=utc ls -a -l /sdcard/ );echo %$?'
I 13.114s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( cat /sdcard/temp_file-ffe7b76691cb7.gtest_out );echo %$?'
I 13.154s TimeoutThread-1-for-run_tests_on_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 pull /data/local/tmp/temp_file-245ef307a5b32 /tmp/tmpfQ4J96/tmp_ReadFileWithPull
I 13.167s TimeoutThread-1-for-delete_temporary_file(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell 'rm -f /sdcard/temp_file-ffe7b76691cb7.gtest_out'
I 13.169s TimeoutThread-1-for-delete_temporary_file(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell 'rm -f /data/user/0/org.chromium.native_test/temp_file-f07c4808dbf8f.xml'
I 13.170s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( pm clear org.chromium.native_test );echo %$?'
I 13.234s TimeoutThread-1-for-delete_temporary_file(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell 'rm -f /data/local/tmp/temp_file-245ef307a5b32'
I 13.239s TimeoutThread-1-for-run_tests_on_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( TZ=utc ls -a -l /storage/emulated/legacy/ );echo %$?'
I 13.291s TimeoutThread-1-for-run_tests_on_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( cat /storage/emulated/legacy/temp_file-f0ceb1a05ea8.gtest_out );echo %$?'
I 13.341s TimeoutThread-1-for-delete_temporary_file(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell 'rm -f /storage/emulated/legacy/temp_file-f0ceb1a05ea8.gtest_out'
I 13.343s TimeoutThread-1-for-delete_temporary_file(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell 'rm -f /data/data/org.chromium.native_test/temp_file-5649bb01682da.xml'
I 13.346s TimeoutThread-1-for-run_tests_on_device(ddfa6149) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s ddfa6149 shell '( pm clear org.chromium.native_test );echo %$?'
I 13.971s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) Setting permissions for org.chromium.native_test.
I 13.971s TimeoutThread-1-for-run_tests_on_device(TA99205CNO) [host]> /webrtc/src/third_party/android_sdk/public/platform-tools/adb -s TA99205CNO shell '( pm grant org.chromium.native_test android.permission.CAMERA&&pm grant org.chromium.native_test android.permission.RECORD_AUDIO&&pm grant org.chromium.native_test android.permission.WRITE_EXTERNAL_STORAGE&&pm grant org.chromium.native_test android.permission.READ_EXTERNAL_STORAGE );echo %$?'
I 14.078s run_tests_on_device(ddfa6149) >>ScopedMainEntryLogger
I 14.078s run_tests_on_device(ddfa6149) Note: Google Test filter = LowBandwidthAudioTest.Mobile2GNetwork
I 14.078s run_tests_on_device(ddfa6149) [==========] Running 1 test from 1 test case.
I 14.078s run_tests_on_device(ddfa6149) [----------] Global test environment set-up.
I 14.078s run_tests_on_device(ddfa6149) [----------] 1 test from LowBandwidthAudioTest
I 14.078s run_tests_on_device(ddfa6149) [ RUN ] LowBandwidthAudioTest.Mobile2GNetwork
I 14.078s run_tests_on_device(ddfa6149) TEST Mobile2GNetwork /sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav /sdcard/chromium_tests_root/LowBandwidth_Mobile2GNetwork.wav
I 14.078s run_tests_on_device(ddfa6149) [ OK ] LowBandwidthAudioTest.Mobile2GNetwork (6438 ms)
I 14.078s run_tests_on_device(ddfa6149) [----------] 1 test from LowBandwidthAudioTest (6438 ms total)
I 14.078s run_tests_on_device(ddfa6149)
I 14.078s run_tests_on_device(ddfa6149) [----------] Global test environment tear-down
I 14.079s run_tests_on_device(ddfa6149) [==========] 1 test from 1 test case ran. (6438 ms total)
I 14.079s run_tests_on_device(ddfa6149) [ PASSED ] 1 test.
I 14.079s run_tests_on_device(ddfa6149) <<ScopedMainEntryLogger
I 16.576s run_tests_on_device(TA99205CNO) >>ScopedMainEntryLogger
I 16.576s run_tests_on_device(TA99205CNO) Note: Google Test filter = LowBandwidthAudioTest.GoodNetworkHighBitrate
I 16.576s run_tests_on_device(TA99205CNO) [==========] Running 1 test from 1 test case.
I 16.576s run_tests_on_device(TA99205CNO) [----------] Global test environment set-up.
I 16.576s run_tests_on_device(TA99205CNO) [----------] 1 test from LowBandwidthAudioTest
I 16.576s run_tests_on_device(TA99205CNO) [ RUN ] LowBandwidthAudioTest.GoodNetworkHighBitrate
I 16.576s run_tests_on_device(TA99205CNO) TEST GoodNetworkHighBitrate /sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav /sdcard/chromium_tests_root/LowBandwidth_GoodNetworkHighBitrate.wav
I 16.576s run_tests_on_device(TA99205CNO) [ OK ] LowBandwidthAudioTest.GoodNetworkHighBitrate (5968 ms)
I 16.576s run_tests_on_device(TA99205CNO) [----------] 1 test from LowBandwidthAudioTest (5968 ms total)
I 16.576s run_tests_on_device(TA99205CNO)
I 16.576s run_tests_on_device(TA99205CNO) [----------] Global test environment tear-down
I 16.576s run_tests_on_device(TA99205CNO) [==========] 1 test from 1 test case ran. (5968 ms total)
I 16.577s run_tests_on_device(TA99205CNO) [ PASSED ] 1 test.
I 16.577s run_tests_on_device(TA99205CNO) <<ScopedMainEntryLogger
I 14.078s run_tests_on_device(ddfa6149) >>ScopedMainEntryLogger
I 14.078s run_tests_on_device(ddfa6149) Note: Google Test filter = PCLowBandwidthAudioTest.PCMobile2GNetwork
I 14.078s run_tests_on_device(ddfa6149) [==========] Running 1 test from 1 test case.
I 14.078s run_tests_on_device(ddfa6149) [----------] Global test environment set-up.
I 14.078s run_tests_on_device(ddfa6149) [----------] 1 test from PCLowBandwidthAudioTest
I 14.078s run_tests_on_device(ddfa6149) [ RUN ] PCLowBandwidthAudioTest.PCMobile2GNetwork
I 14.078s run_tests_on_device(ddfa6149) TEST PCMobile2GNetwork /sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav /sdcard/chromium_tests_root/PCLowBandwidth_PCMobile2GNetwork.wav /sdcard/chromium_tests_root/PCLowBandwidth_perf_48.json
I 14.078s run_tests_on_device(ddfa6149) [ OK ] PCLowBandwidthAudioTest.PCMobile2GNetwork (6438 ms)
I 14.078s run_tests_on_device(ddfa6149) [----------] 1 test from PCLowBandwidthAudioTest (6438 ms total)
I 14.078s run_tests_on_device(ddfa6149)
I 14.078s run_tests_on_device(ddfa6149) [----------] Global test environment tear-down
I 14.079s run_tests_on_device(ddfa6149) [==========] 1 test from 1 test case ran. (6438 ms total)
I 14.079s run_tests_on_device(ddfa6149) [ PASSED ] 1 test.
I 14.079s run_tests_on_device(ddfa6149) <<ScopedMainEntryLogger
I 16.576s run_tests_on_device(TA99205CNO) >>ScopedMainEntryLogger
I 16.576s run_tests_on_device(TA99205CNO) Note: Google Test filter = PCLowBandwidthAudioTest.PCGoodNetworkHighBitrate
I 16.576s run_tests_on_device(TA99205CNO) [==========] Running 1 test from 1 test case.
I 16.576s run_tests_on_device(TA99205CNO) [----------] Global test environment set-up.
I 16.576s run_tests_on_device(TA99205CNO) [----------] 1 test from PCLowBandwidthAudioTest
I 16.576s run_tests_on_device(TA99205CNO) [ RUN ] PCLowBandwidthAudioTest.PCGoodNetworkHighBitrate
I 16.576s run_tests_on_device(TA99205CNO) TEST PCGoodNetworkHighBitrate /sdcard/chromium_tests_root/resources/voice_engine/audio_tiny16.wav /sdcard/chromium_tests_root/PCLowBandwidth_PCGoodNetworkHighBitrate.wav /sdcard/chromium_tests_root/PCLowBandwidth_perf_48.json
I 16.576s run_tests_on_device(TA99205CNO) [ OK ] PCLowBandwidthAudioTest.PCGoodNetworkHighBitrate (5968 ms)
I 16.576s run_tests_on_device(TA99205CNO) [----------] 1 test from PCLowBandwidthAudioTest (5968 ms total)
I 16.576s run_tests_on_device(TA99205CNO)
I 16.576s run_tests_on_device(TA99205CNO) [----------] Global test environment tear-down
I 16.576s run_tests_on_device(TA99205CNO) [==========] 1 test from 1 test case ran. (5968 ms total)
I 16.577s run_tests_on_device(TA99205CNO) [ PASSED ] 1 test.
I 16.577s run_tests_on_device(TA99205CNO) <<ScopedMainEntryLogger
I 16.577s run_tests_on_device(TA99205CNO) Finished running tests on this device.
I 16.577s run_tests_on_device(ddfa6149) Finished running tests on this device.
I 16.604s Main FINISHED TRY #1/3
I 16.604s Main All tests completed.
C 16.604s Main ********************************************************************************
C 16.604s Main Summary
C 16.604s Main ********************************************************************************
C 16.605s Main [==========] 2 tests ran.
C 16.605s Main [ PASSED ] 2 tests.
C 16.605s Main ********************************************************************************
I 16.608s tear_down_device(ddfa6149) Wrote device cache: /webrtc/src/out/debug-android/device_cache_ddea6549.json
I 16.608s tear_down_device(TA99205CNO) Wrote device cache: /webrtc/src/out/debug-android/device_cache_TA99305CMO.json
'''
if __name__ == "__main__":
unittest.main()

View file

@ -63,15 +63,6 @@
"label": "//sdk/android:android_instrumentation_test_apk",
"type": "console_test_launcher",
},
"low_bandwidth_audio_test": {
"label": "//audio:low_bandwidth_audio_test",
"type": "console_test_launcher",
},
"low_bandwidth_audio_perf_test": {
"label": "//audio:low_bandwidth_audio_perf_test",
"type": "script",
"script": "//audio/test/low_bandwidth_audio_test.py",
},
"modules_tests": {
"label": "//modules:modules_tests",
"type": "console_test_launcher",

View file

@ -18,11 +18,10 @@ import sys
TESTS = [
'video_capture_tests', 'webrtc_nonparallel_tests', 'video_engine_tests',
'tools_unittests', 'test_support_unittests',
'system_wrappers_unittests', 'rtc_unittests', 'rtc_stats_unittests',
'rtc_pc_unittests', 'rtc_media_unittests', 'peerconnection_unittests',
'modules_unittests', 'modules_tests', 'low_bandwidth_audio_test',
'common_video_unittests', 'common_audio_unittests',
'tools_unittests', 'test_support_unittests', 'system_wrappers_unittests',
'rtc_unittests', 'rtc_stats_unittests', 'rtc_pc_unittests',
'rtc_media_unittests', 'peerconnection_unittests', 'modules_unittests',
'modules_tests', 'common_video_unittests', 'common_audio_unittests',
'audio_decoder_unittests'
]