external/boringssl: Sync to 54c259dec395bd991cce5691723214ffe588e51d.

This includes the following changes:

https://boringssl.googlesource.com/boringssl/+log/8459d0659920ab8c99bd300b8a989d4cda251118..54c259dec395bd991cce5691723214ffe588e51d

Test: BoringSSL CTS Presubmits.
Change-Id: I1868f252e94e424d450ebd8983549d9b13455613
diff --git a/src/crypto/test/file_test_gtest.cc b/src/crypto/test/file_test_gtest.cc
index cffacb3..bfa8d27 100644
--- a/src/crypto/test/file_test_gtest.cc
+++ b/src/crypto/test/file_test_gtest.cc
@@ -81,10 +81,27 @@
         break;
     }
 
+    const testing::TestResult *test_result =
+        testing::UnitTest::GetInstance()->current_test_info()->result();
+    int before_part_count = test_result->total_part_count();
+
     SCOPED_TRACE(testing::Message() << path << ", line " << t.start_line());
     run_test(&t);
 
-    // Clean up the error queue for the next test.
-    ERR_clear_error();
+    // Check for failures from the most recent test.
+    bool failed = false;
+    for (int i = before_part_count; i < test_result->total_part_count(); i++) {
+      if (test_result->GetTestPartResult(i).failed()) {
+        failed = true;
+        break;
+      }
+    }
+
+    // Clean up the error queue for the next test, reporting it on failure.
+    if (failed) {
+      ERR_print_errors_fp(stdout);
+    } else {
+      ERR_clear_error();
+    }
   }
 }