Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Unified Diff: base/test/launcher/test_launcher.cc

Issue 1154313003: Non-SFI mode: Implement test launcher for nacl_helper_nonsfi_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small clean up for code review. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698