move test_suite_autosign_led_simulate cfg var to test suite

This commit is contained in:
The MMGen Project 2026-09-15 10:51:04 +00:00
commit f95e8f7f50
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
4 changed files with 7 additions and 3 deletions

View file

@ -30,6 +30,7 @@ class Autosign:
wallet_subdir = 'autosign'
linux_blkid_cmd = 'sudo blkid -s LABEL -o value'
keylist_fn = 'keylist.mmenc'
simulate_led = False
cmds = ('setup', 'xmr_setup', 'sign', 'wait')
@ -544,7 +545,7 @@ class Autosign:
from ..led import LEDControl
self.led = LEDControl(
enabled = self.cfg.led,
simulate = self.cfg.test_suite_autosign_led_simulate)
simulate = self.simulate_led)
self.led.set('off')
def setup_non_mmgen_keys(self):

View file

@ -1126,7 +1126,7 @@ class CmdTestAutosignLive(CmdTestAutosignBTC):
t.kill(2) # 2 = SIGINT
if self.simulate_led and led_opts:
t.expect(f'Resetting {self.color} LED')
t.expect('Stopping LED')
return t
class CmdTestAutosignLiveSimulate(CmdTestAutosignLive):

View file

@ -20,3 +20,6 @@ Autosign.dev_label = 'MMGEN_TS_TX' # autosign_live only (Linux)
Autosign.linux_mount_subdir = 'mmgen_ts_autosign'
Autosign.macOS_ramdisk_name = 'TestAutosignRamDisk'
Autosign.init_fixup = overlay_fake_Autosign.init_fixup
if os.getenv('MMGEN_TEST_SUITE_AUTOSIGN_LED_SIMULATE'):
Autosign.simulate_led = True

View file

@ -33,7 +33,6 @@ for k, v in {
'test_suite_cfgtest': False, # cfgfile - using getattr() with dfl val - OK
'test_suite_popen_spawn': False, # line_input() - using getattr() with dfl val - OK
'test_suite_hold_protect_disable': False, # init_term() - using getattr() with dfl val - OK
'test_suite_autosign_led_simulate': False, # autosign - OK
'test_suite_autosign_threaded': False, # autosign - OK
'test_suite_xmr_autosign': False, # autosign - OK
'test_suite_root_pfx': '', # autosign - OK
@ -41,6 +40,7 @@ for k, v in {
'test_datadir': os.path.join('test', 'tmp', 'data_dir'), # cfg - OK
# these are referenced in test suite only:
'test_suite_autosign_led_simulate': False,
'test_suite_exec_wrapper': False,
'test_suite_bogus_unspent_data': '',
'test_suite_debug_utf8': False,