From: Nick Bowler Date: Sat, 27 Jan 2024 01:52:25 +0000 (-0500) Subject: tests: Limit automatic random seed to 8 digits. X-Git-Tag: v1.3~22 X-Git-Url: https://git.draconx.ca/gitweb/cdecl99.git/commitdiff_plain/e3a2c5e9b1e130433a201b7ecd1dd78bdbe8ca2e?hp=bf336dc52970daa394d119b11284a1b5016a74c0 tests: Limit automatic random seed to 8 digits. In the event that the test_strtoumax can only convert 32-bit types for whatever reason, attempting to pass values >= 2**32 spits an error. We don't need this kind of excess range for the automatic random seed. Just truncate it to 8 digits which will always fit in 32 bits. --- diff --git a/testsuite.at b/testsuite.at index 328f427..f47ad86 100644 --- a/testsuite.at +++ b/testsuite.at @@ -30,7 +30,8 @@ m4_divert_pop([PREPARE_TESTS]) AT_ARG_OPTION_ARG([random-seed], [AS_HELP_STRING([--random-seed=ARG], [Integer seed for randomized testing (default: auto)])], - [random_seed=$at_optarg], [random_seed=$RANDOM$$]) + [random_seed=$at_optarg], + [random_seed=`echo $RANDOM$$ | sed 's/\(........\).*/\1/'`])#' AT_ARG_OPTION_ARG([random-iterations], [AS_HELP_STRING([--random-iterations=N],