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

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

Issue 2692273008: Hacky slashy (Closed)
Patch Set: rebase on config CL, and minor fixes Created 3 years, 7 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
« no previous file with comments | « base/test/launcher/test_launcher.cc ('k') | base/threading/platform_thread_fuchsia.cc » ('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/unit_test_launcher.h" 5 #include "base/test/launcher/unit_test_launcher.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 return 1; 227 return 1;
228 228
229 fprintf(stdout, 229 fprintf(stdout,
230 "IMPORTANT DEBUGGING NOTE: batches of tests are run inside their\n" 230 "IMPORTANT DEBUGGING NOTE: batches of tests are run inside their\n"
231 "own process. For debugging a test inside a debugger, use the\n" 231 "own process. For debugging a test inside a debugger, use the\n"
232 "--gtest_filter=<your_test_name> flag along with\n" 232 "--gtest_filter=<your_test_name> flag along with\n"
233 "--single-process-tests.\n"); 233 "--single-process-tests.\n");
234 fflush(stdout); 234 fflush(stdout);
235 235
236 MessageLoopForIO message_loop; 236 MessageLoopForIO message_loop;
237 #if defined(OS_POSIX) 237 #if defined(OS_POSIX) && !defined(OS_FUCHSIA)
238 FileDescriptorWatcher file_descriptor_watcher(&message_loop); 238 FileDescriptorWatcher file_descriptor_watcher(&message_loop);
239 #endif 239 #endif
240 240
241 DefaultUnitTestPlatformDelegate platform_delegate; 241 DefaultUnitTestPlatformDelegate platform_delegate;
242 UnitTestLauncherDelegate delegate( 242 UnitTestLauncherDelegate delegate(
243 &platform_delegate, batch_limit, use_job_objects); 243 &platform_delegate, batch_limit, use_job_objects);
244 base::TestLauncher launcher(&delegate, default_jobs); 244 base::TestLauncher launcher(&delegate, default_jobs);
245 bool success = launcher.Run(); 245 bool success = launcher.Run();
246 246
247 fprintf(stdout, "Tests took %" PRId64 " seconds.\n", 247 fprintf(stdout, "Tests took %" PRId64 " seconds.\n",
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 const std::vector<std::string>& test_names) { 636 const std::vector<std::string>& test_names) {
637 ThreadTaskRunnerHandle::Get()->PostTask( 637 ThreadTaskRunnerHandle::Get()->PostTask(
638 FROM_HERE, 638 FROM_HERE,
639 BindOnce(&RunUnitTestsSerially, test_launcher, platform_delegate_, 639 BindOnce(&RunUnitTestsSerially, test_launcher, platform_delegate_,
640 test_names, 640 test_names,
641 use_job_objects_ ? TestLauncher::USE_JOB_OBJECTS : 0)); 641 use_job_objects_ ? TestLauncher::USE_JOB_OBJECTS : 0));
642 return test_names.size(); 642 return test_names.size();
643 } 643 }
644 644
645 } // namespace base 645 } // namespace base
OLDNEW
« no previous file with comments | « base/test/launcher/test_launcher.cc ('k') | base/threading/platform_thread_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698