Commit bde783d4 authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

autorun_post: fail if not all per-patch tests ran.



This will keep us honest with our testing strategy and help prevent us
from unintentionally skipping tests.

Change-Id: Ie9dda265b48814c5e8aafe0504205310b886eea9
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477981


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
parent e0f90388
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -135,6 +135,15 @@ def getSkippedTests(repo_dir):
            return [x.strip() for x in skipped_test_data.readlines() if "#" not in x and x.strip() != '']


def confirmPerPatchTests(test_list, skiplist):
    missing_tests = [x for x in sorted(test_list) if test_list[x][0] is False
                     and x not in skiplist]
    if len(missing_tests) > 0:
        print("Not all tests were run. Failing the build.")
        print(missing_tests)
        exit(1)


def aggregateCompletedTests(output_dir, repo_dir):
    test_list = {}
    test_completion_table = []
@@ -163,6 +172,7 @@ def aggregateCompletedTests(output_dir, repo_dir):
    printListInformation("Tests", test_list)
    generateTestCompletionTables(output_dir, test_completion_table)
    skipped_tests = getSkippedTests(repo_dir)
    confirmPerPatchTests(test_list, skipped_tests)


def main(output_dir, repo_dir):