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

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

Issue 61743008: GTTF: Fix incomplete snippet for failing/crashing tests. (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 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_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 1d0c8fe6e6755dbfdb5aa8387ef78e427eb3c4ec..831502fccf64d1dd707a476a5621263fb2de1306 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -755,7 +755,10 @@ std::string GetTestOutputSnippet(const TestResult& result,
size_t end_pos = full_output.find(std::string("[ FAILED ] ") +
result.full_name,
run_pos);
- if (end_pos == std::string::npos) {
+ // Only clip the snippet to the "OK" message if the test really
+ // succeeded. It still might have e.g. crashed after printing it.
+ if (end_pos == std::string::npos &&
+ result.status == TestResult::TEST_SUCCESS) {
end_pos = full_output.find(std::string("[ OK ] ") +
result.full_name,
run_pos);
« 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