X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Frun_tests.py;h=f20c43af7d7cef2d191c0c26054db604b42093ff;hb=853cc9f2ad3ee52cbdd891fb09d51c25678baed0;hp=3cabab5c67ecb6f272798a7bdff53194a2ae1984;hpb=47f352710824c373f8130ba632022b47cb27505b;p=vpp.git diff --git a/test/run_tests.py b/test/run_tests.py index 3cabab5c67e..f20c43af7d7 100644 --- a/test/run_tests.py +++ b/test/run_tests.py @@ -14,12 +14,15 @@ from multiprocessing import Process, Pipe, get_context from multiprocessing.queues import Queue from multiprocessing.managers import BaseManager from config import config, num_cpus, available_cpus, max_vpp_cpus -from framework import ( +from vpp_papi import VPPApiJSONFiles +from asfframework import ( VppTestRunner, - VppTestCase, get_testcase_doc_name, get_test_description, + get_failed_testcase_linkname, + get_testcase_dirname, ) +from framework import VppTestCase from test_result_code import TestResultCode from debug import spawn_gdb from log import ( @@ -902,9 +905,11 @@ def parse_results(results): if __name__ == "__main__": - print(f"Config is: {config}") + if config.api_preload: + VPPApiJSONFiles.load_api(apidir=config.extern_apidir + [config.vpp_install_dir]) + if config.sanity: print("Running sanity test case.") try: @@ -1058,6 +1063,13 @@ if __name__ == "__main__": ) exit_code = 0 while suites and attempts > 0: + for suite in suites: + failed_link = get_failed_testcase_linkname( + config.failed_dir, + f"{get_testcase_dirname(suite._tests[0].__class__.__name__)}", + ) + if os.path.islink(failed_link): + os.unlink(failed_link) results = run_forked(suites) exit_code, suites = parse_results(results) attempts -= 1