Skip to content

Commit

Permalink
Merge dashpay#851: make test count iteration configurable by environm…
Browse files Browse the repository at this point in the history
…ent 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
  • Loading branch information
jonasnick committed Dec 1, 2020
2 parents 3a10696 + f4fa8d2 commit 8f0c6f1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -5626,6 +5626,15 @@ int main(int argc, char **argv) {
/* find iteration count */
if (argc > 1) {
count = strtol(argv[1], NULL, 0);
} else {
const char* env = getenv("SECP256K1_TEST_ITERS");
if (env) {
count = strtol(env, NULL, 0);
}
}
if (count <= 0) {
fputs("An iteration count of 0 or less is not allowed.\n", stderr);
return EXIT_FAILURE;
}
printf("test count = %i\n", count);

Expand Down

0 comments on commit 8f0c6f1

Please sign in to comment.