Browse Source

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

The MMGen Project 4 years ago
parent
commit
6bc80580e0
2 changed files with 11 additions and 4 deletions
  1. 10 3
      test/test-release.sh
  2. 1 1
      test/test_py_d/ts_ref_altcoin.py

+ 10 - 3
test/test-release.sh

@@ -101,7 +101,7 @@ do
 		echo
 		echo
 		echo   "  By default, all tests are run"
 		echo   "  By default, all tests are run"
 		exit ;;
 		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" ;;
 	b)  test_py+=" --buf-keypress" ;;
 	C)  mkdir -p 'test/trace'
 	C)  mkdir -p 'test/trace'
 		touch 'test/trace.acc'
 		touch 'test/trace.acc'
@@ -153,7 +153,7 @@ case $1 in
 	'')        tests=$dfl_tests ;;
 	'')        tests=$dfl_tests ;;
 	'default') tests=$dfl_tests ;;
 	'default') tests=$dfl_tests ;;
 	'extra')   tests=$extra_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 ;;
 	'quick')   tests=$quick_tests ;;
 	'qskip')   tests=$qskip_tests ;;
 	'qskip')   tests=$qskip_tests ;;
 	*)         tests="$*" ;;
 	*)         tests="$*" ;;
@@ -493,7 +493,7 @@ t_tool2="
 	$tooltest2_py --fork # run once with --fork so commands are actually executed
 	$tooltest2_py --fork # run once with --fork so commands are actually executed
 "
 "
 f_tool2='tooltest2 tests completed'
 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'
 i_tool='Tooltest'
 s_tool="The following tests will run '$tooltest_py' for all supported coins"
 s_tool="The following tests will run '$tooltest_py' for all supported coins"
@@ -563,6 +563,13 @@ prompt_skip() {
 
 
 run_tests() {
 run_tests() {
 	for t in $1; do
 	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
 		if [ "$LIST_CMDS" ]; then
 			eval echo -e '\\n#' $(echo \$i_$t) "\($t\)"
 			eval echo -e '\\n#' $(echo \$i_$t) "\($t\)"
 		else
 		else

+ 1 - 1
test/test_py_d/ts_ref_altcoin.py

@@ -106,7 +106,7 @@ class TestSuiteRefAltcoin(TestSuiteRef,TestSuiteBase):
 					start_test_daemons(proto.network_id)
 					start_test_daemons(proto.network_id)
 				t = self.spawn(
 				t = self.spawn(
 					'mmgen-txsign',
 					'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}')
 					extra_desc = f'{proto.coin}{token_desc} {proto.network}')
 				t.read()
 				t.read()
 				t.ok()
 				t.ok()