Commit 15d0dac5 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

test/lvol: sort test cases numerically



Make sure test case 10000 is always last, since it kills the target app
and makes any tests run after it fail.

This also de-duplicates the test execution code (now the "all" case
just fills out tc_list).

Change-Id: I88b629a1ef17afd4b95a4fd7d0cbf0321238b7a4
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406677


Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 463925ff
Loading
Loading
Loading
Loading
+9 −15
Original line number Diff line number Diff line
@@ -34,14 +34,8 @@ if __name__ == "__main__":
        tc = TestCases(rpc_py, total_size, block_size, cluster_size, base_dir_path, app_path)

        if "all" in tc_list:
            for num_test in [i.split("test_case")[1] for i in dir(TestCases) if "test_case" in i]:
                fail_count = 0
                exec("fail_count += tc.test_case{num_test}"
                     "()".format(num_test=num_test))
                check_fail_count(fail_count, num_test)
                if fail_count:
                    tc_failed.append(num_test)
        else:
            tc_list = sorted([i.split("test_case")[1] for i in dir(TestCases) if "test_case" in i], key=int)

        for num_test in tc_list:
            fail_count = 0
            exec("fail_count += tc.test_case{num_test}"