Skip to content

Commit

Permalink
Make travis show the ./tests seed by removing stdout buffering and al…
Browse files Browse the repository at this point in the history
…ways cat tests.log after a travis run.
  • Loading branch information
jonasnick committed Nov 25, 2019
1 parent 22a6031 commit fb424fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ matrix:
apt:
packages:
- valgrind

before_install: mkdir -p `dirname $GUAVA_JAR`
install: if [ ! -f $GUAVA_JAR ]; then wget $GUAVA_URL -O $GUAVA_JAR; fi
before_script: ./autogen.sh
Expand All @@ -93,4 +93,8 @@ script:
make -j2 &&
travis_wait 30 valgrind --error-exitcode=42 ./tests 16 &&
travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests;
fi
fi

after_script:
- cat ./tests.log
- cat ./exhaustive_tests.log
6 changes: 6 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -5169,6 +5169,12 @@ void run_ecdsa_openssl(void) {
int main(int argc, char **argv) {
unsigned char seed16[16] = {0};
unsigned char run32[32] = {0};

/* Disable buffering for stdout to improve reliability of getting
* diagnostic information. Happens right at the start of main because
* setbuf must be used before any other operation on the stream. */
setbuf(stdout, NULL);

/* find iteration count */
if (argc > 1) {
count = strtol(argv[1], NULL, 0);
Expand Down

0 comments on commit fb424fb

Please sign in to comment.