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

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

Issue 2411003003: Save an early test summary in case the test launcher crashes or gets killed (Closed)
Patch Set: Created 4 years, 2 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_results_tracker.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 #ifndef BASE_TEST_LAUNCHER_TEST_RESULTS_TRACKER_H_ 5 #ifndef BASE_TEST_LAUNCHER_TEST_RESULTS_TRACKER_H_
6 #define BASE_TEST_LAUNCHER_TEST_RESULTS_TRACKER_H_ 6 #define BASE_TEST_LAUNCHER_TEST_RESULTS_TRACKER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Prints a summary of current test iteration to stdout. 54 // Prints a summary of current test iteration to stdout.
55 void PrintSummaryOfCurrentIteration() const; 55 void PrintSummaryOfCurrentIteration() const;
56 56
57 // Prints a summary of all test iterations (not just the last one) to stdout. 57 // Prints a summary of all test iterations (not just the last one) to stdout.
58 void PrintSummaryOfAllIterations() const; 58 void PrintSummaryOfAllIterations() const;
59 59
60 // Adds a string tag to the JSON summary. This is intended to indicate 60 // Adds a string tag to the JSON summary. This is intended to indicate
61 // conditions that affect the entire test run, as opposed to individual tests. 61 // conditions that affect the entire test run, as opposed to individual tests.
62 void AddGlobalTag(const std::string& tag); 62 void AddGlobalTag(const std::string& tag);
63 63
64 // Saves a JSON summary of all test iterations results to |path|. Returns 64 // Saves a JSON summary of all test iterations results to |path|. Adds
65 // |additional_tags| to the summary (just for this invocation). Returns
65 // true on success. 66 // true on success.
66 bool SaveSummaryAsJSON(const FilePath& path) const WARN_UNUSED_RESULT; 67 bool SaveSummaryAsJSON(
68 const FilePath& path,
69 const std::vector<std::string>& additional_tags) const WARN_UNUSED_RESULT;
67 70
68 // Map where keys are test result statuses, and values are sets of tests 71 // Map where keys are test result statuses, and values are sets of tests
69 // which finished with that status. 72 // which finished with that status.
70 typedef std::map<TestResult::Status, std::set<std::string> > TestStatusMap; 73 typedef std::map<TestResult::Status, std::set<std::string> > TestStatusMap;
71 74
72 // Returns a test status map (see above) for current test iteration. 75 // Returns a test status map (see above) for current test iteration.
73 TestStatusMap GetTestStatusMapForCurrentIteration() const; 76 TestStatusMap GetTestStatusMapForCurrentIteration() const;
74 77
75 // Returns a test status map (see above) for all test iterations. 78 // Returns a test status map (see above) for all test iterations.
76 TestStatusMap GetTestStatusMapForAllIterations() const; 79 TestStatusMap GetTestStatusMapForAllIterations() const;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 135
133 // File handle of output file (can be NULL if no file). 136 // File handle of output file (can be NULL if no file).
134 FILE* out_; 137 FILE* out_;
135 138
136 DISALLOW_COPY_AND_ASSIGN(TestResultsTracker); 139 DISALLOW_COPY_AND_ASSIGN(TestResultsTracker);
137 }; 140 };
138 141
139 } // namespace base 142 } // namespace base
140 143
141 #endif // BASE_TEST_LAUNCHER_TEST_RESULTS_TRACKER_H_ 144 #endif // BASE_TEST_LAUNCHER_TEST_RESULTS_TRACKER_H_
OLDNEW
« no previous file with comments | « base/test/launcher/test_launcher.cc ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698