Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include <string> | |
| 6 | |
| 7 #include "base/command_line.h" | |
| 8 #include "base/test/test_suite.h" | |
| 9 #include "base/test/test_switches.h" | |
| 10 #include "testing/gtest/include/gtest/gtest.h" | |
| 11 | |
| 12 namespace switches { | |
| 13 const char kSingleProcessTestsSwitchName[] = "single-process-tests"; | |
| 14 const char kUserNameSwitchName[] = "username"; | |
| 15 } | |
| 16 | |
| 17 int main(int argc, char* argv[]) { | |
| 18 testing::InitGoogleTest(&argc, argv); | |
| 19 base::TestSuite test_suite(argc, argv); | |
| 20 | |
| 21 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | |
| 22 DCHECK(command_line); | |
| 23 | |
| 24 // Do not retry if tests fails. | |
| 25 command_line->AppendSwitchASCII(switches::kTestLauncherRetryLimit, "0"); | |
| 26 | |
| 27 // Do not run tests in parallel. Interactions between the host and test | |
| 28 // client should not interfere with another test client. | |
|
joedow
2015/06/08 18:35:20
Can you make this comment more clear about why you
tonychun
2015/06/08 20:35:58
This is an old comment. I should have changed it.
| |
| 29 command_line->AppendSwitch(switches::kSingleProcessTestsSwitchName); | |
| 30 | |
| 31 std::string username( | |
| 32 command_line->GetSwitchValueASCII(switches::kUserNameSwitchName)); | |
| 33 // Verify that the username is passed in as an argument. | |
| 34 if (username.empty()) { | |
| 35 LOG(ERROR) << "No username passed in, can't authenticate without that!"; | |
| 36 return -1; | |
| 37 } | |
| 38 DVLOG(1) << "Running chromoting tests as: " << username; | |
| 39 | |
| 40 return 0; | |
|
Sergey Ulanov
2015/06/08 18:57:37
This doesn't actually run any tests. Is this inten
tonychun
2015/06/08 20:35:58
Yes. My first step was to just have a driver up an
| |
| 41 } | |
| 42 | |
| OLD | NEW |