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 } | |
474 | 471 |
475 bool TestLauncher::Run() { | 472 bool TestLauncher::Run() { |
476 if (!Init()) | 473 if (!Init()) |
477 return false; | 474 return false; |
478 | 475 |
479 // Value of |cycles_| changes after each iteration. Keep track of the | 476 // Value of |cycles_| changes after each iteration. Keep track of the |
480 // original value. | 477 // original value. |
481 int requested_cycles = cycles_; | 478 int requested_cycles = cycles_; |
482 | 479 |
483 #if defined(OS_POSIX) | 480 #if defined(OS_POSIX) |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 } | 1085 } |
1089 | 1086 |
1090 std::string snippet(full_output.substr(run_pos)); | 1087 std::string snippet(full_output.substr(run_pos)); |
1091 if (end_pos != std::string::npos) | 1088 if (end_pos != std::string::npos) |
1092 snippet = full_output.substr(run_pos, end_pos - run_pos); | 1089 snippet = full_output.substr(run_pos, end_pos - run_pos); |
1093 | 1090 |
1094 return snippet; | 1091 return snippet; |
1095 } | 1092 } |
1096 | 1093 |
1097 } // namespace base | 1094 } // namespace base |
OLD | NEW |