cmdtest.py: add dev (developer scripts) test group

This commit is contained in:
The MMGen Project 2023-12-12 10:19:51 +00:00
commit afb09f6fc1
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 25 additions and 3 deletions

View file

@ -41,6 +41,7 @@ cmd_groups_dfl = {
}
cmd_groups_extra = {
'dev': ('CmdTestDev',{'modname':'misc'}),
'autosign_btc': ('CmdTestAutosignBTC',{'modname':'autosign'}),
'autosign_live': ('CmdTestAutosignLive',{'modname':'autosign'}),
'autosign_live_simulate': ('CmdTestAutosignLiveSimulate',{'modname':'autosign'}),

View file

@ -29,6 +29,23 @@ from .common import get_file_with_ext,dfl_words_file
from .ct_base import CmdTestBase
from .ct_main import CmdTestMain
class CmdTestDev(CmdTestBase):
'developer scripts'
networks = ('btc',)
cmd_group = (
('compute_file_chksum', 'scripts/compute-file-chksum.py'),
)
tmpdir_nums = [99]
color = True
def _spawn(self,script,args):
return self.spawn(script,args,cmd_dir='.',no_exec_wrapper=True)
def compute_file_chksum(self):
t = self._spawn('scripts/compute-file-chksum.py', ['test/ref/25EFA3[2.34].testnet.rawtx'])
t.expect('3df942')
return t
class CmdTestMisc(CmdTestBase):
'miscellaneous tests (RPC backends, xmrwallet_txview, term)'
networks = ('btc',)

View file

@ -8,7 +8,7 @@
# https://github.com/mmgen/mmgen-wallet
# https://gitlab.com/mmgen/mmgen-wallet
all_tests="dep lint obj color unit hash ref altref altgen xmr eth autosign btc btc_tn btc_rt bch bch_tn bch_rt ltc ltc_tn ltc_rt tool tool2 gen alt"
all_tests="dep dev lint obj color unit hash ref altref altgen xmr eth autosign btc btc_tn btc_rt bch bch_tn bch_rt ltc ltc_tn ltc_rt tool tool2 gen alt"
groups_desc="
default - All tests minus the extra tests
@ -20,7 +20,7 @@ groups_desc="
init_groups() {
dfl_tests='dep alt obj color unit hash ref tool tool2 gen autosign btc btc_tn btc_rt altref altgen bch bch_rt ltc ltc_rt eth xmr'
extra_tests='dep lint autosign_btc autosign_live ltc_tn bch_tn'
extra_tests='dep dev lint autosign_btc autosign_live ltc_tn bch_tn'
noalt_tests='dep alt obj color unit hash ref tool tool2 gen autosign_btc btc btc_tn btc_rt'
quick_tests='dep alt obj color unit hash ref tool tool2 gen autosign btc btc_rt altref altgen eth xmr'
qskip_tests='lint btc_tn bch bch_rt ltc ltc_rt'
@ -59,6 +59,11 @@ init_tests() {
d_dep="system and testing dependencies"
t_dep="- $unit_tests_py testdep dep daemon.exec"
d_dev="developer scripts ${YELLOW}(additional dependencies required)$RESET"
t_dev="
- $cmdtest_py dev
"
d_lint="code errors with static code analyzer"
t_lint="
- $pylint --errors-only mmgen
@ -156,7 +161,6 @@ init_tests() {
d_btc="overall operations with emulated RPC data (Bitcoin)"
t_btc="
- $python scripts/compute-file-chksum.py $REFDIR/*testnet.rawtx >/dev/null 2>&1
- $cmdtest_py --exclude regtest,autosign,ref_altcoin
- $cmdtest_py --segwit
- $cmdtest_py --segwit-random