Improve low bandwidth audio test instrumentatin, fix PC test

Bug: webrtc:10138
Change-Id: I1d72fcac642064e569f6aac259fd0b6e0cf5c8b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146603
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28644}
This commit is contained in:
Artem Titov
2019-07-23 13:23:20 +02:00
committed by Commit Bot
parent 85ef3eab94
commit cbc91efaa0
2 changed files with 9 additions and 7 deletions

View File

@ -61,6 +61,8 @@ def _ParseArgs():
help='Path to store perf results in chartjson format.') help='Path to store perf results in chartjson format.')
parser.add_argument('--isolated-script-test-output', default=None, parser.add_argument('--isolated-script-test-output', default=None,
help='Path to output an empty JSON file which Chromium infra requires.') help='Path to output an empty JSON file which Chromium infra requires.')
parser.add_argument('--extra-test-args', default=[], action='append',
help='Extra args to path to the test binary.')
# Ignore Chromium-specific flags # Ignore Chromium-specific flags
parser.add_argument('--test-launcher-summary-output', parser.add_argument('--test-launcher-summary-output',
@ -258,7 +260,7 @@ def main():
_LogCommand(test_command + [ _LogCommand(test_command + [
'--sample_rate_hz=%d' % analyzer.sample_rate_hz, '--sample_rate_hz=%d' % analyzer.sample_rate_hz,
'--test_case_prefix=%s' % analyzer.name '--test_case_prefix=%s' % analyzer.name
]), ] + args.extra_test_args),
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
perf_results_file = None perf_results_file = None
try: try:

View File

@ -36,8 +36,8 @@ using AudioConfig =
namespace { namespace {
constexpr int kTestDurationSec = 6; constexpr int kTestDurationMs = 5400;
constexpr int kQuickTestDurationSec = 1; constexpr int kQuickTestDurationMs = 100;
std::string GetMetricTestCaseName() { std::string GetMetricTestCaseName() {
const ::testing::TestInfo* const test_info = const ::testing::TestInfo* const test_info =
@ -139,8 +139,8 @@ TEST(PCLowBandwidthAudioTest, PCGoodNetworkHighBitrate) {
alice->SetAudioConfig(std::move(audio)); alice->SetAudioConfig(std::move(audio));
}, },
[](PeerConfigurer* bob) {}); [](PeerConfigurer* bob) {});
fixture->Run(RunParams(TimeDelta::seconds( fixture->Run(RunParams(TimeDelta::ms(
absl::GetFlag(FLAGS_quick) ? kQuickTestDurationSec : kTestDurationSec))); absl::GetFlag(FLAGS_quick) ? kQuickTestDurationMs : kTestDurationMs)));
LogTestResults(); LogTestResults();
} }
@ -164,8 +164,8 @@ TEST(PCLowBandwidthAudioTest, PCMobile2GNetwork) {
alice->SetAudioConfig(std::move(audio)); alice->SetAudioConfig(std::move(audio));
}, },
[](PeerConfigurer* bob) {}); [](PeerConfigurer* bob) {});
fixture->Run(RunParams(TimeDelta::seconds( fixture->Run(RunParams(TimeDelta::ms(
absl::GetFlag(FLAGS_quick) ? kQuickTestDurationSec : kTestDurationSec))); absl::GetFlag(FLAGS_quick) ? kQuickTestDurationMs : kTestDurationMs)));
LogTestResults(); LogTestResults();
} }