From: 최종헌/Common Platform Lab(SR)/Engineer/삼성전자 Date: Fri, 22 Jan 2021 04:44:40 +0000 (+0900) Subject: [TC Fixed] Added 'NONE' value to test result (#319) X-Git-Tag: accepted/tizen/unified/20210125.073655^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b1a51446fec0233d52ab7f26ebad9563cf0d691;p=platform%2Fcore%2Fdotnet%2Flauncher.git [TC Fixed] Added 'NONE' value to test result (#319) Change-Id: Id8cf0dac0e413c571dacf7daadede10dae78d886 Co-authored-by: 조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 --- diff --git a/tests/TCs/1_AOT/AOT.py b/tests/TCs/1_AOT/AOT.py index f2bcccf..f32488b 100755 --- a/tests/TCs/1_AOT/AOT.py +++ b/tests/TCs/1_AOT/AOT.py @@ -119,10 +119,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/2_PLUGIN/PLUGIN.py b/tests/TCs/2_PLUGIN/PLUGIN.py index 4ffb43c..3dfdf39 100755 --- a/tests/TCs/2_PLUGIN/PLUGIN.py +++ b/tests/TCs/2_PLUGIN/PLUGIN.py @@ -268,10 +268,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/3_PRELOAD/PRELOAD.py b/tests/TCs/3_PRELOAD/PRELOAD.py index 34fefc2..350c5bd 100755 --- a/tests/TCs/3_PRELOAD/PRELOAD.py +++ b/tests/TCs/3_PRELOAD/PRELOAD.py @@ -99,10 +99,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/4_TAC/TAC.py b/tests/TCs/4_TAC/TAC.py index 287ac21..94fae23 100755 --- a/tests/TCs/4_TAC/TAC.py +++ b/tests/TCs/4_TAC/TAC.py @@ -507,10 +507,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/5_TLC/TLC.py b/tests/TCs/5_TLC/TLC.py index 1cf3367..42b1ef6 100755 --- a/tests/TCs/5_TLC/TLC.py +++ b/tests/TCs/5_TLC/TLC.py @@ -353,8 +353,8 @@ def TC_06(): return f"FAIL : Get the pid for {pkg_id}" raw = cmd(f"shell cat /proc/{pid}/smaps | grep libSkiaSharp.so") - if (f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." in raw) or \ - (f"{root_path}/bin/libSkiaSharp.so" not in raw): + if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \ + (f"{DOTNET_DIR}Libraries/libSkiaSharp.so.." in raw): return "FAIL : The libSkiaSharp.so library in the application should be loaded when running the application" cmd(f"shell app_launcher -t {pkg_id}") @@ -574,10 +574,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/6_TOOL/TOOL.py b/tests/TCs/6_TOOL/TOOL.py index 6e0c398..ab3c70c 100755 --- a/tests/TCs/6_TOOL/TOOL.py +++ b/tests/TCs/6_TOOL/TOOL.py @@ -551,10 +551,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/7_LAUNCH/LAUNCH.py b/tests/TCs/7_LAUNCH/LAUNCH.py index a343674..8db4062 100755 --- a/tests/TCs/7_LAUNCH/LAUNCH.py +++ b/tests/TCs/7_LAUNCH/LAUNCH.py @@ -181,10 +181,10 @@ def run(): tpk_list = search_tpk(f"{module_name}") pn = run_tc_array(module_name, tc_array) - p = int(pn.split(":")[0]) - n = int(pn.split(":")[1]) + n = int(pn.split(":")[0]) + f = int(pn.split(":")[1]) + p = int(pn.split(":")[2]) r = 0.0 - f = len(tc_array) - p - n if (len(tc_array) - n) != 0: r = round(((p / (len(tc_array) - n)) * 100), 2) print(f"--- {module_name} TCT Result ---\nNONE : [{n}] / FAIL : [{f}] / PASS : [{p}] - [{r}%]\n") diff --git a/tests/TCs/Utils.py b/tests/TCs/Utils.py index 6babbb6..0a25754 100755 --- a/tests/TCs/Utils.py +++ b/tests/TCs/Utils.py @@ -185,16 +185,18 @@ def exist(path): # Run the test array def run_tc_array(module_name, tc_array): - p = 0 n = 0 + f = 0 + p = 0 for tc in tc_array: print(f">{module_name}_{tc.__name__}...", end="\r") ret = tc() print(f">{module_name}_{tc.__name__} : {ret}") - if "PASS" == ret: p += 1 if "NONE" in ret: n += 1 + if "FAIL" in ret: f += 1 + if "PASS" == ret: p += 1 sleep(3) - return str(p) + ":" + str(n) + return str(n) + ":" + str(f) + ":" + str(p) def check_tc_support(): if "armv8" == get_device_arch():