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); |