[TC Fixed] Added 'NONE' value to test result (#319) accepted/tizen/unified/20210125.073655 submit/tizen/20210125.003944
author최종헌/Common Platform Lab(SR)/Engineer/삼성전자 <j-h.choi@samsung.com>
Fri, 22 Jan 2021 04:44:40 +0000 (13:44 +0900)
committer조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Fri, 22 Jan 2021 04:44:40 +0000 (13:44 +0900)
Change-Id: Id8cf0dac0e413c571dacf7daadede10dae78d886

Co-authored-by: 조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
tests/TCs/1_AOT/AOT.py
tests/TCs/2_PLUGIN/PLUGIN.py
tests/TCs/3_PRELOAD/PRELOAD.py
tests/TCs/4_TAC/TAC.py
tests/TCs/5_TLC/TLC.py
tests/TCs/6_TOOL/TOOL.py
tests/TCs/7_LAUNCH/LAUNCH.py
tests/TCs/Utils.py

index f2bcccf..f32488b 100755 (executable)
@@ -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")
index 4ffb43c..3dfdf39 100755 (executable)
@@ -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")
index 34fefc2..350c5bd 100755 (executable)
@@ -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")
index 287ac21..94fae23 100755 (executable)
@@ -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")
index 1cf3367..42b1ef6 100755 (executable)
@@ -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")
index 6e0c398..ab3c70c 100755 (executable)
@@ -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")
index a343674..8db4062 100755 (executable)
@@ -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")
index 6babbb6..0a25754 100755 (executable)
@@ -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():