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

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

Issue 1262693002: test launcher: print test file names and lines in summary results (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 4 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_ios.cc ('k') | base/test/launcher/test_results_tracker.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <inttypes.h> 5 #include <inttypes.h>
6 #include <stdio.h> 6 #include <stdio.h>
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 private: 78 private:
79 bool CreateTemporaryFile(base::FilePath* path) override { 79 bool CreateTemporaryFile(base::FilePath* path) override {
80 if (!base::CreateNewTempDirectory(base::FilePath::StringType(), path)) 80 if (!base::CreateNewTempDirectory(base::FilePath::StringType(), path))
81 return false; 81 return false;
82 *path = path->AppendASCII("test_results.xml"); 82 *path = path->AppendASCII("test_results.xml");
83 return true; 83 return true;
84 } 84 }
85 85
86 bool GetTests(std::vector<base::SplitTestName>* output) override { 86 bool GetTests(std::vector<base::TestIdentifier>* output) override {
87 base::FilePath output_file; 87 base::FilePath output_file;
88 if (!base::CreateTemporaryFile(&output_file)) { 88 if (!base::CreateTemporaryFile(&output_file)) {
89 LOG(ERROR) << "Failed to create a temp file."; 89 LOG(ERROR) << "Failed to create a temp file.";
90 return false; 90 return false;
91 } 91 }
92 92
93 base::CommandLine cmd_line(test_path_); 93 base::CommandLine cmd_line(test_path_);
94 cmd_line.AppendSwitchPath(switches::kTestLauncherListTests, output_file); 94 cmd_line.AppendSwitchPath(switches::kTestLauncherListTests, output_file);
95 95
96 base::LaunchOptions launch_options; 96 base::LaunchOptions launch_options;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 base::TestLauncher launcher(&delegate, base::SysInfo::NumberOfProcessors()); 151 base::TestLauncher launcher(&delegate, base::SysInfo::NumberOfProcessors());
152 bool success = launcher.Run(); 152 bool success = launcher.Run();
153 153
154 fprintf(stdout, "Tests took %" PRId64 " seconds.\n", 154 fprintf(stdout, "Tests took %" PRId64 " seconds.\n",
155 (base::TimeTicks::Now() - start_time).InSeconds()); 155 (base::TimeTicks::Now() - start_time).InSeconds());
156 fflush(stdout); 156 fflush(stdout);
157 return success ? 0 : 1; 157 return success ? 0 : 1;
158 } 158 }
159 159
160 } // namespace base 160 } // namespace base
OLDNEW
« no previous file with comments | « base/test/launcher/test_launcher_ios.cc ('k') | base/test/launcher/test_results_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698