Index: base/test/launcher/test_launcher.cc |
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc |
index 7f258f5f3953f7b20b3379f87fb009bbc6e78de2..511c00a49605f7dc6ad83780057dc139531fa1f7 100644 |
--- a/base/test/launcher/test_launcher.cc |
+++ b/base/test/launcher/test_launcher.cc |
@@ -211,7 +211,8 @@ bool BotModeEnabled() { |
// Returns command line command line after gtest-specific processing |
// and applying |wrapper|. |
CommandLine PrepareCommandLineForGTest(const CommandLine& command_line, |
- const std::string& wrapper) { |
+ const std::string& wrapper, |
+ bool use_gtest_output) { |
CommandLine new_command_line(command_line.GetProgram()); |
CommandLine::SwitchMap switches = command_line.GetSwitches(); |
@@ -219,7 +220,8 @@ CommandLine PrepareCommandLineForGTest(const CommandLine& command_line, |
switches.erase(kGTestRepeatFlag); |
// Don't try to write the final XML report in child processes. |
- switches.erase(kGTestOutputFlag); |
+ if (!use_gtest_output) |
+ switches.erase(kGTestOutputFlag); |
for (CommandLine::SwitchMap::const_iterator iter = switches.begin(); |
iter != switches.end(); ++iter) { |
@@ -446,6 +448,7 @@ TestLauncherDelegate::~TestLauncherDelegate() { |
TestLauncher::TestLauncher(TestLauncherDelegate* launcher_delegate, |
size_t parallel_jobs) |
: launcher_delegate_(launcher_delegate), |
+ use_child_gtest_output_(false), |
total_shards_(1), |
shard_index_(0), |
cycles_(1), |
@@ -524,8 +527,8 @@ void TestLauncher::LaunchChildGTestProcess( |
DCHECK(thread_checker_.CalledOnValidThread()); |
// Record the exact command line used to launch the child. |
- CommandLine new_command_line( |
- PrepareCommandLineForGTest(command_line, wrapper)); |
+ CommandLine new_command_line(PrepareCommandLineForGTest( |
+ command_line, wrapper, use_child_gtest_output_)); |
// When running in parallel mode we need to redirect stdio to avoid mixed-up |
// output. We also always redirect on the bots to get the test output into |