Skip to content

Commit b96288b

Browse files
jonasnickFabcien
authored andcommitted
[SECP256K1] travis: Explicitly set --with-valgrind
Summary: ``` Also remove CPPFLAGS=-DVALGRIND because that's redundant with when configured with --enable-valgrind. ``` Backport of secp256k1 [[bitcoin-core/secp256k1#821 | PR821]]. Test Plan: Run the Travis build. https://travis-ci.org/github/Fabcien/secp256k1/builds/731225830 Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7633
1 parent 7516ca1 commit b96288b

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.travis.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ env:
4444
- CMAKE_TARGET=check-secp256k1
4545
- AUTOTOOLS_EXTRA_FLAGS=
4646
- CMAKE_EXTRA_FLAGS=
47+
- WITH_VALGRIND=yes
48+
- RUN_VALGRIND=no
4749
- HOST=
4850
- ECDH=no
4951
- RECOVERY=no
@@ -68,20 +70,20 @@ env:
6870
- BIGNUM=no
6971
- BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes MULTISET=yes
7072
- BIGNUM=no STATICPRECOMPUTATION=no
71-
- AUTOTOOLS_TARGET=distcheck CMAKE_TARGET=install CTIMETEST=no BENCH=no
73+
- AUTOTOOLS_TARGET=distcheck CMAKE_TARGET=install WITH_VALGRIND=no CTIMETEST=no BENCH=no
7274
- AUTOTOOLS_EXTRA_FLAGS=CPPFLAGS=-DDETERMINISTIC CMAKE_EXTRA_FLAGS=-DCMAKE_C_FLAGS=-DDETERMINISTIC
7375
- AUTOTOOLS_EXTRA_FLAGS=CFLAGS=-O0 CMAKE_EXTRA_FLAGS=-DCMAKE_BUILD_TYPE=Debug CTIMETEST=no
74-
- AUTOTOOLS_TARGET=check-java CMAKE_TARGET=check-secp256k1-java JNI=yes ECDH=yes EXPERIMENTAL=yes CTIMETEST=no BENCH=no
76+
- AUTOTOOLS_TARGET=check-java CMAKE_TARGET=check-secp256k1-java JNI=yes ECDH=yes EXPERIMENTAL=yes WITH_VALGRIND=no CTIMETEST=no BENCH=no
7577
- ECMULTGENPRECISION=2
7678
- ECMULTGENPRECISION=8
77-
- VALGRIND=yes
79+
- RUN_VALGRIND=yes
7880
BIGNUM=no ENDOMORPHISM=yes ASM=x86_64 EXPERIMENTAL=yes ECDH=yes RECOVERY=yes OPENSSL_TESTS=no MULTISET=yes
79-
AUTOTOOLS_EXTRA_FLAGS=CPPFLAGS=-DVALGRIND AUTOTOOLS_TARGET=
81+
AUTOTOOLS_TARGET=
8082
CMAKE_EXTRA_FLAGS=-DCMAKE_C_FLAGS=-DVALGRIND CMAKE_TARGET="secp256k1-tests secp256k1-exhaustive_tests"
8183
# The same as above but without endomorphism.
82-
- VALGRIND=yes
84+
- RUN_VALGRIND=yes
8385
BIGNUM=no ASM=x86_64 EXPERIMENTAL=yes ECDH=yes RECOVERY=yes OPENSSL_TESTS=no MULTISET=yes
84-
AUTOTOOLS_EXTRA_FLAGS=CPPFLAGS=-DVALGRIND AUTOTOOLS_TARGET=
86+
AUTOTOOLS_TARGET=
8587
CMAKE_EXTRA_FLAGS=-DCMAKE_C_FLAGS=-DVALGRIND CMAKE_TARGET="secp256k1-tests secp256k1-exhaustive_tests"
8688
- SCHNORR=no
8789
jobs:
@@ -111,6 +113,7 @@ jobs:
111113
- libgmp-dev
112114
- libtool-bin
113115
- ninja-build
116+
- valgrind
114117

115118
before_script:
116119
# This limits the iterations in the benchmarks below to ITER iterations.

travis/build_autotools.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ pushd buildautotools
4848
--enable-module-schnorr=$SCHNORR \
4949
--enable-jni=$JNI \
5050
--enable-openssl-tests=$OPENSSL_TESTS \
51+
--with-valgrind=$WITH_VALGRIND \
5152
$AUTOTOOLS_EXTRA_FLAGS \
5253
$USE_HOST
5354

@@ -61,7 +62,7 @@ trap 'print_logs' ERR
6162

6263
make -j2 $AUTOTOOLS_TARGET
6364

64-
if [ "$VALGRIND" = "yes" ]; then
65+
if [ "$RUN_VALGRIND" = "yes" ]; then
6566
# the `--error-exitcode` is required to make the test fail if valgrind found
6667
# errors, otherwise it'll return 0
6768
# (http://valgrind.org/docs/manual/manual-core.html)
@@ -70,7 +71,7 @@ if [ "$VALGRIND" = "yes" ]; then
7071
fi
7172

7273
if [ "$BENCH" = "yes" ]; then
73-
if [ "$VALGRIND" = "yes" ]; then
74+
if [ "$RUN_VALGRIND" = "yes" ]; then
7475
# Using the local `libtool` because on macOS the system's libtool has
7576
# nothing to do with GNU libtool
7677
EXEC='./libtool --mode=execute valgrind --error-exitcode=42';

travis/build_cmake.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ${CMAKE_COMMAND} -GNinja .. \
4949

5050
ninja $CMAKE_TARGET
5151

52-
if [ "$VALGRIND" = "yes" ]; then
52+
if [ "$RUN_VALGRIND" = "yes" ]; then
5353
# the `--error-exitcode` is required to make the test fail if valgrind found
5454
# errors, otherwise it'll return 0
5555
# (http://valgrind.org/docs/manual/manual-core.html)

0 commit comments

Comments
 (0)