|
@@ -40,7 +40,7 @@ quick_tests='dep misc obj color unit hash ref altref alts xmr eth autosign btc b
|
|
|
qskip_tests='btc_tn bch bch_rt ltc ltc_rt'
|
|
|
|
|
|
PROGNAME=$(basename $0)
|
|
|
-while getopts hAbCfFi:I:lNOps:tvV OPT
|
|
|
+while getopts hAbCDfFi:I:lNOps:tvV OPT
|
|
|
do
|
|
|
case "$OPT" in
|
|
|
h) printf " %-16s Test MMGen release\n" "${PROGNAME}:"
|
|
@@ -49,6 +49,7 @@ do
|
|
|
echo " -A Skip tests requiring altcoin modules or daemons"
|
|
|
echo " -b Buffer keypresses for all invocations of 'test/test.py'"
|
|
|
echo " -C Run tests in coverage mode"
|
|
|
+ echo " -D Run tests in deterministic mode"
|
|
|
echo " -f Speed up the tests by using fewer rounds"
|
|
|
echo " -F Reduce rounds even further"
|
|
|
echo " -i BRANCH Create and install Python package from cloned BRANCH, then"
|
|
@@ -114,6 +115,8 @@ do
|
|
|
gentest_py="$python $gentest_py"
|
|
|
mmgen_tool="$python $mmgen_tool"
|
|
|
mmgen_keygen="$python $mmgen_keygen" ;&
|
|
|
+ D) export MMGEN_TEST_SUITE_DETERMINISTIC=1
|
|
|
+ export MMGEN_DISABLE_COLOR=1 ;;
|
|
|
f) FAST=1 rounds=10 rounds_min=3 rounds_mid=25 rounds_max=50 unit_tests_py+=" --fast" ;;
|
|
|
F) FAST=1 rounds=3 rounds_min=1 rounds_mid=3 rounds_max=5 unit_tests_py+=" --fast" ;;
|
|
|
i) INSTALL=$OPTARG ;;
|
|
@@ -595,5 +598,9 @@ elapsed=$(($(date +%s)-start_time))
|
|
|
elapsed_fmt=$(printf %02d:%02d $((elapsed/60)) $((elapsed%60)))
|
|
|
|
|
|
[ "$LIST_CMDS" ] || {
|
|
|
- echo -e "${GREEN}All OK. Total elapsed time: $elapsed_fmt$RESET"
|
|
|
+ if [ "$MMGEN_TEST_SUITE_DETERMINISTIC" ]; then
|
|
|
+ echo -e "${GREEN}All OK"
|
|
|
+ else
|
|
|
+ echo -e "${GREEN}All OK. Total elapsed time: $elapsed_fmt$RESET"
|
|
|
+ fi
|
|
|
}
|