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

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

Issue 66293006: GTTF: Test launcher - correctly handle non-zero exit code with all tests passing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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_result.cc ('k') | 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_results_tracker.h" 5 #include "base/test/launcher/test_results_tracker.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 j != per_iteration_data_[iteration_].results.end(); 168 j != per_iteration_data_[iteration_].results.end();
169 ++j) { 169 ++j) {
170 // Use the last test result as the final one. 170 // Use the last test result as the final one.
171 TestResult result = j->second.test_results.back(); 171 TestResult result = j->second.test_results.back();
172 tests_by_status[result.status].insert(result.full_name); 172 tests_by_status[result.status].insert(result.full_name);
173 } 173 }
174 174
175 PrintTests(tests_by_status[TestResult::TEST_FAILURE].begin(), 175 PrintTests(tests_by_status[TestResult::TEST_FAILURE].begin(),
176 tests_by_status[TestResult::TEST_FAILURE].end(), 176 tests_by_status[TestResult::TEST_FAILURE].end(),
177 "failed"); 177 "failed");
178 PrintTests(tests_by_status[TestResult::TEST_FAILURE_ON_EXIT].begin(),
179 tests_by_status[TestResult::TEST_FAILURE_ON_EXIT].end(),
180 "failed on exit");
178 PrintTests(tests_by_status[TestResult::TEST_TIMEOUT].begin(), 181 PrintTests(tests_by_status[TestResult::TEST_TIMEOUT].begin(),
179 tests_by_status[TestResult::TEST_TIMEOUT].end(), 182 tests_by_status[TestResult::TEST_TIMEOUT].end(),
180 "timed out"); 183 "timed out");
181 PrintTests(tests_by_status[TestResult::TEST_CRASH].begin(), 184 PrintTests(tests_by_status[TestResult::TEST_CRASH].begin(),
182 tests_by_status[TestResult::TEST_CRASH].end(), 185 tests_by_status[TestResult::TEST_CRASH].end(),
183 "crashed"); 186 "crashed");
184 PrintTests(tests_by_status[TestResult::TEST_SKIPPED].begin(), 187 PrintTests(tests_by_status[TestResult::TEST_SKIPPED].begin(),
185 tests_by_status[TestResult::TEST_SKIPPED].end(), 188 tests_by_status[TestResult::TEST_SKIPPED].end(),
186 "skipped"); 189 "skipped");
187 PrintTests(tests_by_status[TestResult::TEST_UNKNOWN].begin(), 190 PrintTests(tests_by_status[TestResult::TEST_UNKNOWN].begin(),
(...skipping 16 matching lines...) Expand all
204 tests_by_status[result.status].insert(result.full_name); 207 tests_by_status[result.status].insert(result.full_name);
205 } 208 }
206 } 209 }
207 210
208 fprintf(stdout, "Summary of all itest iterations:\n"); 211 fprintf(stdout, "Summary of all itest iterations:\n");
209 fflush(stdout); 212 fflush(stdout);
210 213
211 PrintTests(tests_by_status[TestResult::TEST_FAILURE].begin(), 214 PrintTests(tests_by_status[TestResult::TEST_FAILURE].begin(),
212 tests_by_status[TestResult::TEST_FAILURE].end(), 215 tests_by_status[TestResult::TEST_FAILURE].end(),
213 "failed"); 216 "failed");
217 PrintTests(tests_by_status[TestResult::TEST_FAILURE_ON_EXIT].begin(),
218 tests_by_status[TestResult::TEST_FAILURE_ON_EXIT].end(),
219 "failed on exit");
214 PrintTests(tests_by_status[TestResult::TEST_TIMEOUT].begin(), 220 PrintTests(tests_by_status[TestResult::TEST_TIMEOUT].begin(),
215 tests_by_status[TestResult::TEST_TIMEOUT].end(), 221 tests_by_status[TestResult::TEST_TIMEOUT].end(),
216 "timed out"); 222 "timed out");
217 PrintTests(tests_by_status[TestResult::TEST_CRASH].begin(), 223 PrintTests(tests_by_status[TestResult::TEST_CRASH].begin(),
218 tests_by_status[TestResult::TEST_CRASH].end(), 224 tests_by_status[TestResult::TEST_CRASH].end(),
219 "crashed"); 225 "crashed");
220 PrintTests(tests_by_status[TestResult::TEST_SKIPPED].begin(), 226 PrintTests(tests_by_status[TestResult::TEST_SKIPPED].begin(),
221 tests_by_status[TestResult::TEST_SKIPPED].end(), 227 tests_by_status[TestResult::TEST_SKIPPED].end(),
222 "skipped"); 228 "skipped");
223 PrintTests(tests_by_status[TestResult::TEST_UNKNOWN].begin(), 229 PrintTests(tests_by_status[TestResult::TEST_UNKNOWN].begin(),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 TestResultsTracker::AggregateTestResult::~AggregateTestResult() { 289 TestResultsTracker::AggregateTestResult::~AggregateTestResult() {
284 } 290 }
285 291
286 TestResultsTracker::PerIterationData::PerIterationData() { 292 TestResultsTracker::PerIterationData::PerIterationData() {
287 } 293 }
288 294
289 TestResultsTracker::PerIterationData::~PerIterationData() { 295 TestResultsTracker::PerIterationData::~PerIterationData() {
290 } 296 }
291 297
292 } // namespace base 298 } // namespace base
OLDNEW
« no previous file with comments | « base/test/launcher/test_result.cc ('k') | base/test/launcher/unit_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698