| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 // NOTE: We do this check after updating the switches as otherwise the gtest | 176 // NOTE: We do this check after updating the switches as otherwise the gtest |
| 177 // help is written in parallel with our text and can appear interleaved. | 177 // help is written in parallel with our text and can appear interleaved. |
| 178 if (command_line->HasSwitch(switches::kHelpSwitchName)) { | 178 if (command_line->HasSwitch(switches::kHelpSwitchName)) { |
| 179 PrintUsage(); | 179 PrintUsage(); |
| 180 PrintJsonFileInfo(); | 180 PrintJsonFileInfo(); |
| 181 PrintAuthCodeInfo(); | 181 PrintAuthCodeInfo(); |
| 182 return base::LaunchUnitTestsSerially( | 182 return base::LaunchUnitTestsSerially( |
| 183 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv)); | 183 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv)); |
| 184 } | 184 } |
| 185 | 185 |
| 186 // Update the logging verbosity level is user specified one. | 186 // Update the logging verbosity level if user specified one. |
| 187 std::string verbosity_level( | 187 std::string verbosity_level( |
| 188 command_line->GetSwitchValueASCII(switches::kLoggingLevelSwitchName)); | 188 command_line->GetSwitchValueASCII(switches::kLoggingLevelSwitchName)); |
| 189 if (!verbosity_level.empty()) { | 189 if (!verbosity_level.empty()) { |
| 190 // Turn on logging for the test_driver and remoting components. | 190 // Turn on logging for the test_driver and remoting components. |
| 191 // This switch is parsed during logging::InitLogging. | 191 // This switch is parsed during logging::InitLogging. |
| 192 command_line->AppendSwitchASCII("vmodule", | 192 command_line->AppendSwitchASCII("vmodule", |
| 193 "*/remoting/*=" + verbosity_level); | 193 "*/remoting/*=" + verbosity_level); |
| 194 logging::LoggingSettings logging_settings; | 194 logging::LoggingSettings logging_settings; |
| 195 logging::InitLogging(logging_settings); | 195 logging::InitLogging(logging_settings); |
| 196 } | 196 } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 // Since we've successfully set up our shared_data object, we'll assign the | 239 // Since we've successfully set up our shared_data object, we'll assign the |
| 240 // value to our global* and transfer ownership to the framework. | 240 // value to our global* and transfer ownership to the framework. |
| 241 remoting::test::g_chromoting_shared_data = shared_data.release(); | 241 remoting::test::g_chromoting_shared_data = shared_data.release(); |
| 242 testing::AddGlobalTestEnvironment(remoting::test::g_chromoting_shared_data); | 242 testing::AddGlobalTestEnvironment(remoting::test::g_chromoting_shared_data); |
| 243 | 243 |
| 244 // Running the tests serially will avoid clients from connecting to the same | 244 // Running the tests serially will avoid clients from connecting to the same |
| 245 // host. | 245 // host. |
| 246 return base::LaunchUnitTestsSerially( | 246 return base::LaunchUnitTestsSerially( |
| 247 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv)); | 247 argc, argv, base::Bind(&NoAtExitBaseTestSuite::RunTestSuite, argc, argv)); |
| 248 } | 248 } |
| OLD | NEW |