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

Side by Side Diff: chrome/test/test_launcher/out_of_proc_test_runner.cc

Issue 3035062: Revert 55400 - Cleanup in base. This moves the implementation (and a bunch of... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/perf/perftests.cc ('k') | chrome/test/test_launcher/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 // Always enable disabled tests. This method is not called with disabled 73 // Always enable disabled tests. This method is not called with disabled
74 // tests unless this flag was specified to the browser test executable. 74 // tests unless this flag was specified to the browser test executable.
75 new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests"); 75 new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests");
76 new_cmd_line.AppendSwitchASCII("gtest_filter", test_name); 76 new_cmd_line.AppendSwitchASCII("gtest_filter", test_name);
77 new_cmd_line.AppendSwitch(kChildProcessFlag); 77 new_cmd_line.AppendSwitch(kChildProcessFlag);
78 78
79 // Do not let the child ignore failures. We need to propagate the 79 // Do not let the child ignore failures. We need to propagate the
80 // failure status back to the parent. 80 // failure status back to the parent.
81 new_cmd_line.AppendSwitch(base::TestSuite::kStrictFailureHandling); 81 new_cmd_line.AppendSwitch(kStrictFailureHandling);
82 82
83 base::ProcessHandle process_handle; 83 base::ProcessHandle process_handle;
84 if (!base::LaunchApp(new_cmd_line, false, false, &process_handle)) 84 if (!base::LaunchApp(new_cmd_line, false, false, &process_handle))
85 return false; 85 return false;
86 86
87 int test_terminate_timeout_ms = kDefaultTestTimeoutMs; 87 int test_terminate_timeout_ms = kDefaultTestTimeoutMs;
88 if (cmd_line->HasSwitch(kTestTerminateTimeoutFlag)) { 88 if (cmd_line->HasSwitch(kTestTerminateTimeoutFlag)) {
89 std::string timeout_str = 89 std::string timeout_str =
90 cmd_line->GetSwitchValueASCII(kTestTerminateTimeoutFlag); 90 cmd_line->GetSwitchValueASCII(kTestTerminateTimeoutFlag);
91 int timeout; 91 int timeout;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 "Starting tests...\n" 203 "Starting tests...\n"
204 "IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n" 204 "IMPORTANT DEBUGGING NOTE: each test is run inside its own process.\n"
205 "For debugging a test inside a debugger, use the\n" 205 "For debugging a test inside a debugger, use the\n"
206 "--gtest_filter=<your_test_name> flag along with either\n" 206 "--gtest_filter=<your_test_name> flag along with either\n"
207 "--single_process (to run all tests in one launcher/browser process) or\n" 207 "--single_process (to run all tests in one launcher/browser process) or\n"
208 "--single-process (to do the above, and also run Chrome in single-\n" 208 "--single-process (to do the above, and also run Chrome in single-\n"
209 "process mode).\n"); 209 "process mode).\n");
210 OutOfProcTestRunnerFactory test_runner_factory; 210 OutOfProcTestRunnerFactory test_runner_factory;
211 return tests::RunTests(test_runner_factory) ? 0 : 1; 211 return tests::RunTests(test_runner_factory) ? 0 : 1;
212 } 212 }
OLDNEW
« no previous file with comments | « chrome/test/perf/perftests.cc ('k') | chrome/test/test_launcher/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698