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

Side by Side Diff: base/test/launcher/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 | « no previous file | base/test/launcher/unit_test_launcher.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/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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 } 545 }
546 } else { 546 } else {
547 OnTestIterationFinished(); 547 OnTestIterationFinished();
548 } 548 }
549 } 549 }
550 } 550 }
551 551
552 bool TestLauncher::Init() { 552 bool TestLauncher::Init() {
553 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 553 const CommandLine* command_line = CommandLine::ForCurrentProcess();
554 554
555 if (command_line->HasSwitch(kGTestListTestsFlag)) {
556 // Child gtest processes would list tests instead of running tests.
557 // TODO(phajdan.jr): Restore support for the flag.
558 LOG(ERROR) << kGTestListTestsFlag << " is not supported.";
559 return false;
560 }
561
562 // Initialize sharding. Command line takes precedence over legacy environment 555 // Initialize sharding. Command line takes precedence over legacy environment
563 // variables. 556 // variables.
564 if (command_line->HasSwitch(switches::kTestLauncherTotalShards) && 557 if (command_line->HasSwitch(switches::kTestLauncherTotalShards) &&
565 command_line->HasSwitch(switches::kTestLauncherShardIndex)) { 558 command_line->HasSwitch(switches::kTestLauncherShardIndex)) {
566 if (!StringToInt( 559 if (!StringToInt(
567 command_line->GetSwitchValueASCII( 560 command_line->GetSwitchValueASCII(
568 switches::kTestLauncherTotalShards), 561 switches::kTestLauncherTotalShards),
569 &total_shards_)) { 562 &total_shards_)) {
570 LOG(ERROR) << "Invalid value for " << switches::kTestLauncherTotalShards; 563 LOG(ERROR) << "Invalid value for " << switches::kTestLauncherTotalShards;
571 return false; 564 return false;
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 1004
1012 g_live_processes.Get().erase(process_handle); 1005 g_live_processes.Get().erase(process_handle);
1013 } 1006 }
1014 1007
1015 base::CloseProcessHandle(process_handle); 1008 base::CloseProcessHandle(process_handle);
1016 1009
1017 return exit_code; 1010 return exit_code;
1018 } 1011 }
1019 1012
1020 } // namespace base 1013 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698