OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |