2017-09-19 22:14:00 +03:00
|
|
|
#!/bin/bash
|
2019-05-25 15:04:13 +00:00
|
|
|
# Tested on Linux, Armbian, Raspbian, MSYS2
|
2017-09-19 22:14:00 +03:00
|
|
|
|
2019-05-20 15:44:30 +00:00
|
|
|
REFDIR='test/ref'
|
2019-05-25 15:04:13 +00:00
|
|
|
SUDO='sudo'
|
|
|
|
|
|
|
|
|
|
if [ "$(uname -m)" == 'armv7l' ]; then
|
|
|
|
|
ARM32=1
|
|
|
|
|
elif uname -a | grep -q 'MSYS'; then
|
2019-05-20 15:44:30 +00:00
|
|
|
SUDO='' MSYS2=1;
|
|
|
|
|
fi
|
2019-05-25 15:04:13 +00:00
|
|
|
|
2019-02-19 14:53:21 +00:00
|
|
|
trap 'echo -e "${GREEN}Exiting at user request$RESET"; exit' INT
|
|
|
|
|
|
2019-02-10 19:26:22 +00:00
|
|
|
umask 0022
|
|
|
|
|
|
2017-12-28 21:40:06 +03:00
|
|
|
export MMGEN_TEST_SUITE=1
|
|
|
|
|
export MMGEN_NO_LICENSE=1
|
|
|
|
|
export PYTHONPATH=.
|
2021-10-02 17:54:11 +00:00
|
|
|
|
2018-10-24 14:05:04 +00:00
|
|
|
test_py='test/test.py -n'
|
2018-02-24 14:39:49 +03:00
|
|
|
objtest_py='test/objtest.py'
|
2019-10-19 15:22:30 +00:00
|
|
|
objattrtest_py='test/objattrtest.py'
|
2019-10-23 10:44:17 +00:00
|
|
|
colortest_py='test/colortest.py'
|
2019-03-19 10:44:37 +00:00
|
|
|
unit_tests_py='test/unit_tests.py --names --quiet'
|
2018-02-24 14:39:49 +03:00
|
|
|
tooltest_py='test/tooltest.py'
|
2019-11-01 12:24:09 +00:00
|
|
|
tooltest2_py='test/tooltest2.py --names --quiet'
|
|
|
|
|
gentest_py='test/gentest.py --quiet'
|
2018-02-24 14:39:49 +03:00
|
|
|
scrambletest_py='test/scrambletest.py'
|
2019-11-06 17:34:52 +00:00
|
|
|
altcoin_py='mmgen/altcoin.py --quiet'
|
2018-02-24 14:39:49 +03:00
|
|
|
mmgen_tool='cmds/mmgen-tool'
|
|
|
|
|
mmgen_keygen='cmds/mmgen-keygen'
|
2018-10-31 16:37:34 +00:00
|
|
|
python='python3'
|
2019-03-23 14:21:34 +00:00
|
|
|
rounds=100 rounds_min=20 rounds_mid=250 rounds_max=500
|
2017-12-28 21:40:06 +03:00
|
|
|
|
2021-09-24 20:07:06 +00:00
|
|
|
dfl_tests='dep misc obj color unit hash ref altref alts xmr eth autosign btc btc_tn btc_rt bch bch_rt ltc ltc_rt tool tool2 gen'
|
2021-10-13 20:44:43 +00:00
|
|
|
extra_tests='dep autosign_btc autosign_live ltc_tn bch_tn'
|
2021-09-24 20:07:06 +00:00
|
|
|
noalt_tests='dep misc obj color unit hash ref autosign_btc btc btc_tn btc_rt tool tool2 gen'
|
|
|
|
|
quick_tests='dep misc obj color unit hash ref altref alts xmr eth autosign btc btc_rt tool tool2 gen'
|
2020-02-18 20:28:28 +00:00
|
|
|
qskip_tests='btc_tn bch bch_rt ltc ltc_rt'
|
2019-02-10 19:26:22 +00:00
|
|
|
|
2017-09-26 15:41:11 +03:00
|
|
|
PROGNAME=$(basename $0)
|
2021-10-03 17:40:03 +00:00
|
|
|
while getopts hAbCDfFi:I:lNOps:tvV OPT
|
2017-09-26 15:41:11 +03:00
|
|
|
do
|
|
|
|
|
case "$OPT" in
|
2017-10-28 00:11:00 +03:00
|
|
|
h) printf " %-16s Test MMGen release\n" "${PROGNAME}:"
|
2020-02-18 14:07:51 +00:00
|
|
|
echo " USAGE: $PROGNAME [options] [tests or test group]"
|
2021-10-02 17:54:11 +00:00
|
|
|
echo " OPTIONS: -h Print this help message"
|
|
|
|
|
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"
|
2021-10-03 17:40:03 +00:00
|
|
|
echo " -D Run tests in deterministic mode"
|
2021-10-02 17:54:11 +00:00
|
|
|
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"
|
|
|
|
|
echo " run tests in installed package"
|
|
|
|
|
echo " -I BRANCH Like '-i', but install the package without running the tests"
|
|
|
|
|
echo " -l List the test name symbols"
|
|
|
|
|
echo " -N Pass the --no-timings switch to test/test.py"
|
|
|
|
|
echo " -O Use pexpect.spawn rather than popen_spawn where applicable"
|
|
|
|
|
echo " -p Pause between tests"
|
2021-10-02 17:54:12 +00:00
|
|
|
echo " -s LIST Skip tests in LIST (space-separated)"
|
2021-10-02 17:54:11 +00:00
|
|
|
echo " -t Print the tests without running them"
|
|
|
|
|
echo " -v Run test/test.py with '--exact-output' and other commands"
|
|
|
|
|
echo " with '--verbose' switch"
|
|
|
|
|
echo " -V Run test/test.py and other commands with '--verbose' switch"
|
2020-02-18 14:07:51 +00:00
|
|
|
echo
|
2017-09-26 15:41:11 +03:00
|
|
|
echo " AVAILABLE TESTS:"
|
2018-05-12 15:52:35 +00:00
|
|
|
echo " obj - data objects"
|
2019-10-23 10:44:17 +00:00
|
|
|
echo " color - color handling"
|
2019-03-19 10:44:37 +00:00
|
|
|
echo " unit - unit tests"
|
2019-03-23 14:21:34 +00:00
|
|
|
echo " hash - internal hash function implementations"
|
2020-02-18 20:28:28 +00:00
|
|
|
echo " ref - reference file checks"
|
|
|
|
|
echo " altref - altcoin reference file checks"
|
2018-05-12 15:52:35 +00:00
|
|
|
echo " alts - operations for all supported gen-only altcoins"
|
2021-05-14 11:26:33 +00:00
|
|
|
echo " xmr - Monero xmrwallet operations"
|
2021-10-13 20:44:43 +00:00
|
|
|
echo " eth - operations for Ethereum and Ethereum Classic"
|
2018-05-12 15:52:35 +00:00
|
|
|
echo " autosign - autosign"
|
|
|
|
|
echo " btc - bitcoin"
|
|
|
|
|
echo " btc_tn - bitcoin testnet"
|
|
|
|
|
echo " btc_rt - bitcoin regtest"
|
|
|
|
|
echo " bch - bitcoin cash (BCH)"
|
2019-11-29 18:36:13 +00:00
|
|
|
echo " bch_tn - bitcoin cash (BCH) testnet"
|
2018-05-12 15:52:35 +00:00
|
|
|
echo " bch_rt - bitcoin cash (BCH) regtest"
|
|
|
|
|
echo " ltc - litecoin"
|
|
|
|
|
echo " ltc_tn - litecoin testnet"
|
|
|
|
|
echo " ltc_rt - litecoin regtest"
|
|
|
|
|
echo " tool - tooltest (all supported coins)"
|
2019-02-22 20:23:06 +00:00
|
|
|
echo " tool2 - tooltest2 (all supported coins)"
|
2018-05-12 15:52:35 +00:00
|
|
|
echo " gen - gentest (all supported coins)"
|
2019-11-06 17:34:52 +00:00
|
|
|
echo " misc - miscellaneous tests that don't fit in the above categories"
|
2020-02-18 14:07:51 +00:00
|
|
|
echo
|
|
|
|
|
echo " AVAILABLE TEST GROUPS:"
|
2020-02-18 20:28:28 +00:00
|
|
|
echo " default - All tests minus the extra tests"
|
|
|
|
|
echo " extra - All tests minus the default tests"
|
|
|
|
|
echo " noalt - BTC-only tests"
|
|
|
|
|
echo " quick - Default tests minus btc_tn, bch, bch_rt, ltc and ltc_rt"
|
|
|
|
|
echo " qskip - The tests skipped in the 'quick' test group"
|
2020-02-18 14:07:51 +00:00
|
|
|
echo
|
2017-09-26 15:41:11 +03:00
|
|
|
echo " By default, all tests are run"
|
|
|
|
|
exit ;;
|
2020-06-03 12:47:55 +00:00
|
|
|
A) SKIP_ALT_DEP=1 unit_tests_py+=" --no-altcoin-deps" ;;
|
2019-02-10 19:26:22 +00:00
|
|
|
b) test_py+=" --buf-keypress" ;;
|
2018-02-26 17:01:20 +00:00
|
|
|
C) mkdir -p 'test/trace'
|
|
|
|
|
touch 'test/trace.acc'
|
2018-10-31 18:20:59 +00:00
|
|
|
test_py+=" --coverage"
|
|
|
|
|
tooltest_py+=" --coverage"
|
2019-02-19 14:53:21 +00:00
|
|
|
tooltest2_py+=" --fork --coverage"
|
2018-10-31 18:20:59 +00:00
|
|
|
scrambletest_py+=" --coverage"
|
2018-10-31 16:37:34 +00:00
|
|
|
python="python3 -m trace --count --file=test/trace.acc --coverdir=test/trace"
|
2019-03-19 10:44:37 +00:00
|
|
|
unit_tests_py="$python $unit_tests_py"
|
2018-02-24 14:39:49 +03:00
|
|
|
objtest_py="$python $objtest_py"
|
2019-10-19 15:22:30 +00:00
|
|
|
objattrtest_py="$python $objattrtest_py"
|
2018-02-24 14:39:49 +03:00
|
|
|
gentest_py="$python $gentest_py"
|
|
|
|
|
mmgen_tool="$python $mmgen_tool"
|
2019-02-28 10:57:35 +00:00
|
|
|
mmgen_keygen="$python $mmgen_keygen" ;&
|
2021-10-03 17:40:03 +00:00
|
|
|
D) export MMGEN_TEST_SUITE_DETERMINISTIC=1
|
|
|
|
|
export MMGEN_DISABLE_COLOR=1 ;;
|
2021-05-14 11:26:33 +00:00
|
|
|
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" ;;
|
2020-02-18 20:28:28 +00:00
|
|
|
i) INSTALL=$OPTARG ;;
|
|
|
|
|
I) INSTALL=$OPTARG INSTALL_ONLY=1 ;;
|
2019-02-10 19:26:22 +00:00
|
|
|
l) echo -e "Default tests:\n $dfl_tests"
|
2020-02-18 20:28:28 +00:00
|
|
|
echo -e "Extra tests:\n $extra_tests"
|
|
|
|
|
echo -e "'noalt' test group:\n $noalt_tests"
|
|
|
|
|
echo -e "'quick' test group:\n $quick_tests"
|
|
|
|
|
echo -e "'qskip' test group:\n $qskip_tests"
|
2019-02-10 19:26:22 +00:00
|
|
|
exit ;;
|
2021-09-29 21:17:56 +00:00
|
|
|
N) test_py+=" --no-timings" ;;
|
2019-02-28 10:57:35 +00:00
|
|
|
O) test_py+=" --pexpect-spawn" ;;
|
|
|
|
|
p) PAUSE=1 ;;
|
2021-10-02 17:54:12 +00:00
|
|
|
s) SKIP_LIST="$OPTARG" ;;
|
2019-12-07 12:20:21 +00:00
|
|
|
t) LIST_CMDS=1 ;;
|
2018-10-31 18:20:59 +00:00
|
|
|
v) EXACT_OUTPUT=1 test_py+=" --exact-output" ;&
|
2021-03-18 12:35:51 +00:00
|
|
|
V) VERBOSE=1
|
|
|
|
|
[ "$EXACT_OUTPUT" ] || test_py+=" --verbose"
|
2019-03-19 10:44:37 +00:00
|
|
|
unit_tests_py="${unit_tests_py/--quiet/--verbose}"
|
2019-11-06 17:34:52 +00:00
|
|
|
altcoin_py="${altcoin_py/--quiet/--verbose}"
|
2019-11-01 12:24:09 +00:00
|
|
|
tooltest2_py="${tooltest2_py/--quiet/--verbose}"
|
|
|
|
|
gentest_py="${gentest_py/--quiet/--verbose}"
|
|
|
|
|
tooltest_py+=" --verbose"
|
|
|
|
|
mmgen_tool+=" --verbose"
|
2019-10-19 15:22:30 +00:00
|
|
|
objattrtest_py+=" --verbose"
|
2018-10-31 18:20:59 +00:00
|
|
|
scrambletest_py+=" --verbose" ;;
|
2017-09-26 15:41:11 +03:00
|
|
|
*) exit ;;
|
|
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
2021-10-02 17:54:11 +00:00
|
|
|
[ "$MMGEN_DISABLE_COLOR" ] || {
|
|
|
|
|
RED="\e[31;1m" GREEN="\e[32;1m" YELLOW="\e[33;1m" BLUE="\e[34;1m" MAGENTA="\e[35;1m" CYAN="\e[36;1m"
|
|
|
|
|
RESET="\e[0m"
|
|
|
|
|
}
|
|
|
|
|
|
2019-05-20 15:44:30 +00:00
|
|
|
[ "$MSYS2" -a ! "$FAST" ] && tooltest2_py+=' --fork'
|
2018-10-31 18:20:59 +00:00
|
|
|
[ "$EXACT_OUTPUT" -o "$VERBOSE" ] || objtest_py+=" -S"
|
|
|
|
|
|
2017-09-26 15:41:11 +03:00
|
|
|
shift $((OPTIND-1))
|
|
|
|
|
|
2020-02-18 20:28:28 +00:00
|
|
|
case $1 in
|
|
|
|
|
'') tests=$dfl_tests ;;
|
|
|
|
|
'default') tests=$dfl_tests ;;
|
|
|
|
|
'extra') tests=$extra_tests ;;
|
2020-06-03 12:47:55 +00:00
|
|
|
'noalt') tests=$noalt_tests SKIP_ALT_DEP=1 unit_tests_py+=" --no-altcoin-deps" ;;
|
2020-02-18 20:28:28 +00:00
|
|
|
'quick') tests=$quick_tests ;;
|
|
|
|
|
'qskip') tests=$qskip_tests ;;
|
|
|
|
|
*) tests="$*" ;;
|
|
|
|
|
esac
|
2020-02-18 14:07:51 +00:00
|
|
|
|
2019-02-28 10:57:35 +00:00
|
|
|
[ "$INSTALL" ] && {
|
2020-02-18 20:28:28 +00:00
|
|
|
BRANCH=$INSTALL
|
2018-01-21 19:18:00 +03:00
|
|
|
BRANCHES=$(git branch)
|
|
|
|
|
FOUND_BRANCH=$(for b in ${BRANCHES/\*}; do [ "$b" == "$BRANCH" ] && echo ok; done)
|
|
|
|
|
[ "$FOUND_BRANCH" ] || { echo "Branch '$BRANCH' not found!"; exit; }
|
|
|
|
|
}
|
2017-10-28 00:11:00 +03:00
|
|
|
|
2018-07-25 12:34:50 +00:00
|
|
|
set -e
|
|
|
|
|
|
2017-11-13 22:50:35 +03:00
|
|
|
check() {
|
2017-09-19 22:14:00 +03:00
|
|
|
[ "$BRANCH" ] || { echo 'No branch specified. Exiting'; exit; }
|
|
|
|
|
[ "$(git diff $BRANCH)" == "" ] || {
|
|
|
|
|
echo "Unmerged changes from branch '$BRANCH'. Exiting"
|
2021-09-03 20:17:24 +00:00
|
|
|
exit 1
|
2017-09-19 22:14:00 +03:00
|
|
|
}
|
2021-09-03 20:17:24 +00:00
|
|
|
git diff $BRANCH >/dev/null 2>&1 || exit 1
|
2017-09-19 22:14:00 +03:00
|
|
|
}
|
2019-02-28 10:38:52 +00:00
|
|
|
uninstall() {
|
|
|
|
|
set +e
|
|
|
|
|
eval "$SUDO ./scripts/uninstall-mmgen.py"
|
|
|
|
|
[ "$?" -ne 0 ] && { echo 'Uninstall failed, but proceeding anyway'; sleep 1; }
|
|
|
|
|
set -e
|
|
|
|
|
}
|
2017-11-13 22:50:35 +03:00
|
|
|
install() {
|
2017-09-19 22:14:00 +03:00
|
|
|
set -x
|
|
|
|
|
eval "$SUDO rm -rf .test-release"
|
|
|
|
|
git clone --branch $BRANCH --single-branch . .test-release
|
2019-02-28 10:38:52 +00:00
|
|
|
(
|
|
|
|
|
cd .test-release
|
|
|
|
|
./setup.py sdist
|
|
|
|
|
mkdir pydist && cd pydist
|
2019-05-20 15:44:30 +00:00
|
|
|
if [ "$MSYS2" ]; then unzip ../dist/mmgen-*.zip; else tar zxvf ../dist/mmgen-*gz; fi
|
2019-02-28 10:38:52 +00:00
|
|
|
cd mmgen-*
|
|
|
|
|
eval "$SUDO ./setup.py clean --all"
|
2019-05-20 15:44:30 +00:00
|
|
|
[ "$MSYS2" ] && ./setup.py build --compiler=mingw32
|
2019-02-28 10:38:52 +00:00
|
|
|
eval "$SUDO ./setup.py install --force"
|
|
|
|
|
)
|
|
|
|
|
set +x
|
2017-09-19 22:14:00 +03:00
|
|
|
}
|
2019-05-20 15:15:13 +00:00
|
|
|
|
2017-11-13 22:50:35 +03:00
|
|
|
do_test() {
|
2017-09-19 22:14:00 +03:00
|
|
|
set +x
|
2021-04-16 17:50:53 +00:00
|
|
|
tests="t_$1"
|
|
|
|
|
skips="t_$1_skip"
|
|
|
|
|
|
|
|
|
|
while read skip test; do
|
|
|
|
|
[ "$test" ] || continue
|
|
|
|
|
echo "${!skips}" | grep -q $skip && continue
|
|
|
|
|
|
2019-12-07 12:20:21 +00:00
|
|
|
if [ "$LIST_CMDS" ]; then
|
|
|
|
|
echo $test
|
|
|
|
|
else
|
2021-04-16 17:50:53 +00:00
|
|
|
test_disp=$YELLOW${test/\#/$RESET$MAGENTA\#}$RESET
|
|
|
|
|
if [ "${test:0:1}" == '#' ]; then
|
|
|
|
|
echo -e "$test_disp"
|
|
|
|
|
else
|
|
|
|
|
echo -e "${GREEN}Running:$RESET $test_disp"
|
|
|
|
|
eval "$test" || {
|
|
|
|
|
echo -e $RED"test-release.sh: test '$CUR_TEST' failed at command '$test'"$RESET
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
|
|
|
|
fi
|
2019-12-07 12:20:21 +00:00
|
|
|
fi
|
2021-04-16 17:50:53 +00:00
|
|
|
done <<<${!tests}
|
2017-09-19 22:14:00 +03:00
|
|
|
}
|
2019-05-20 15:15:13 +00:00
|
|
|
|
2019-11-06 17:34:52 +00:00
|
|
|
i_misc='Miscellaneous'
|
|
|
|
|
s_misc='Testing various subsystems'
|
|
|
|
|
t_misc="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $altcoin_py
|
2019-11-06 17:34:52 +00:00
|
|
|
"
|
2019-12-07 12:20:21 +00:00
|
|
|
f_misc='Miscellaneous tests completed'
|
2019-11-06 17:34:52 +00:00
|
|
|
|
2017-12-16 09:31:00 +03:00
|
|
|
i_obj='Data object'
|
2017-10-28 00:11:00 +03:00
|
|
|
s_obj='Testing data objects'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_obj="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $objtest_py --coin=btc
|
|
|
|
|
- $objtest_py --getobj --coin=btc
|
|
|
|
|
- $objtest_py --coin=btc --testnet=1
|
|
|
|
|
- $objtest_py --coin=ltc
|
|
|
|
|
- $objtest_py --coin=ltc --testnet=1
|
|
|
|
|
- $objtest_py --coin=eth
|
|
|
|
|
- $objattrtest_py
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-12-07 12:20:21 +00:00
|
|
|
f_obj='Data object tests completed'
|
2017-09-19 22:14:00 +03:00
|
|
|
|
2019-10-23 10:44:17 +00:00
|
|
|
i_color='Color'
|
2019-12-07 12:20:21 +00:00
|
|
|
s_color='Testing terminal colors'
|
2021-04-16 17:50:53 +00:00
|
|
|
t_color="- $colortest_py"
|
2019-12-07 12:20:21 +00:00
|
|
|
f_color='Terminal color tests completed'
|
2019-10-23 10:44:17 +00:00
|
|
|
|
2021-09-24 20:07:06 +00:00
|
|
|
i_dep='Dependency'
|
|
|
|
|
s_dep='Testing for installed dependencies'
|
2021-09-26 21:16:20 +00:00
|
|
|
t_dep="- $unit_tests_py testdep dep daemon.exec"
|
2021-09-24 20:07:06 +00:00
|
|
|
f_dep='Dependency tests completed'
|
|
|
|
|
|
2019-03-19 15:04:18 +00:00
|
|
|
i_unit='Unit'
|
2020-12-16 22:35:00 +03:00
|
|
|
s_unit='The bitcoin and bitcoin-bchn mainnet daemons must be running for the following tests'
|
2021-09-26 21:16:20 +00:00
|
|
|
t_unit="- $unit_tests_py --exclude testdep,dep,daemon"
|
2019-12-07 12:45:04 +00:00
|
|
|
f_unit='Unit tests completed'
|
2019-03-19 10:44:37 +00:00
|
|
|
|
2019-03-23 14:21:34 +00:00
|
|
|
i_hash='Internal hash function implementations'
|
|
|
|
|
s_hash='Testing internal hash function implementations'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_hash="
|
2021-04-16 17:50:53 +00:00
|
|
|
256 $python test/hashfunc.py sha256 $rounds_max
|
|
|
|
|
512 $python test/hashfunc.py sha512 $rounds_max # native SHA512 - not used by the MMGen wallet
|
|
|
|
|
keccak $python test/hashfunc.py keccak $rounds_max
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-12-07 12:20:21 +00:00
|
|
|
f_hash='Hash function tests completed'
|
2018-02-24 14:39:49 +03:00
|
|
|
|
2021-04-16 17:50:53 +00:00
|
|
|
[ "$ARM32" ] && t_hash_skip='512' # gmpy produces invalid init constants
|
|
|
|
|
[ "$MSYS2" ] && t_hash_skip='512 keccak' # 2:py_long_long issues, 3:no pysha3 for keccak reference
|
2021-09-01 16:56:34 +00:00
|
|
|
[ "$SKIP_ALT_DEP" ] && t_hash_skip+=' keccak'
|
2019-05-20 15:44:30 +00:00
|
|
|
|
2019-12-07 12:20:21 +00:00
|
|
|
i_ref='Miscellaneous reference data'
|
2019-11-01 12:24:09 +00:00
|
|
|
s_ref='The following tests will test some generated values against reference data'
|
|
|
|
|
t_ref="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $scrambletest_py
|
2019-11-01 12:24:09 +00:00
|
|
|
"
|
|
|
|
|
f_ref='Miscellaneous reference data tests completed'
|
|
|
|
|
|
2020-02-18 14:07:51 +00:00
|
|
|
i_altref='Altcoin reference file'
|
|
|
|
|
s_altref='The following tests will test some generated altcoin files against reference data'
|
|
|
|
|
t_altref="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $test_py ref_altcoin # generated addrfiles verified against checksums
|
2020-02-18 14:07:51 +00:00
|
|
|
"
|
|
|
|
|
f_altref='Altcoin reference file tests completed'
|
|
|
|
|
|
2017-12-16 09:31:00 +03:00
|
|
|
i_alts='Gen-only altcoin'
|
|
|
|
|
s_alts='The following tests will test generation operations for all supported altcoins'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_alts="
|
2021-04-16 17:50:53 +00:00
|
|
|
- # speed tests, no verification:
|
|
|
|
|
- $gentest_py --coin=etc 2 $rounds
|
|
|
|
|
- $gentest_py --coin=etc --use-internal-keccak-module 2 $rounds_min
|
|
|
|
|
- $gentest_py --coin=eth 2 $rounds
|
|
|
|
|
- $gentest_py --coin=eth --use-internal-keccak-module 2 $rounds_min
|
|
|
|
|
- $gentest_py --coin=xmr 2 $rounds
|
|
|
|
|
- $gentest_py --coin=xmr --use-internal-keccak-module 2 $rounds_min
|
|
|
|
|
- $gentest_py --coin=zec 2 $rounds
|
|
|
|
|
- $gentest_py --coin=zec --type=zcash_z 2 $rounds_mid
|
|
|
|
|
- # verification against external libraries and tools:
|
|
|
|
|
- # pycoin
|
|
|
|
|
- $gentest_py --all --type=legacy 2:pycoin $rounds
|
|
|
|
|
- $gentest_py --all --type=compressed 2:pycoin $rounds
|
|
|
|
|
- $gentest_py --all --type=segwit 2:pycoin $rounds
|
|
|
|
|
- $gentest_py --all --type=bech32 2:pycoin $rounds
|
|
|
|
|
|
|
|
|
|
- $gentest_py --all --type=legacy --testnet=1 2:pycoin $rounds
|
|
|
|
|
- $gentest_py --all --type=compressed --testnet=1 2:pycoin $rounds
|
|
|
|
|
- $gentest_py --all --type=segwit --testnet=1 2:pycoin $rounds
|
|
|
|
|
- $gentest_py --all --type=bech32 --testnet=1 2:pycoin $rounds
|
|
|
|
|
- # keyconv
|
|
|
|
|
- $gentest_py --all --type=legacy 2:keyconv $rounds
|
|
|
|
|
- $gentest_py --all --type=compressed 2:keyconv $rounds
|
2021-10-13 20:44:43 +00:00
|
|
|
e # ethkey
|
|
|
|
|
e $gentest_py --all 2:ethkey $rounds
|
|
|
|
|
m # moneropy
|
|
|
|
|
m $gentest_py --all --coin=xmr 2:moneropy $rounds_min # very slow, be patient!
|
|
|
|
|
z # zcash-mini
|
|
|
|
|
z $gentest_py --all 2:zcash-mini $rounds_mid
|
2019-11-04 16:48:25 +00:00
|
|
|
"
|
2019-05-20 15:15:13 +00:00
|
|
|
|
2021-10-13 20:44:43 +00:00
|
|
|
[ "$MSYS2" ] && t_alts_skip='m z' # no moneropy (pysha3), zcash-mini (golang)
|
2019-05-20 15:15:13 +00:00
|
|
|
|
2017-12-16 09:31:00 +03:00
|
|
|
f_alts='Gen-only altcoin tests completed'
|
|
|
|
|
|
2021-04-16 17:06:35 +00:00
|
|
|
create_tmpdir() {
|
2020-02-15 14:11:30 +00:00
|
|
|
if [ "$MSYS2" ]; then
|
|
|
|
|
TMPDIR='/tmp/mmgen-test-release'
|
|
|
|
|
else
|
|
|
|
|
TMPDIR='/tmp/mmgen-test-release-'$(cat /dev/urandom | base32 - | head -n1 | cut -b 1-16)
|
|
|
|
|
fi
|
|
|
|
|
mkdir -p $TMPDIR
|
2021-04-16 17:06:35 +00:00
|
|
|
}
|
|
|
|
|
|
2021-05-14 11:26:33 +00:00
|
|
|
rm -rf /tmp/mmgen-test-release*
|
|
|
|
|
create_tmpdir
|
2018-02-24 14:39:49 +03:00
|
|
|
|
2021-05-14 11:26:33 +00:00
|
|
|
i_xmr='Monero xmrwallet'
|
|
|
|
|
s_xmr='Testing xmrwallet operations'
|
2019-12-07 12:20:21 +00:00
|
|
|
t_xmr="
|
2021-05-14 11:26:33 +00:00
|
|
|
- $test_py --coin=xmr xmrwallet
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2021-05-14 11:26:33 +00:00
|
|
|
f_xmr='Monero xmrwallet tests completed'
|
2019-05-20 15:15:13 +00:00
|
|
|
|
2018-06-04 09:16:32 +00:00
|
|
|
i_eth='Ethereum'
|
2020-02-18 20:28:28 +00:00
|
|
|
s_eth='Testing transaction and tracking wallet operations for Ethereum'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_eth="
|
2021-10-13 20:44:43 +00:00
|
|
|
oe $test_py --coin=eth --daemon-id=openethereum ethdev
|
|
|
|
|
geth $test_py --coin=eth --daemon-id=geth ethdev
|
|
|
|
|
parity $test_py --coin=etc ethdev
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2018-06-04 09:16:32 +00:00
|
|
|
f_eth='Ethereum tests completed'
|
|
|
|
|
|
2021-10-13 20:44:43 +00:00
|
|
|
[ "$FAST" ] && t_eth_skip='oe'
|
2020-02-18 20:28:28 +00:00
|
|
|
|
2018-05-12 15:52:35 +00:00
|
|
|
i_autosign='Autosign'
|
2020-12-16 22:35:00 +03:00
|
|
|
s_autosign='The bitcoin, bitcoin-bchn and litecoin mainnet and testnet daemons must be running for the following test'
|
2021-04-16 17:50:53 +00:00
|
|
|
t_autosign="- $test_py autosign"
|
2019-12-07 12:20:21 +00:00
|
|
|
f_autosign='Autosign test completed'
|
2017-10-29 15:06:16 +03:00
|
|
|
|
2020-02-22 19:54:03 +00:00
|
|
|
i_autosign_btc='Autosign BTC'
|
|
|
|
|
s_autosign_btc='The bitcoin mainnet and testnet daemons must be running for the following test'
|
2021-04-16 17:50:53 +00:00
|
|
|
t_autosign_btc="- $test_py autosign_btc"
|
2020-02-22 19:54:03 +00:00
|
|
|
f_autosign_btc='Autosign BTC test completed'
|
2019-02-10 19:26:22 +00:00
|
|
|
|
2019-02-12 10:41:27 +00:00
|
|
|
i_autosign_live='Autosign Live'
|
|
|
|
|
s_autosign_live="The bitcoin mainnet and testnet daemons must be running for the following test\n"
|
|
|
|
|
s_autosign_live+="${YELLOW}Mountpoint, '/etc/fstab' and removable device must be configured "
|
|
|
|
|
s_autosign_live+="as described in 'mmgen-autosign --help'${RESET}"
|
2021-04-16 17:50:53 +00:00
|
|
|
t_autosign_live="- $test_py autosign_live"
|
2019-12-07 12:20:21 +00:00
|
|
|
f_autosign_live='Autosign Live test completed'
|
2019-02-12 10:41:27 +00:00
|
|
|
|
2017-10-28 00:11:00 +03:00
|
|
|
i_btc='Bitcoin mainnet'
|
|
|
|
|
s_btc='The bitcoin (mainnet) daemon must both be running for the following tests'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_btc="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $test_py --exclude regtest,autosign,ref_altcoin
|
|
|
|
|
- $test_py --segwit
|
|
|
|
|
- $test_py --segwit-random
|
|
|
|
|
- $test_py --bech32
|
|
|
|
|
- $python scripts/compute-file-chksum.py $REFDIR/*testnet.rawtx >/dev/null 2>&1
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-12-07 12:45:04 +00:00
|
|
|
f_btc='Bitcoin mainnet tests completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
|
|
|
|
i_btc_tn='Bitcoin testnet'
|
|
|
|
|
s_btc_tn='The bitcoin testnet daemon must both be running for the following tests'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_btc_tn="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $test_py --testnet=1
|
|
|
|
|
- $test_py --testnet=1 --segwit
|
|
|
|
|
- $test_py --testnet=1 --segwit-random
|
|
|
|
|
- $test_py --testnet=1 --bech32
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-12-07 12:45:04 +00:00
|
|
|
f_btc_tn='Bitcoin testnet tests completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
|
|
|
|
i_btc_rt='Bitcoin regtest'
|
|
|
|
|
s_btc_rt="The following tests will test MMGen's regtest (Bob and Alice) mode"
|
2021-04-16 17:50:53 +00:00
|
|
|
t_btc_rt="- $test_py regtest"
|
2017-12-16 09:31:00 +03:00
|
|
|
f_btc_rt='Regtest (Bob and Alice) mode tests for BTC completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
2020-12-16 22:35:00 +03:00
|
|
|
i_bch='BitcoinCashNode (BCH) mainnet'
|
|
|
|
|
s_bch='The bitcoin-bchn mainnet daemon must both be running for the following tests'
|
2021-04-16 17:50:53 +00:00
|
|
|
t_bch="- $test_py --coin=bch --exclude regtest"
|
2020-12-16 22:35:00 +03:00
|
|
|
f_bch='BitcoinCashNode (BCH) mainnet tests completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
2020-12-16 22:35:00 +03:00
|
|
|
i_bch_tn='BitcoinCashNode (BCH) testnet'
|
|
|
|
|
s_bch_tn='The bitcoin-bchn testnet daemon must both be running for the following tests'
|
2021-04-16 17:50:53 +00:00
|
|
|
t_bch_tn="- $test_py --coin=bch --testnet=1 --exclude regtest"
|
2020-12-16 22:35:00 +03:00
|
|
|
f_bch_tn='BitcoinCashNode (BCH) testnet tests completed'
|
2019-11-29 18:36:13 +00:00
|
|
|
|
2020-12-16 22:35:00 +03:00
|
|
|
i_bch_rt='BitcoinCashNode (BCH) regtest'
|
2017-10-28 00:11:00 +03:00
|
|
|
s_bch_rt="The following tests will test MMGen's regtest (Bob and Alice) mode"
|
2021-04-16 17:50:53 +00:00
|
|
|
t_bch_rt="- $test_py --coin=bch regtest"
|
2019-12-07 12:45:04 +00:00
|
|
|
f_bch_rt='Regtest (Bob and Alice) mode tests for BCH completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
|
|
|
|
i_ltc='Litecoin'
|
2019-12-07 12:20:21 +00:00
|
|
|
s_ltc='The litecoin mainnet daemon must both be running for the following tests'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_ltc="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $test_py --coin=ltc --exclude regtest
|
|
|
|
|
- $test_py --coin=ltc --segwit
|
|
|
|
|
- $test_py --coin=ltc --segwit-random
|
|
|
|
|
- $test_py --coin=ltc --bech32
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-12-07 12:45:04 +00:00
|
|
|
f_ltc='Litecoin mainnet tests completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
|
|
|
|
i_ltc_tn='Litecoin testnet'
|
|
|
|
|
s_ltc_tn='The litecoin testnet daemon must both be running for the following tests'
|
2019-05-20 15:15:13 +00:00
|
|
|
t_ltc_tn="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $test_py --coin=ltc --testnet=1 --exclude regtest
|
|
|
|
|
- $test_py --coin=ltc --testnet=1 --segwit
|
|
|
|
|
- $test_py --coin=ltc --testnet=1 --segwit-random
|
|
|
|
|
- $test_py --coin=ltc --testnet=1 --bech32
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-12-07 12:45:04 +00:00
|
|
|
f_ltc_tn='Litecoin testnet tests completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
|
|
|
|
i_ltc_rt='Litecoin regtest'
|
|
|
|
|
s_ltc_rt="The following tests will test MMGen's regtest (Bob and Alice) mode"
|
2021-04-16 17:50:53 +00:00
|
|
|
t_ltc_rt="- $test_py --coin=ltc regtest"
|
2017-12-16 09:31:00 +03:00
|
|
|
f_ltc_rt='Regtest (Bob and Alice) mode tests for LTC completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
2019-02-22 20:23:06 +00:00
|
|
|
i_tool2='Tooltest2'
|
|
|
|
|
s_tool2="The following tests will run '$tooltest2_py' for all supported coins"
|
2019-05-20 15:15:13 +00:00
|
|
|
t_tool2="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $tooltest2_py --tool-api # test the tool_api subsystem
|
|
|
|
|
- $tooltest2_py --tool-api --testnet=1
|
|
|
|
|
- $tooltest2_py --tool-api --coin=eth
|
|
|
|
|
- $tooltest2_py --tool-api --coin=xmr
|
|
|
|
|
- $tooltest2_py --tool-api --coin=zec
|
|
|
|
|
- $tooltest2_py
|
|
|
|
|
- $tooltest2_py --testnet=1
|
|
|
|
|
- $tooltest2_py --coin=ltc
|
|
|
|
|
- $tooltest2_py --coin=ltc --testnet=1
|
|
|
|
|
- $tooltest2_py --coin=bch
|
|
|
|
|
- $tooltest2_py --coin=bch --testnet=1
|
|
|
|
|
- $tooltest2_py --coin=zec
|
|
|
|
|
- $tooltest2_py --coin=xmr
|
|
|
|
|
- $tooltest2_py --coin=dash
|
|
|
|
|
e $tooltest2_py --coin=eth
|
|
|
|
|
e $tooltest2_py --coin=eth --testnet=1
|
|
|
|
|
e $tooltest2_py --coin=eth --token=mm1
|
|
|
|
|
e $tooltest2_py --coin=eth --token=mm1 --testnet=1
|
|
|
|
|
e $tooltest2_py --coin=etc
|
|
|
|
|
- $tooltest2_py --fork # run once with --fork so commands are actually executed
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2019-02-22 20:23:06 +00:00
|
|
|
f_tool2='tooltest2 tests completed'
|
2021-04-16 17:50:53 +00:00
|
|
|
[ "$SKIP_ALT_DEP" ] && t_tool2_skip='e' # skip ETH,ETC: txview requires py_ecc
|
2019-02-22 20:23:06 +00:00
|
|
|
|
2017-10-28 00:11:00 +03:00
|
|
|
i_tool='Tooltest'
|
2018-02-24 14:39:49 +03:00
|
|
|
s_tool="The following tests will run '$tooltest_py' for all supported coins"
|
2019-05-20 15:15:13 +00:00
|
|
|
t_tool="
|
2021-04-16 17:50:53 +00:00
|
|
|
- $tooltest_py --coin=btc cryptocoin
|
|
|
|
|
- $tooltest_py --coin=btc mnemonic
|
|
|
|
|
- $tooltest_py --coin=ltc cryptocoin
|
|
|
|
|
- $tooltest_py --coin=eth cryptocoin
|
|
|
|
|
- $tooltest_py --coin=etc cryptocoin
|
|
|
|
|
- $tooltest_py --coin=dash cryptocoin
|
|
|
|
|
- $tooltest_py --coin=doge cryptocoin
|
|
|
|
|
- $tooltest_py --coin=emc cryptocoin
|
|
|
|
|
- $tooltest_py --coin=zec cryptocoin
|
|
|
|
|
z $tooltest_py --coin=zec --type=zcash_z cryptocoin
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2021-04-16 17:50:53 +00:00
|
|
|
[ "$MSYS2" ] && t_tool_skip='z'
|
2018-01-14 17:24:36 +03:00
|
|
|
|
2017-12-16 09:31:00 +03:00
|
|
|
f_tool='tooltest tests completed'
|
2017-10-28 00:11:00 +03:00
|
|
|
|
|
|
|
|
i_gen='Gentest'
|
2020-02-18 14:07:51 +00:00
|
|
|
s_gen="The following tests will run '$gentest_py' for BTC and LTC mainnet and testnet"
|
2019-05-20 15:15:13 +00:00
|
|
|
t_gen="
|
2021-04-16 17:50:53 +00:00
|
|
|
- # speed tests, no verification:
|
|
|
|
|
- $gentest_py --coin=btc 2 $rounds
|
|
|
|
|
- $gentest_py --coin=btc --type=compressed 2 $rounds
|
|
|
|
|
- $gentest_py --coin=btc --type=segwit 2 $rounds
|
|
|
|
|
- $gentest_py --coin=btc --type=bech32 2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc 2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc --type=compressed 2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc --type=segwit 2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc --type=bech32 2 $rounds
|
|
|
|
|
- # wallet dumps:
|
|
|
|
|
- $gentest_py 2 $REFDIR/btcwallet.dump
|
|
|
|
|
- $gentest_py --type=segwit 2 $REFDIR/btcwallet-segwit.dump
|
|
|
|
|
- $gentest_py --type=bech32 2 $REFDIR/btcwallet-bech32.dump
|
|
|
|
|
- $gentest_py --testnet=1 2 $REFDIR/btcwallet-testnet.dump
|
|
|
|
|
- $gentest_py --coin=ltc 2 $REFDIR/litecoin/ltcwallet.dump
|
|
|
|
|
- $gentest_py --coin=ltc --type=segwit 2 $REFDIR/litecoin/ltcwallet-segwit.dump
|
|
|
|
|
- $gentest_py --coin=ltc --type=bech32 2 $REFDIR/litecoin/ltcwallet-bech32.dump
|
|
|
|
|
- $gentest_py --coin=ltc --testnet=1 2 $REFDIR/litecoin/ltcwallet-testnet.dump
|
|
|
|
|
- # libsecp256k1 vs python-ecdsa:
|
|
|
|
|
- $gentest_py 1:2 $rounds
|
|
|
|
|
- $gentest_py --type=segwit 1:2 $rounds
|
|
|
|
|
- $gentest_py --type=bech32 1:2 $rounds
|
|
|
|
|
- $gentest_py --testnet=1 1:2 $rounds
|
|
|
|
|
- $gentest_py --testnet=1 --type=segwit 1:2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc 1:2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc --type=segwit 1:2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc --testnet=1 1:2 $rounds
|
|
|
|
|
- $gentest_py --coin=ltc --testnet=1 --type=segwit 1:2 $rounds
|
2019-05-20 15:15:13 +00:00
|
|
|
"
|
2017-12-16 09:31:00 +03:00
|
|
|
f_gen='gentest tests completed'
|
2017-09-25 14:27:39 +03:00
|
|
|
|
2019-12-07 12:20:21 +00:00
|
|
|
[ -d .git -a -n "$INSTALL" -a -z "$LIST_CMDS" ] && {
|
2017-09-26 15:41:11 +03:00
|
|
|
check
|
2019-02-28 10:38:52 +00:00
|
|
|
uninstall
|
|
|
|
|
install
|
|
|
|
|
cd .test-release/pydist/mmgen-*
|
2017-09-26 15:41:11 +03:00
|
|
|
}
|
|
|
|
|
[ "$INSTALL_ONLY" ] && exit
|
2017-09-19 22:14:00 +03:00
|
|
|
|
2019-02-28 10:57:35 +00:00
|
|
|
prompt_skip() {
|
2019-02-12 10:38:22 +00:00
|
|
|
echo -n "Enter 's' to skip, or ENTER to continue: "; read -n1; echo
|
2018-02-24 14:34:30 +03:00
|
|
|
[ "$REPLY" == 's' ] && return 0
|
|
|
|
|
return 1
|
2017-10-28 00:11:00 +03:00
|
|
|
}
|
2017-11-13 22:50:35 +03:00
|
|
|
|
|
|
|
|
run_tests() {
|
2021-10-02 17:54:11 +00:00
|
|
|
[ "$LIST_CMDS" ] || echo "Running tests: $1"
|
2017-10-03 22:26:24 +03:00
|
|
|
for t in $1; do
|
2020-06-03 12:47:55 +00:00
|
|
|
if [ "$SKIP_ALT_DEP" ]; then
|
|
|
|
|
ok=$(for a in $noalt_tests; do if [ $t == $a ]; then echo 'ok'; fi; done)
|
|
|
|
|
if [ ! "$ok" ]; then
|
|
|
|
|
echo -e "${BLUE}Skipping altcoin test '$t'$RESET"
|
|
|
|
|
continue
|
|
|
|
|
fi
|
|
|
|
|
fi
|
2019-12-07 12:20:21 +00:00
|
|
|
if [ "$LIST_CMDS" ]; then
|
|
|
|
|
eval echo -e '\\n#' $(echo \$i_$t) "\($t\)"
|
|
|
|
|
else
|
|
|
|
|
eval echo -e "'\n'"\${GREEN}'###' Running $(echo \$i_$t) tests\$RESET
|
|
|
|
|
eval echo -e $(echo \$s_$t)
|
|
|
|
|
fi
|
2019-02-28 10:57:35 +00:00
|
|
|
[ "$PAUSE" ] && prompt_skip && continue
|
2018-06-04 09:16:32 +00:00
|
|
|
CUR_TEST=$t
|
2019-05-20 15:15:13 +00:00
|
|
|
do_test $t
|
2019-12-07 12:20:21 +00:00
|
|
|
[ "$LIST_CMDS" ] || eval echo -e $(echo \$f_$t)
|
2017-10-03 22:26:24 +03:00
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-13 22:50:35 +03:00
|
|
|
check_args() {
|
|
|
|
|
for i in $tests; do
|
2021-09-03 20:17:24 +00:00
|
|
|
echo "$dfl_tests $extra_tests" | grep -q "\<$i\>" || {
|
|
|
|
|
echo "$i: unrecognized argument"
|
|
|
|
|
exit 1
|
|
|
|
|
}
|
2017-11-13 22:50:35 +03:00
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-02 17:54:12 +00:00
|
|
|
remove_skipped_tests() {
|
|
|
|
|
tests=$(for t in $tests; do
|
|
|
|
|
[ "$(for s in $SKIP_LIST; do [ $t == $s ] && echo y; done)" ] && continue
|
|
|
|
|
echo $t
|
|
|
|
|
done)
|
|
|
|
|
tests=$(echo $tests)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
remove_skipped_tests
|
|
|
|
|
|
2017-11-13 22:50:35 +03:00
|
|
|
check_args
|
2021-10-02 17:54:11 +00:00
|
|
|
|
|
|
|
|
start_time=$(date +%s)
|
|
|
|
|
|
2017-10-28 00:11:00 +03:00
|
|
|
run_tests "$tests"
|
2018-10-31 18:20:59 +00:00
|
|
|
|
2021-10-02 17:54:11 +00:00
|
|
|
elapsed=$(($(date +%s)-start_time))
|
|
|
|
|
elapsed_fmt=$(printf %02d:%02d $((elapsed/60)) $((elapsed%60)))
|
|
|
|
|
|
|
|
|
|
[ "$LIST_CMDS" ] || {
|
2021-10-03 17:40:03 +00:00
|
|
|
if [ "$MMGEN_TEST_SUITE_DETERMINISTIC" ]; then
|
|
|
|
|
echo -e "${GREEN}All OK"
|
|
|
|
|
else
|
|
|
|
|
echo -e "${GREEN}All OK. Total elapsed time: $elapsed_fmt$RESET"
|
|
|
|
|
fi
|
2021-10-02 17:54:11 +00:00
|
|
|
}
|