Skip to content

Commit 02dcea1

Browse files
ci: Make test iterations configurable and tweak for sanitizer builds
1 parent 489ff5c commit 02dcea1

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.cirrus.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ env:
1313
EXPERIMENTAL: no
1414
CTIMETEST: yes
1515
BENCH: yes
16-
ITERS: 2
16+
TEST_ITERS:
17+
BENCH_ITERS: 2
1718
MAKEFLAGS: -j2
1819

1920
cat_logs_snippet: &CAT_LOGS
@@ -162,6 +163,7 @@ task:
162163
memory: 1G
163164
env:
164165
WRAPPER_CMD: qemu-s390x
166+
TEST_ITERS: 16
165167
HOST: s390x-linux-gnu
166168
WITH_VALGRIND: no
167169
ECDH: yes
@@ -184,6 +186,7 @@ task:
184186
memory: 1G
185187
env:
186188
WRAPPER_CMD: qemu-arm
189+
TEST_ITERS: 16
187190
HOST: arm-linux-gnueabihf
188191
WITH_VALGRIND: no
189192
ECDH: yes
@@ -207,6 +210,7 @@ task:
207210
memory: 1G
208211
env:
209212
WRAPPER_CMD: qemu-aarch64
213+
TEST_ITERS: 16
210214
HOST: aarch64-linux-gnu
211215
WITH_VALGRIND: no
212216
ECDH: yes
@@ -227,6 +231,7 @@ task:
227231
memory: 1G
228232
env:
229233
WRAPPER_CMD: wine64-stable
234+
TEST_ITERS: 16
230235
HOST: x86_64-w64-mingw32
231236
WITH_VALGRIND: no
232237
ECDH: yes
@@ -257,13 +262,15 @@ task:
257262
env:
258263
# The `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (https://www.valgrind.org/docs/manual/manual-core.html)
259264
WRAPPER_CMD: "valgrind --error-exitcode=42"
265+
TEST_ITERS: 16
260266
- name: "UBSan, ASan, LSan"
261267
env:
262268
CFLAGS: "-fsanitize=undefined,address"
263269
CFLAGS_FOR_BUILD: "-fsanitize=undefined,address"
264270
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
265271
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
266272
LSAN_OPTIONS: "use_unaligned=1"
273+
TEST_ITERS: 32
267274
# Try to cover many configurations with just a tiny matrix.
268275
matrix:
269276
- env:

ci/cirrus.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ file .libs/* || true
3232
# This tells `make check` to wrap test invocations.
3333
export LOG_COMPILER="$WRAPPER_CMD"
3434

35+
# This limits the iterations in the tests and benchmarks.
36+
export SECP256K1_TEST_ITERS="$TEST_ITERS"
37+
export SECP256K1_BENCH_ITERS="$BENCH_ITERS"
38+
3539
make "$BUILD"
3640

3741
if [ "$BENCH" = "yes" ]
@@ -42,8 +46,6 @@ then
4246
then
4347
EXEC="$EXEC $WRAPPER_CMD"
4448
fi
45-
# This limits the iterations in the benchmarks below to ITER iterations.
46-
export SECP256K1_BENCH_ITERS="$ITERS"
4749
{
4850
$EXEC ./bench_ecmult
4951
$EXEC ./bench_internal

0 commit comments

Comments
 (0)