Migrate WebRTC test infra to ABSL_FLAG.

This is the last CL required to migrate WebRTC to ABSL_FLAG, rtc::Flag
will be removed soon after this one lands.

Bug: webrtc:10616
Change-Id: I2807cec39e28a2737d2c49e2dc23f2a6f98d08f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145727
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28606}
This commit is contained in:
Mirko Bonadei
2019-07-18 13:44:12 +02:00
committed by Commit Bot
parent 63741c7fa1
commit 2ab97f6f8e
48 changed files with 1959 additions and 1705 deletions

View File

@ -157,7 +157,20 @@ def ParseArgs(argv=None):
options, unrecognized_args = parser.parse_known_args(argv)
executable_args = options.executable_args + unrecognized_args
webrtc_flags_to_change = {
'--isolated-script-test-perf-output': '--isolated_script_test_perf_output',
'--isolated-script-test-output': '--isolated_script_test_output',
}
args_to_pass = []
for arg in unrecognized_args:
if any(arg.startswith(k) for k in webrtc_flags_to_change.keys()):
arg_split = arg.split('=')
args_to_pass.append(
webrtc_flags_to_change[arg_split[0]] + '=' + arg_split[1])
else:
args_to_pass.append(arg)
executable_args = options.executable_args + args_to_pass
if options.store_test_artifacts:
assert options.output_dir, (

View File

@ -148,7 +148,7 @@ class GtestParallelWrapperTest(unittest.TestCase):
'--output_dir=' + output_dir, '--dump_json_test_results=SOME_DIR',
'some_test', '--', '--test_artifacts_dir=' + expected_artifacts_dir,
'--some_flag=some_value', '--another_flag',
'--isolated-script-test-perf-output=SOME_OTHER_DIR', '--foo=bar',
'--isolated_script_test_perf_output=SOME_OTHER_DIR', '--foo=bar',
'--baz'
])
self.assertEqual(result.gtest_parallel_args, expected)