Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/travis/build_autotools.sh
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | ../configure \ | ||||
--enable-ecmult-static-precomputation=$STATICPRECOMPUTATION \ | --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION \ | ||||
--with-ecmult-gen-precision=$ECMULTGENPRECISION \ | --with-ecmult-gen-precision=$ECMULTGENPRECISION \ | ||||
--enable-module-ecdh=$ECDH \ | --enable-module-ecdh=$ECDH \ | ||||
--enable-module-multiset=$MULTISET \ | --enable-module-multiset=$MULTISET \ | ||||
--enable-module-recovery=$RECOVERY \ | --enable-module-recovery=$RECOVERY \ | ||||
--enable-module-schnorr=$SCHNORR \ | --enable-module-schnorr=$SCHNORR \ | ||||
--enable-jni=$JNI \ | --enable-jni=$JNI \ | ||||
--enable-openssl-tests=$OPENSSL_TESTS \ | --enable-openssl-tests=$OPENSSL_TESTS \ | ||||
--with-valgrind=$WITH_VALGRIND \ | |||||
$AUTOTOOLS_EXTRA_FLAGS \ | $AUTOTOOLS_EXTRA_FLAGS \ | ||||
$USE_HOST | $USE_HOST | ||||
print_logs() { | print_logs() { | ||||
cat tests.log || : | cat tests.log || : | ||||
cat exhaustive_tests.log || : | cat exhaustive_tests.log || : | ||||
cat valgrind_ctime_test.log || : | cat valgrind_ctime_test.log || : | ||||
cat bench.log || : | cat bench.log || : | ||||
} | } | ||||
trap 'print_logs' ERR | trap 'print_logs' ERR | ||||
make -j2 $AUTOTOOLS_TARGET | make -j2 $AUTOTOOLS_TARGET | ||||
if [ "$VALGRIND" = "yes" ]; then | if [ "$RUN_VALGRIND" = "yes" ]; then | ||||
# the `--error-exitcode` is required to make the test fail if valgrind found | # the `--error-exitcode` is required to make the test fail if valgrind found | ||||
# errors, otherwise it'll return 0 | # errors, otherwise it'll return 0 | ||||
# (http://valgrind.org/docs/manual/manual-core.html) | # (http://valgrind.org/docs/manual/manual-core.html) | ||||
valgrind --error-exitcode=42 ./tests 16 | valgrind --error-exitcode=42 ./tests 16 | ||||
valgrind --error-exitcode=42 ./exhaustive_tests | valgrind --error-exitcode=42 ./exhaustive_tests | ||||
fi | fi | ||||
if [ "$BENCH" = "yes" ]; then | if [ "$BENCH" = "yes" ]; then | ||||
if [ "$VALGRIND" = "yes" ]; then | if [ "$RUN_VALGRIND" = "yes" ]; then | ||||
# Using the local `libtool` because on macOS the system's libtool has | # Using the local `libtool` because on macOS the system's libtool has | ||||
# nothing to do with GNU libtool | # nothing to do with GNU libtool | ||||
EXEC='./libtool --mode=execute valgrind --error-exitcode=42'; | EXEC='./libtool --mode=execute valgrind --error-exitcode=42'; | ||||
else | else | ||||
EXEC= ; | EXEC= ; | ||||
fi | fi | ||||
$EXEC ./bench_ecmult >> bench.log 2>&1 | $EXEC ./bench_ecmult >> bench.log 2>&1 | ||||
$EXEC ./bench_internal >> bench.log 2>&1 | $EXEC ./bench_internal >> bench.log 2>&1 | ||||
Show All 17 Lines |