1/*
2 *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 *  Use of this source code is governed by a BSD-style license
5 *  that can be found in the LICENSE file in the root of the source
6 *  tree. An additional intellectual property rights grant can be found
7 *  in the file PATENTS.  All contributing project authors may
8 *  be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "gflags/gflags.h"
12#include "testing/gtest/include/gtest/gtest.h"
13#include "webrtc/test/field_trial.h"
14#include "webrtc/test/testsupport/fileutils.h"
15
16DEFINE_string(force_fieldtrials, "",
17    "Field trials control experimental feature code which can be forced. "
18    "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
19    " will assign the group Enable to field trial WebRTC-FooFeature.");
20
21int main(int argc, char* argv[]) {
22  ::testing::InitGoogleTest(&argc, argv);
23
24  // AllowCommandLineParsing allows us to ignore flags passed on to us by
25  // Chromium build bots without having to explicitly disable them.
26  google::AllowCommandLineReparsing();
27  google::ParseCommandLineFlags(&argc, &argv, false);
28
29  webrtc::test::SetExecutablePath(argv[0]);
30  webrtc::test::InitFieldTrialsFromString(FLAGS_force_fieldtrials);
31  return RUN_ALL_TESTS();
32}
33