From 80da0a41bc21f3297e8223614217a76595bb9d58 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Fri, 21 Aug 2020 22:36:11 +0200 Subject: [PATCH] test: load complete test environment in debug mode Stop just before executing actual tests. This makes all test functions accessible in debug mode. --- test/scenarios/lib.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/scenarios/lib.py b/test/scenarios/lib.py index 1de7039..7df7108 100644 --- a/test/scenarios/lib.py +++ b/test/scenarios/lib.py @@ -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")