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

Side by Side Diff: base/test/launcher/test_launcher_ios.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.cc ('k') | base/test/launcher/test_launcher_nacl_nonsfi.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 std::string raw_output; 81 std::string raw_output;
82 if (!base::GetAppOutput(cmd_line, &raw_output)) { 82 if (!base::GetAppOutput(cmd_line, &raw_output)) {
83 LOG(ERROR) << "GetAppOutput failed."; 83 LOG(ERROR) << "GetAppOutput failed.";
84 return false; 84 return false;
85 } 85 }
86 writable_path_ = base::FilePath(raw_output); 86 writable_path_ = base::FilePath(raw_output);
87 87
88 return true; 88 return true;
89 } 89 }
90 90
91 bool GetTests(std::vector<base::SplitTestName>* output) override { 91 bool GetTests(std::vector<base::TestIdentifier>* output) override {
92 base::ScopedTempDir temp_dir; 92 base::ScopedTempDir temp_dir;
93 if (!temp_dir.CreateUniqueTempDirUnderPath(writable_path_)) 93 if (!temp_dir.CreateUniqueTempDirUnderPath(writable_path_))
94 return false; 94 return false;
95 base::FilePath test_list_path( 95 base::FilePath test_list_path(
96 temp_dir.path().AppendASCII("test_list.json")); 96 temp_dir.path().AppendASCII("test_list.json"));
97 97
98 base::CommandLine cmd_line(dir_exe_.AppendASCII(test_name_ + ".app")); 98 base::CommandLine cmd_line(dir_exe_.AppendASCII(test_name_ + ".app"));
99 cmd_line.AppendSwitchPath(switches::kTestLauncherListTests, test_list_path); 99 cmd_line.AppendSwitchPath(switches::kTestLauncherListTests, test_list_path);
100 cmd_line.PrependWrapper(dir_exe_.AppendASCII("iossim").value()); 100 cmd_line.PrependWrapper(dir_exe_.AppendASCII("iossim").value());
101 101
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Force one job since we can't run multiple simulators in parallel. 178 // Force one job since we can't run multiple simulators in parallel.
179 base::TestLauncher launcher(&delegate, 1); 179 base::TestLauncher launcher(&delegate, 1);
180 bool success = launcher.Run(); 180 bool success = launcher.Run();
181 181
182 fprintf(stdout, "Tests took %" PRId64 " seconds.\n", 182 fprintf(stdout, "Tests took %" PRId64 " seconds.\n",
183 (base::TimeTicks::Now() - start_time).InSeconds()); 183 (base::TimeTicks::Now() - start_time).InSeconds());
184 fflush(stdout); 184 fflush(stdout);
185 185
186 return (success ? 0 : 1); 186 return (success ? 0 : 1);
187 } 187 }
OLDNEW
« no previous file with comments | « base/test/launcher/test_launcher.cc ('k') | base/test/launcher/test_launcher_nacl_nonsfi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698