test: load complete test environment in debug mode

Stop just before executing actual tests.
This makes all test functions accessible in debug mode.
This commit is contained in:
Erik Arvstedt 2020-08-21 22:36:11 +02:00
parent 9b4cd7bd1c
commit 80da0a41bc
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
1 changed files with 7 additions and 5 deletions

View File

@ -1,3 +1,6 @@
is_interactive = "is_interactive" in vars()
def succeed(*cmds):
"""Returns the concatenated output of all cmds"""
return machine.succeed(*cmds)
@ -29,16 +32,15 @@ def assert_running(unit):
assert_no_failure(unit)
# Don't execute the following test suite when this script is running in interactive mode
if "is_interactive" in vars():
raise Exception()
def run_tests(extra_tests):
"""
:param extra_tests: Test functions that hook into the testing code below
:type extra_tests: Dict[str, Callable[]]
"""
# Don't execute the following test suite when this script is running in interactive mode
if is_interactive:
raise Exception()
test_security()
assert_running("bitcoind")