mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-15 14:50:39 +01:00

This is a reland of68007e97ec
Original change's description: > Reland "Remove WEBRTC_TRACE." > > This is a reland of2209b90449
> Original change's description: > > Remove WEBRTC_TRACE. > > > > Bug: webrtc:5118 > > Change-Id: I0af0f8845ee016fa61d7cecc526e2a672ec8732d > > Reviewed-on: https://webrtc-review.googlesource.com/5382 > > Reviewed-by: Niels Moller <nisse@webrtc.org> > > Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> > > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > > Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#20114} > > Bug: webrtc:5118 > Change-Id: I2d93fd40fcaa251c363bdcfb1c04b834a3a7f0e9 > Reviewed-on: https://webrtc-review.googlesource.com/6000 > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> > Reviewed-by: Niels Moller <nisse@webrtc.org> > Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20132} Bug: webrtc:5118 Change-Id: I3b46406899d043c3260fc3195b524138324f7313 Reviewed-on: https://webrtc-review.googlesource.com/6301 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20144}
65 lines
2.1 KiB
C++
65 lines
2.1 KiB
C++
/*
|
|
* Copyright (c) 2013 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 "rtc_base/flags.h"
|
|
#include "rtc_base/logging.h"
|
|
#include "system_wrappers/include/metrics_default.h"
|
|
#include "test/field_trial.h"
|
|
#include "test/gmock.h"
|
|
#include "test/gtest.h"
|
|
#include "test/testsupport/fileutils.h"
|
|
|
|
#if defined(WEBRTC_IOS)
|
|
#include "test/ios/test_support.h"
|
|
|
|
DEFINE_string(NSTreatUnknownArgumentsAsOpen, "",
|
|
"Intentionally ignored flag intended for iOS simulator.");
|
|
DEFINE_string(ApplePersistenceIgnoreState, "",
|
|
"Intentionally ignored flag intended for iOS simulator.");
|
|
#endif
|
|
|
|
DEFINE_bool(logs, false, "print logs to stderr");
|
|
|
|
DEFINE_string(force_fieldtrials, "",
|
|
"Field trials control experimental feature code which can be forced. "
|
|
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
|
|
" will assign the group Enable to field trial WebRTC-FooFeature.");
|
|
|
|
DEFINE_bool(help, false, "Print this message.");
|
|
|
|
int main(int argc, char* argv[]) {
|
|
::testing::InitGoogleMock(&argc, argv);
|
|
|
|
// Default to LS_INFO, even for release builds to provide better test logging.
|
|
// TODO(pbos): Consider adding a command-line override.
|
|
if (rtc::LogMessage::GetLogToDebug() > rtc::LS_INFO)
|
|
rtc::LogMessage::LogToDebug(rtc::LS_INFO);
|
|
|
|
if (rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, false)) {
|
|
return 1;
|
|
}
|
|
if (FLAG_help) {
|
|
rtc::FlagList::Print(nullptr, false);
|
|
return 0;
|
|
}
|
|
|
|
webrtc::test::SetExecutablePath(argv[0]);
|
|
std::string fieldtrials = FLAG_force_fieldtrials;
|
|
webrtc::test::InitFieldTrialsFromString(fieldtrials);
|
|
webrtc::metrics::Enable();
|
|
|
|
rtc::LogMessage::SetLogToStderr(FLAG_logs);
|
|
#if defined(WEBRTC_IOS)
|
|
rtc::test::InitTestSuite(RUN_ALL_TESTS, argc, argv);
|
|
rtc::test::RunTestsFromIOSApp();
|
|
#endif
|
|
|
|
return RUN_ALL_TESTS();
|
|
}
|