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

Side by Side Diff: base/test/parallel_test_launcher.cc

Issue 23506031: Fix a test launcher hang when no tests are run. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « no previous file | base/test/test_launcher.cc » ('j') | base/test/test_launcher.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/parallel_test_launcher.h" 5 #include "base/test/parallel_test_launcher.h"
6 6
7 #if defined(OS_POSIX) 7 #if defined(OS_POSIX)
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/stat.h> 9 #include <sys/stat.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 this, 127 this,
128 &ParallelTestLauncher::OnOutputTimeout), 128 &ParallelTestLauncher::OnOutputTimeout),
129 launch_sequence_number_(0), 129 launch_sequence_number_(0),
130 worker_pool_(new SequencedWorkerPool(jobs, "parallel_test_launcher")) { 130 worker_pool_(new SequencedWorkerPool(jobs, "parallel_test_launcher")) {
131 // Start the watchdog timer. 131 // Start the watchdog timer.
132 timer_.Reset(); 132 timer_.Reset();
133 } 133 }
134 134
135 ParallelTestLauncher::~ParallelTestLauncher() { 135 ParallelTestLauncher::~ParallelTestLauncher() {
136 DCHECK(thread_checker_.CalledOnValidThread()); 136 DCHECK(thread_checker_.CalledOnValidThread());
137
138 worker_pool_->Shutdown();
137 } 139 }
138 140
139 void ParallelTestLauncher::LaunchChildGTestProcess( 141 void ParallelTestLauncher::LaunchChildGTestProcess(
140 const CommandLine& command_line, 142 const CommandLine& command_line,
141 const std::string& wrapper, 143 const std::string& wrapper,
142 base::TimeDelta timeout, 144 base::TimeDelta timeout,
143 const LaunchChildGTestProcessCallback& callback) { 145 const LaunchChildGTestProcessCallback& callback) {
144 DCHECK(thread_checker_.CalledOnValidThread()); 146 DCHECK(thread_checker_.CalledOnValidThread());
145 147
146 // Record the exact command line used to launch the child. 148 // Record the exact command line used to launch the child.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 #endif 195 #endif
194 } 196 }
195 197
196 fflush(stdout); 198 fflush(stdout);
197 199
198 // Arm the timer again - otherwise it would fire only once. 200 // Arm the timer again - otherwise it would fire only once.
199 timer_.Reset(); 201 timer_.Reset();
200 } 202 }
201 203
202 } // namespace base 204 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/test/test_launcher.cc » ('j') | base/test/test_launcher.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698