From be3c453556f0121b43ccf49d4e72e29c4f80dd64 Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Sun, 4 Jun 2023 17:36:56 -0400 Subject: [PATCH] tests: pause (with CLI) at step() functions when run with --pause Signed-off-by: Christian Hopps --- tests/topotests/lib/common_config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index a85b86668c..5d37b062ac 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -33,6 +33,7 @@ from lib.topogen import TopoRouter, get_topogen from lib.topolog import get_logger, logger from lib.topotest import frr_unicode, interface_set_status, version_cmp from lib import topotest +from munet.testing.util import pause_test FRRCFG_FILE = "frr_json.conf" FRRCFG_BKUP_FILE = "frr_json_initial.conf" @@ -2069,6 +2070,8 @@ def step(msg, reset=False): * ` msg` : Step message body. * `reset` : Reset step count to 1 when set to True. """ + if bool(topotest.g_pytest_config.get_option("--pause")): + pause_test("before :" + msg) _step = Stepper() _step(msg, reset) -- 2.39.5