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/launcher/test_launcher.h" | 5 #include "base/test/launcher/test_launcher.h" |
6 | 6 |
7 #if defined(OS_POSIX) | 7 #if defined(OS_POSIX) |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 retry_limit_(0), | 460 retry_limit_(0), |
461 force_run_broken_tests_(false), | 461 force_run_broken_tests_(false), |
462 run_result_(true), | 462 run_result_(true), |
463 watchdog_timer_(FROM_HERE, | 463 watchdog_timer_(FROM_HERE, |
464 TimeDelta::FromSeconds(kOutputTimeoutSeconds), | 464 TimeDelta::FromSeconds(kOutputTimeoutSeconds), |
465 this, | 465 this, |
466 &TestLauncher::OnOutputTimeout), | 466 &TestLauncher::OnOutputTimeout), |
467 parallel_jobs_(parallel_jobs) { | 467 parallel_jobs_(parallel_jobs) { |
468 } | 468 } |
469 | 469 |
470 TestLauncher::~TestLauncher() {} | 470 TestLauncher::~TestLauncher() { |
| 471 if (worker_pool_owner_) |
| 472 worker_pool_owner_->pool()->Shutdown(); |
| 473 } |
471 | 474 |
472 bool TestLauncher::Run() { | 475 bool TestLauncher::Run() { |
473 if (!Init()) | 476 if (!Init()) |
474 return false; | 477 return false; |
475 | 478 |
476 // Value of |cycles_| changes after each iteration. Keep track of the | 479 // Value of |cycles_| changes after each iteration. Keep track of the |
477 // original value. | 480 // original value. |
478 int requested_cycles = cycles_; | 481 int requested_cycles = cycles_; |
479 | 482 |
480 #if defined(OS_POSIX) | 483 #if defined(OS_POSIX) |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 } | 1088 } |
1086 | 1089 |
1087 std::string snippet(full_output.substr(run_pos)); | 1090 std::string snippet(full_output.substr(run_pos)); |
1088 if (end_pos != std::string::npos) | 1091 if (end_pos != std::string::npos) |
1089 snippet = full_output.substr(run_pos, end_pos - run_pos); | 1092 snippet = full_output.substr(run_pos, end_pos - run_pos); |
1090 | 1093 |
1091 return snippet; | 1094 return snippet; |
1092 } | 1095 } |
1093 | 1096 |
1094 } // namespace base | 1097 } // namespace base |
OLD | NEW |