laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38136?usp=email )
Change subject: testenv: display current test name on ^C ......................................................................
testenv: display current test name on ^C
When running a whole testsuite and getting a lot of output, it can be useful to know which test was currently running when pressing ^C. Now that we have a function that provides this information, show it to the user.
Change-Id: I2eb639f47440447ac71027956b9c234323565956 --- M _testenv/testenv.py 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/_testenv/testenv.py b/_testenv/testenv.py index 6ed1e51..e1f1210 100755 --- a/_testenv/testenv.py +++ b/_testenv/testenv.py @@ -119,6 +119,9 @@ sys.exit(2) except KeyboardInterrupt: print("") # new line + test = testenv.testsuite.get_current_test() + if test: + logging.critical(f"^C during {test}") testenv.podman.stop() sys.exit(3) except: