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

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

Issue 2502953002: Report test locations in the test launcher json summary. (Closed)
Patch Set: Fix review issue. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_results_tracker.cc
diff --git a/base/test/launcher/test_results_tracker.cc b/base/test/launcher/test_results_tracker.cc
index f36907eefc521b63e1749aa975c6d85efe3375af..01d222edb78a0da59e5e34dd2e512d6a0284f6ad 100644
--- a/base/test/launcher/test_results_tracker.cc
+++ b/base/test/launcher/test_results_tracker.cc
@@ -382,6 +382,18 @@ bool TestResultsTracker::SaveSummaryAsJSON(
}
summary_root->Set("per_iteration_data", std::move(per_iteration_data));
+ std::unique_ptr<DictionaryValue> test_locations(new DictionaryValue);
+ for (const auto& item : test_locations_) {
+ std::string test_name = item.first;
+ CodeLocation location = item.second;
+ std::unique_ptr<DictionaryValue> location_value(new DictionaryValue);
+ location_value->SetString("file", location.file);
+ location_value->SetInteger("line", location.line);
+ test_locations->SetWithoutPathExpansion(test_name,
+ std::move(location_value));
+ }
+ summary_root->Set("test_locations", std::move(test_locations));
+
JSONFileValueSerializer serializer(path);
return serializer.Serialize(*summary_root);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698