From 98812c5d2fc5b8ce0bc7b6ced6c452aa743eb7ce Mon Sep 17 00:00:00 2001 From: Elichai Turkel Date: Wed, 4 Mar 2020 16:35:31 +0200 Subject: [PATCH] Add running benchmarks regularly and under valgrind in travis --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ff4a6d2bc9..af27a8c9c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ compiler: - gcc env: global: - - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ECMULTGENPRECISION=auto ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no CTIMETEST=yes + - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ECMULTGENPRECISION=auto ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no CTIMETEST=yes ITERS=1 matrix: - SCALAR=32bit RECOVERY=yes - SCALAR=32bit FIELD=32bit ECDH=yes EXPERIMENTAL=yes @@ -94,6 +94,12 @@ script: travis_wait 30 valgrind --error-exitcode=42 ./tests 16 && travis_wait 30 valgrind --error-exitcode=42 ./exhaustive_tests; fi + - if [ -n "$BENCH" ]; then + if [ -n "$VALGRIND" ]; then EXEC='libtool --mode=execute valgrind --error-exitcode=42'; else EXEC= ; fi; + $EXEC ./bench_ecmult &>> bench.log && $EXEC ./bench_internal &>> bench.log && $EXEC ./bench_sign &>> bench.log && $EXEC ./bench_verify &>> bench.log; + if [ "$RECOVERY" == "yes" ]; then $EXEC ./bench_recover &>> bench.log; fi; + if [ "$ECDH" == "yes" ]; then $EXEC ./bench_ecdh &>> bench.log; fi; + fi - if [ -n "$CTIMETEST" ]; then libtool --mode=execute valgrind ./valgrind_ctime_test &> valgrind_ctime_test.log; fi @@ -102,3 +108,4 @@ after_script: - cat ./tests.log - cat ./exhaustive_tests.log - cat ./valgrind_ctime_test.log + - cat ./bench.log