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:
committed by
Commit Bot
parent
63741c7fa1
commit
2ab97f6f8e
@ -140,6 +140,8 @@ if (rtc_include_tests) {
|
||||
"../logging:log_writer",
|
||||
"../network:emulated_network",
|
||||
"../time_controller",
|
||||
"//third_party/abseil-cpp/absl/flags:flag",
|
||||
"//third_party/abseil-cpp/absl/flags:parse",
|
||||
"//third_party/abseil-cpp/absl/memory",
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
|
||||
@ -11,10 +11,11 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/flags/parse.h"
|
||||
#include "absl/memory/memory.h"
|
||||
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
|
||||
#include "rtc_base/flags.h"
|
||||
#include "rtc_base/socket_address.h"
|
||||
#include "test/logging/file_log_writer.h"
|
||||
#include "test/network/network_emulation.h"
|
||||
@ -22,10 +23,11 @@
|
||||
#include "test/time_controller/real_time_controller.h"
|
||||
#include "test/time_controller/simulated_time_controller.h"
|
||||
|
||||
WEBRTC_DEFINE_bool(scenario_logs, false, "Save logs from scenario framework.");
|
||||
WEBRTC_DEFINE_string(scenario_logs_root,
|
||||
"",
|
||||
"Output root path, based on project root if unset.");
|
||||
ABSL_FLAG(bool, scenario_logs, false, "Save logs from scenario framework.");
|
||||
ABSL_FLAG(std::string,
|
||||
scenario_logs_root,
|
||||
"",
|
||||
"Output root path, based on project root if unset.");
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
@ -34,8 +36,8 @@ const Timestamp kSimulatedStartTime = Timestamp::seconds(100000);
|
||||
|
||||
std::unique_ptr<FileLogWriterFactory> GetScenarioLogManager(
|
||||
std::string file_name) {
|
||||
if (FLAG_scenario_logs && !file_name.empty()) {
|
||||
std::string output_root = FLAG_scenario_logs_root;
|
||||
if (absl::GetFlag(FLAGS_scenario_logs) && !file_name.empty()) {
|
||||
std::string output_root = absl::GetFlag(FLAGS_scenario_logs_root);
|
||||
if (output_root.empty())
|
||||
output_root = OutputPath() + "output_data/";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user