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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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.h ('k') | base/test/launcher/test_launcher_ios.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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 679
680 fprintf(stdout, "Retrying %" PRIuS " test%s (retry #%" PRIuS ")\n", 680 fprintf(stdout, "Retrying %" PRIuS " test%s (retry #%" PRIuS ")\n",
681 retry_started_count, 681 retry_started_count,
682 retry_started_count > 1 ? "s" : "", 682 retry_started_count > 1 ? "s" : "",
683 retry_count_); 683 retry_count_);
684 fflush(stdout); 684 fflush(stdout);
685 685
686 test_started_count_ += retry_started_count; 686 test_started_count_ += retry_started_count;
687 } 687 }
688 688
689 // static
690 std::string TestLauncher::FormatFullTestName(const std::string& test_case_name,
691 const std::string& test_name) {
692 return test_case_name + "." + test_name;
693 }
694
695 bool TestLauncher::Init() { 689 bool TestLauncher::Init() {
696 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 690 const CommandLine* command_line = CommandLine::ForCurrentProcess();
697 691
698 // Initialize sharding. Command line takes precedence over legacy environment 692 // Initialize sharding. Command line takes precedence over legacy environment
699 // variables. 693 // variables.
700 if (command_line->HasSwitch(switches::kTestLauncherTotalShards) && 694 if (command_line->HasSwitch(switches::kTestLauncherTotalShards) &&
701 command_line->HasSwitch(switches::kTestLauncherShardIndex)) { 695 command_line->HasSwitch(switches::kTestLauncherShardIndex)) {
702 if (!StringToInt( 696 if (!StringToInt(
703 command_line->GetSwitchValueASCII( 697 command_line->GetSwitchValueASCII(
704 switches::kTestLauncherTotalShards), 698 switches::kTestLauncherTotalShards),
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 } 1078 }
1085 1079
1086 std::string snippet(full_output.substr(run_pos)); 1080 std::string snippet(full_output.substr(run_pos));
1087 if (end_pos != std::string::npos) 1081 if (end_pos != std::string::npos)
1088 snippet = full_output.substr(run_pos, end_pos - run_pos); 1082 snippet = full_output.substr(run_pos, end_pos - run_pos);
1089 1083
1090 return snippet; 1084 return snippet;
1091 } 1085 }
1092 1086
1093 } // namespace base 1087 } // namespace base
OLDNEW
« no previous file with comments | « base/test/launcher/test_launcher.h ('k') | base/test/launcher/test_launcher_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698