[SECP256K1] Fix issue where travis does not show the logs
Summary:
I noticed that according to the doc tests.log should contain stdout as well as stderr. But it doesn't because stdout isn't flushed. I removed buffering completely to avoid having to call fflush twice.
Backport of secp256k1 PR685.
Depends on D5433.
It slightly varies from the PR by only printing the logs in the event of
a failure.
There is no need to explicitly cat the logs with the cmake build because
they are already printed by the test runner in case of failure.
Before: https://travis-ci.org/Fabcien/secp256k1/jobs/658610743
After: https://travis-ci.org/Fabcien/secp256k1/jobs/658631083
Test Plan:
Run the Travis build (see
https://travis-ci.org/Fabcien/secp256k1/builds/658633612).
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D5434