test-release.sh: 'noalt' fixes; test.py: ref_altcoin fix

This commit is contained in:
The MMGen Project 2020-06-03 12:47:55 +00:00
commit 6bc80580e0
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
2 changed files with 11 additions and 4 deletions

View file

@ -101,7 +101,7 @@ do
echo
echo " By default, all tests are run"
exit ;;
A) SKIP_ALT_DEP=1 unit_tests_py+=" --no-altcoin-deps";;
A) SKIP_ALT_DEP=1 unit_tests_py+=" --no-altcoin-deps" ;;
b) test_py+=" --buf-keypress" ;;
C) mkdir -p 'test/trace'
touch 'test/trace.acc'
@ -153,7 +153,7 @@ case $1 in
'') tests=$dfl_tests ;;
'default') tests=$dfl_tests ;;
'extra') tests=$extra_tests ;;
'noalt') tests=$noalt_tests SKIP_ALT_DEP=1 ;;
'noalt') tests=$noalt_tests SKIP_ALT_DEP=1 unit_tests_py+=" --no-altcoin-deps" ;;
'quick') tests=$quick_tests ;;
'qskip') tests=$qskip_tests ;;
*) tests="$*" ;;
@ -493,7 +493,7 @@ t_tool2="
$tooltest2_py --fork # run once with --fork so commands are actually executed
"
f_tool2='tooltest2 tests completed'
[ "$SKIP_ALT_DEP" ] && t_tool2_skip='17 18'
[ "$SKIP_ALT_DEP" ] && t_tool2_skip='15 16 17 18 19' # skip ETH,ETC: txview requires py_ecc
i_tool='Tooltest'
s_tool="The following tests will run '$tooltest_py' for all supported coins"
@ -563,6 +563,13 @@ prompt_skip() {
run_tests() {
for t in $1; do
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
if [ "$LIST_CMDS" ]; then
eval echo -e '\\n#' $(echo \$i_$t) "\($t\)"
else

View file

@ -106,7 +106,7 @@ class TestSuiteRefAltcoin(TestSuiteRef,TestSuiteBase):
start_test_daemons(proto.network_id)
t = self.spawn(
'mmgen-txsign',
['--yes', f'--passwd-file={passfile}', dfl_words_file, txfile],
['--outdir=test/trash','--yes', f'--passwd-file={passfile}', dfl_words_file, txfile],
extra_desc = f'{proto.coin}{token_desc} {proto.network}')
t.read()
t.ok()