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

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

Issue 118723005: Make --gtest_list_tests work again for unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « base/test/launcher/test_launcher.cc ('k') | no next file » | 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 fprintf(stdout, 493 fprintf(stdout,
494 "Valgrind detected, switching to single process mode.\n" 494 "Valgrind detected, switching to single process mode.\n"
495 "Pass --test-launcher-debug-launcher to valgrind the launcher " 495 "Pass --test-launcher-debug-launcher to valgrind the launcher "
496 "itself.\n"); 496 "itself.\n");
497 fflush(stdout); 497 fflush(stdout);
498 force_single_process = true; 498 force_single_process = true;
499 } 499 }
500 } 500 }
501 501
502 if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) || 502 if (CommandLine::ForCurrentProcess()->HasSwitch(kGTestHelpFlag) ||
503 CommandLine::ForCurrentProcess()->HasSwitch(kGTestListTestsFlag) ||
503 CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) || 504 CommandLine::ForCurrentProcess()->HasSwitch(kSingleProcessTestsFlag) ||
504 force_single_process) { 505 force_single_process) {
505 return run_test_suite.Run(); 506 return run_test_suite.Run();
506 } 507 }
507 #endif 508 #endif
508 509
509 if (CommandLine::ForCurrentProcess()->HasSwitch(kHelpFlag)) { 510 if (CommandLine::ForCurrentProcess()->HasSwitch(kHelpFlag)) {
510 PrintUsage(); 511 PrintUsage();
511 return 0; 512 return 0;
512 } 513 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 argc, argv, run_test_suite, SysInfo::NumberOfProcessors()); 551 argc, argv, run_test_suite, SysInfo::NumberOfProcessors());
551 } 552 }
552 553
553 int LaunchUnitTestsSerially(int argc, 554 int LaunchUnitTestsSerially(int argc,
554 char** argv, 555 char** argv,
555 const RunTestSuiteCallback& run_test_suite) { 556 const RunTestSuiteCallback& run_test_suite) {
556 return LaunchUnitTestsInternal(argc, argv, run_test_suite, 1); 557 return LaunchUnitTestsInternal(argc, argv, run_test_suite, 1);
557 } 558 }
558 559
559 } // namespace base 560 } // namespace base
OLDNEW
« no previous file with comments | « base/test/launcher/test_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698