summaryrefslogtreecommitdiffstats
path: root/test/run_tests.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2018-03-21 12:35:51 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2018-03-23 12:57:41 +0000
commit13a83ef4d4d05211601b023fa667b5332850fccc (patch)
tree786a1c6743444e30609b2d6da86e121f97d69b4c /test/run_tests.py
parent3f2dd30b0bf7cf3d82c720d5065178c1fa628c6b (diff)
make test: code cleanup
Change-Id: Ic689de569e5b6e6209d16d6acdb13c489daca1f5 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/run_tests.py')
-rw-r--r--test/run_tests.py13
1 files changed, 8 insertions, 5 deletions
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())