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

Side by Side Diff: base/test/launcher/test_launcher.cc

Issue 1417353006: Tests: Simplify SequencedWorkerPoolOwner, call Shutdown on destructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adjust formatting and rebase Created 5 years 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
« no previous file with comments | « base/sequence_checker_unittest.cc ('k') | base/test/sequenced_worker_pool_owner.h » ('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 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
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
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
OLDNEW
« no previous file with comments | « base/sequence_checker_unittest.cc ('k') | base/test/sequenced_worker_pool_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698