Fri, Apr 22, 2016 at 10:52:18AM CEST, jprochaz(a)redhat.com wrote:
this is new method for debugging, it pauses execution
of the test until and resumes after pressing enter
this functionality will be enriched in the future,
when we come up with full design
Signed-off-by: Jiri Prochazka <jprochaz(a)redhat.com>
---
lnst/Controller/Task.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index faca548..cb52921 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -44,6 +44,11 @@ def wait(seconds):
def get_module(name, options={}):
return ctl.get_module(name, options)
+def breakpoint():
+ if ctl.get_run_mode != "config_only":
+ return
+ raw_input("Press enter to continue: ")
+
class TaskError(Exception): pass
class ControllerAPI(object):
Print also what's happening :-)
Something like "Breakpoint reached. Press enter to continue."