| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/test_launcher.h" | 5 #include "base/test/test_launcher.h" |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 TestLauncherDelegate::~TestLauncherDelegate() { | 351 TestLauncherDelegate::~TestLauncherDelegate() { |
| 352 } | 352 } |
| 353 | 353 |
| 354 int LaunchChildGTestProcess(const CommandLine& command_line, | 354 int LaunchChildGTestProcess(const CommandLine& command_line, |
| 355 const std::string& wrapper, | 355 const std::string& wrapper, |
| 356 base::TimeDelta timeout, | 356 base::TimeDelta timeout, |
| 357 bool* was_timeout) { | 357 bool* was_timeout) { |
| 358 CommandLine new_command_line(command_line.GetProgram()); | 358 CommandLine new_command_line(command_line.GetProgram()); |
| 359 CommandLine::SwitchMap switches = command_line.GetSwitches(); | 359 CommandLine::SwitchMap switches = command_line.GetSwitches(); |
| 360 | 360 |
| 361 // Strip out gtest_output flag because otherwise we would overwrite results | |
| 362 // of the other tests. | |
| 363 switches.erase(kGTestOutputFlag); | |
| 364 | |
| 365 // Strip out gtest_repeat flag - this is handled by the launcher process. | 361 // Strip out gtest_repeat flag - this is handled by the launcher process. |
| 366 switches.erase(kGTestRepeatFlag); | 362 switches.erase(kGTestRepeatFlag); |
| 367 | 363 |
| 368 for (CommandLine::SwitchMap::const_iterator iter = switches.begin(); | 364 for (CommandLine::SwitchMap::const_iterator iter = switches.begin(); |
| 369 iter != switches.end(); ++iter) { | 365 iter != switches.end(); ++iter) { |
| 370 new_command_line.AppendSwitchNative((*iter).first, (*iter).second); | 366 new_command_line.AppendSwitchNative((*iter).first, (*iter).second); |
| 371 } | 367 } |
| 372 | 368 |
| 373 // Prepend wrapper after last CommandLine quasi-copy operation. CommandLine | 369 // Prepend wrapper after last CommandLine quasi-copy operation. CommandLine |
| 374 // does not really support removing switches well, and trying to do that | 370 // does not really support removing switches well, and trying to do that |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 438 |
| 443 // Special value "-1" means "repeat indefinitely". | 439 // Special value "-1" means "repeat indefinitely". |
| 444 if (cycles != -1) | 440 if (cycles != -1) |
| 445 cycles--; | 441 cycles--; |
| 446 } | 442 } |
| 447 | 443 |
| 448 return exit_code; | 444 return exit_code; |
| 449 } | 445 } |
| 450 | 446 |
| 451 } // namespace base | 447 } // namespace base |
| OLD | NEW |