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

Side by Side Diff: chrome/test/base/mash_browser_tests_main.cc

Issue 1888203002: Adds logging code to help figure out why test is crashing on bot (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 if (command_line.HasSwitch(switches::kChildProcess) && 124 if (command_line.HasSwitch(switches::kChildProcess) &&
125 !command_line.HasSwitch(MojoTestConnector::kTestSwitch)) { 125 !command_line.HasSwitch(MojoTestConnector::kTestSwitch)) {
126 base::AtExitManager at_exit; 126 base::AtExitManager at_exit;
127 shell::InitializeLogging(); 127 shell::InitializeLogging();
128 shell::WaitForDebuggerIfNecessary(); 128 shell::WaitForDebuggerIfNecessary();
129 #if !defined(OFFICIAL_BUILD) && defined(OS_WIN) 129 #if !defined(OFFICIAL_BUILD) && defined(OS_WIN)
130 base::RouteStdioToConsole(false); 130 base::RouteStdioToConsole(false);
131 #endif 131 #endif
132 *exit_code = shell::ChildProcessMain(); 132 *exit_code = shell::ChildProcessMain();
133 LOG(ERROR) << "child exit_code=" << *exit_code;
msw 2016/04/14 21:29:40 optional nit: add comments to remove later here an
133 return true; 134 return true;
134 } 135 }
135 136
136 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2); 137 int default_jobs = std::max(1, base::SysInfo::NumberOfProcessors() / 2);
137 MashTestLauncherDelegate delegate; 138 MashTestLauncherDelegate delegate;
138 // --single_process and no primoridal pipe token indicate we were run directly 139 // --single_process and no primoridal pipe token indicate we were run directly
139 // from the command line. In this case we have to start up MojoShellConnection 140 // from the command line. In this case we have to start up MojoShellConnection
140 // as though we were embedded. 141 // as though we were embedded.
141 content::MojoShellConnection::Factory shell_connection_factory; 142 content::MojoShellConnection::Factory shell_connection_factory;
142 if (command_line.HasSwitch(content::kSingleProcessTestsFlag) && 143 if (command_line.HasSwitch(content::kSingleProcessTestsFlag) &&
143 !command_line.HasSwitch(switches::kPrimordialPipeToken)) { 144 !command_line.HasSwitch(switches::kPrimordialPipeToken)) {
144 shell_connection_factory = 145 shell_connection_factory =
145 base::Bind(&CreateMojoShellConnection, &delegate); 146 base::Bind(&CreateMojoShellConnection, &delegate);
146 content::MojoShellConnection::SetFactoryForTest(&shell_connection_factory); 147 content::MojoShellConnection::SetFactoryForTest(&shell_connection_factory);
147 } 148 }
148 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv); 149 *exit_code = LaunchChromeTests(default_jobs, &delegate, argc, argv);
150 LOG(ERROR) << "RunMashBrowserTests exit_code=" << *exit_code;
149 return true; 151 return true;
150 } 152 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698