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

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

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/profiler/scoped_tracker.cc ('k') | base/threading/platform_thread_linux.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/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 fflush(stdout); 472 fflush(stdout);
473 } else { 473 } else {
474 if (base::debug::BeingDebugged()) { 474 if (base::debug::BeingDebugged()) {
475 fprintf(stdout, 475 fprintf(stdout,
476 "Debugger detected, switching to single process mode.\n" 476 "Debugger detected, switching to single process mode.\n"
477 "Pass --test-launcher-debug-launcher to debug the launcher " 477 "Pass --test-launcher-debug-launcher to debug the launcher "
478 "itself.\n"); 478 "itself.\n");
479 fflush(stdout); 479 fflush(stdout);
480 force_single_process = true; 480 force_single_process = true;
481 } 481 }
482
483 if (RunningOnValgrind()) {
484 fprintf(stdout,
485 "Valgrind detected, switching to single process mode.\n"
486 "Pass --test-launcher-debug-launcher to valgrind the launcher "
487 "itself.\n");
488 fflush(stdout);
489 force_single_process = true;
490 }
491 } 482 }
492 483
493 if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) || 484 if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) ||
494 CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) || 485 CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) ||
495 CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) || 486 CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) ||
496 force_single_process) { 487 force_single_process) {
497 return run_test_suite.Run(); 488 return run_test_suite.Run();
498 } 489 }
499 #endif 490 #endif
500 491
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 CommandLine::Init(argc, NULL); 567 CommandLine::Init(argc, NULL);
577 return LaunchUnitTestsInternal( 568 return LaunchUnitTestsInternal(
578 run_test_suite, 569 run_test_suite,
579 SysInfo::NumberOfProcessors(), 570 SysInfo::NumberOfProcessors(),
580 use_job_objects, 571 use_job_objects,
581 Bind(&InitGoogleTestWChar, &argc, argv)); 572 Bind(&InitGoogleTestWChar, &argc, argv));
582 } 573 }
583 #endif // defined(OS_WIN) 574 #endif // defined(OS_WIN)
584 575
585 } // namespace base 576 } // namespace base
OLDNEW
« no previous file with comments | « base/profiler/scoped_tracker.cc ('k') | base/threading/platform_thread_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698