Skip to content

Commit 8f0c6f1

Browse files
committed
Merge #851: make test count iteration configurable by environment variable
f4fa8d2 forbid a test iteration of 0 or less (Andrew Poelstra) 0ce4554 make test count iteration configurable by environment variable (Andrew Poelstra) Pull request description: ACKs for top commit: jonasnick: ACK f4fa8d2 real-or-random: ACK f4fa8d2 Tree-SHA512: 087771402c8e9536c07446baa7d02da5104d2b691f40c1dd04737329534422d895d3b692f485990d5791af8ccc124305b4f8b19be75e27b6b04cfb2337b28beb
2 parents 3a10696 + f4fa8d2 commit 8f0c6f1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/tests.c

+9
Original file line numberDiff line numberDiff line change
@@ -5626,6 +5626,15 @@ int main(int argc, char **argv) {
56265626
/* find iteration count */
56275627
if (argc > 1) {
56285628
count = strtol(argv[1], NULL, 0);
5629+
} else {
5630+
const char* env = getenv("SECP256K1_TEST_ITERS");
5631+
if (env) {
5632+
count = strtol(env, NULL, 0);
5633+
}
5634+
}
5635+
if (count <= 0) {
5636+
fputs("An iteration count of 0 or less is not allowed.\n", stderr);
5637+
return EXIT_FAILURE;
56295638
}
56305639
printf("test count = %i\n", count);
56315640

0 commit comments

Comments
 (0)