X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=inline;f=test%2Frun_tests.py;h=02e4738184d3a3a415466fc721117203cfd24d12;hb=0d427d8d8a48af404dfc6535ae72d334b790f809;hp=3476ef046681666990d4459d59e5d48787ea7431;hpb=57612ebcf3b5414c6a2f6153a3338803ac94d759;p=vpp.git diff --git a/test/run_tests.py b/test/run_tests.py index 3476ef04668..02e4738184d 100644 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -52,7 +52,10 @@ class Filter_by_class_list: def suite_from_failed(suite, failed): filter_cb = Filter_by_class_list(failed) - return VppTestRunner.filter_tests(suite, filter_cb) + suite = VppTestRunner.filter_tests(suite, filter_cb) + if 0 == suite.countTestCases(): + raise Exception("Suite is empty after filtering out the failed tests!") + return suite def run_forked(suite): @@ -196,10 +199,16 @@ if __name__ == '__main__': retries = int(os.getenv("RETRIES", 0)) except ValueError: retries = 0 + + try: + force_foreground = int(os.getenv("FORCE_FOREGROUND", 0)) + except ValueError: + force_foreground = 0 attempts = retries + 1 if attempts > 1: print("Perform %s attempts to pass the suite..." % attempts) - if (debug is not None and debug.lower() in ["gdb", "gdbserver"]) or step: + if (debug is not None and debug.lower() in ["gdb", "gdbserver"]) or step\ + or force_foreground: # don't fork if requiring interactive terminal.. sys.exit(not VppTestRunner( verbosity=verbose, failfast=failfast).run(suite).wasSuccessful())