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

Unified Diff: base/test/launcher/test_results_tracker.h

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: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/test/launcher/test_launcher_nacl_nonsfi.cc ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_results_tracker.h
diff --git a/base/test/launcher/test_results_tracker.h b/base/test/launcher/test_results_tracker.h
index 2bddebc56ed03ce7b733fd1789cd0c66f8664fa9..6cb7795d949755afbba64f664d4a34ca16dd01ff 100644
--- a/base/test/launcher/test_results_tracker.h
+++ b/base/test/launcher/test_results_tracker.h
@@ -42,7 +42,7 @@ class TestResultsTracker {
// Adds |test_name| to the set of discovered tests (this includes all tests
// present in the executable, not necessarily run).
- void AddTest(const std::string& test_name);
+ void AddTest(const std::string& test_name, const std::string& file, int line);
// Adds |test_name| to the set of disabled tests.
void AddDisabledTest(const std::string& test_name);
@@ -77,6 +77,11 @@ class TestResultsTracker {
private:
void GetTestStatusForIteration(int iteration, TestStatusMap* map) const;
+ template<typename InputIterator>
+ void PrintTests(InputIterator first,
+ InputIterator last,
+ const std::string& description) const;
+
struct AggregateTestResult {
AggregateTestResult();
~AggregateTestResult();
@@ -93,6 +98,14 @@ class TestResultsTracker {
ResultsMap results;
};
+ struct CodeLocation {
+ CodeLocation(const std::string f, int l) : file(f), line(l) {
sky 2015/07/28 22:37:07 const std::string&
Paweł Hajdan Jr. 2015/07/29 08:47:07 Done.
+ }
+
+ std::string file;
+ int line;
+ };
+
ThreadChecker thread_checker_;
// Set of global tags, i.e. strings indicating conditions that apply to
@@ -102,6 +115,8 @@ class TestResultsTracker {
// Set of all test names discovered in the current executable.
std::set<std::string> all_tests_;
+ std::map<std::string, CodeLocation> test_locations_;
+
// Set of all disabled tests in the current executable.
std::set<std::string> disabled_tests_;
« no previous file with comments | « base/test/launcher/test_launcher_nacl_nonsfi.cc ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698