From 13a83ef4d4d05211601b023fa667b5332850fccc Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Wed, 21 Mar 2018 12:35:51 +0100 Subject: make test: code cleanup Change-Id: Ic689de569e5b6e6209d16d6acdb13c489daca1f5 Signed-off-by: Klement Sekera --- test/run_tests.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'test/run_tests.py') diff --git a/test/run_tests.py b/test/run_tests.py index 419b8c679cb..24c51a18f9a 100644 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -165,6 +165,9 @@ if __name__ == '__main__': except: debug = None + s = os.getenv("STEP", "n") + step = True if s.lower() in ("y", "yes", "1") else False + parser = argparse.ArgumentParser(description="VPP unit tests") parser.add_argument("-f", "--failfast", action='count', help="fast failure flag") @@ -189,7 +192,11 @@ if __name__ == '__main__': attempts = retries + 1 if attempts > 1: print("Perform %s attempts to pass the suite..." % attempts) - if debug is None or debug.lower() not in ["gdb", "gdbserver"]: + if (debug is not None and debug.lower() in ["gdb", "gdbserver"]) or step: + # don't fork if requiring interactive terminal.. + sys.exit(not VppTestRunner( + verbosity=verbose, failfast=failfast).run(suite).wasSuccessful()) + else: while True: result, failed = run_forked(suite) attempts = attempts - 1 @@ -199,7 +206,3 @@ if __name__ == '__main__': suite = suite_from_failed(suite, failed) continue sys.exit(result) - - # don't fork if debugging.. - sys.exit(not VppTestRunner(verbosity=verbose, - failfast=failfast).run(suite).wasSuccessful()) -- cgit 1.2.3-korg