diff --git a/mmgen/cfg.py b/mmgen/cfg.py index ac8a19c3..5781ade2 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -256,6 +256,7 @@ class Config(Lockable): test_suite_cfgtest = False test_suite_deterministic = False test_suite_pexpect = False + test_suite_pexpect_timeout = 0 test_suite_popen_spawn = False test_suite_root_pfx = '' hold_protect_disable = False @@ -339,6 +340,7 @@ class Config(Lockable): 'MMGEN_TEST_SUITE_DETERMINISTIC', 'MMGEN_TEST_SUITE_ENABLE_COLOR', 'MMGEN_TEST_SUITE_PEXPECT', + 'MMGEN_TEST_SUITE_PEXPECT_TIMEOUT', 'MMGEN_TEST_SUITE_POPEN_SPAWN', 'MMGEN_TEST_SUITE_ROOT_PFX', 'MMGEN_TRACEBACK', diff --git a/test/cmdtest_d/include/pexpect.py b/test/cmdtest_d/include/pexpect.py index f70042fe..09a83aee 100755 --- a/test/cmdtest_d/include/pexpect.py +++ b/test/cmdtest_d/include/pexpect.py @@ -64,7 +64,10 @@ class CmdTestPexpect: redir = DEVNULL if (no_output or not cfg.exact_output) else None self.ep = Popen([args[0]] + args[1:], stderr=redir, env=spawn_env) else: - timeout = int(timeout or cfg.pexpect_timeout or 0) or (60, 5)[bool(cfg.debug_pexpect)] + timeout = int( + timeout + or cfg.pexpect_timeout + or cfg.test_suite_pexpect_timeout) or (60, 5)[bool(cfg.debug_pexpect)] if pexpect_spawn: self.p = pexpect.spawn(args[0], args[1:], encoding='utf8', timeout=timeout, env=spawn_env) else: