From 6bc80580e0f2b880eab84e9f16b1f334fcc83ec0 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 3 Jun 2020 12:47:55 +0000 Subject: [PATCH] test-release.sh: 'noalt' fixes; test.py: ref_altcoin fix --- test/test-release.sh | 13 ++++++++++--- test/test_py_d/ts_ref_altcoin.py | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/test/test-release.sh b/test/test-release.sh index 2d21afa3..7d5505be 100755 --- a/test/test-release.sh +++ b/test/test-release.sh @@ -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 diff --git a/test/test_py_d/ts_ref_altcoin.py b/test/test_py_d/ts_ref_altcoin.py index 6190b274..7ce9756e 100755 --- a/test/test_py_d/ts_ref_altcoin.py +++ b/test/test_py_d/ts_ref_altcoin.py @@ -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()