12f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org/*
22f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
32f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *
42f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *  Use of this source code is governed by a BSD-style license
52f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *  that can be found in the LICENSE file in the root of the source
62f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *  tree. An additional intellectual property rights grant can be found
72f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *  in the file PATENTS.  All contributing project authors may
82f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org *  be found in the AUTHORS file in the root of the source tree.
92f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org */
102f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org
11bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org#include "gflags/gflags.h"
122f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org#include "testing/gtest/include/gtest/gtest.h"
13bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org#include "webrtc/test/field_trial.h"
14f96e534570fa51d8b8c310346ecc3de737d17536pbos@webrtc.org#include "webrtc/test/testsupport/fileutils.h"
152f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org
16bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.orgDEFINE_string(force_fieldtrials, "",
17bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org    "Field trials control experimental feature code which can be forced. "
18bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org    "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enable/"
19bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org    " will assign the group Enable to field trial WebRTC-FooFeature.");
20bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org
212f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.orgint main(int argc, char* argv[]) {
222f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org  ::testing::InitGoogleTest(&argc, argv);
232f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org
24bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org  // AllowCommandLineParsing allows us to ignore flags passed on to us by
25bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org  // Chromium build bots without having to explicitly disable them.
26bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org  google::AllowCommandLineReparsing();
27bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org  google::ParseCommandLineFlags(&argc, &argv, false);
28bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org
29bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org  webrtc::test::SetExecutablePath(argv[0]);
30bd49ac235fe592f7b953c2cfc7421f0b1eddd72eandresp@webrtc.org  webrtc::test::InitFieldTrialsFromString(FLAGS_force_fieldtrials);
3159a001f24ffaedc6680a2e1dd13f2116cd3d95d0mflodman@webrtc.org  return RUN_ALL_TESTS();
322f02da89501237cefea455cf31a1553125f62ad7pbos@webrtc.org}
33