# The `Launcher_TC_TLC_01` application must have TLC applied.
def TC_01():
+ if not check_tc_support():
+ return "NONE - TC_01 is not supported on this platform"
+
sln_name = "Launcher_TC_TLC_01.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha not in raw:
- return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
if "OK" not in check_library_arch(f"{root_path}", "libSkiaSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
# The `Launcher_TC_TLC_02` application must have TLC applied.
def TC_02():
+ if not check_tc_support():
+ return "NONE - TC_02 is not supported on this platform"
+
sln_name = "Launcher_TC_TLC_02.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha not in raw:
- return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
if "OK" not in check_library_arch(f"{root_path}", "libSkiaSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
# The `Launcher_TC_TLC_03` application should not apply TLC when updating.
def TC_03():
+ if not check_tc_support():
+ return "NONE - TC_03 is not supported on this platform"
+
pkg_id = f"org.tizen.example.Launcher_TC_TLC_00.Tizen"
root_path = get_root_path(f"{pkg_id}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha in raw:
- return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
if exist(f"{root_path}/bin/libSkiaSharp.so"):
return "FAIL : The libSkiaSharp.so library should not exist in the application"
# The `Launcher_TC_TLC_04` application is normally TLC applied when updating.
def TC_04():
+ if not check_tc_support():
+ return "NONE - TC_04 is not supported on this platform"
+
sln_name = "Launcher_TC_TLC_04.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha not in raw:
- return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
if "OK" not in check_library_arch(f"{root_path}", "libSkiaSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
# The `Launcher_TC_TLC_05` application is normally TLC applied when updating.
def TC_05():
+ if not check_tc_support():
+ return "NONE - TC_05 is not supported on this platform"
+
pkg_id = f"org.tizen.example.Launcher_TC_TLC_00.Tizen"
root_path = get_root_path(f"{pkg_id}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha in raw:
- return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
if not exist(f"{root_path}/bin/libSkiaSharp.so"):
return "FAIL : The libSkiaSharp.so library should exist in the application"
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha not in raw:
- return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
if "OK" not in check_library_arch(f"{root_path}", "libSkiaSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
# The `Launcher_TC_TLC_06` application should not apply TLC when updating.
def TC_06():
+ if not check_tc_support():
+ return "NONE - TC_06 is not supported on this platform"
+
pkg_id = f"org.tizen.example.Launcher_TC_TLC_00.Tizen"
root_path = get_root_path(f"{pkg_id}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha in raw:
- return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
if not exist(f"{root_path}/bin/libSkiaSharp.so"):
return "FAIL : The libSkiaSharp.so library should exist only in the application"
# The `Launcher_TC_TLC_07`, `Launcher_TC_TLC_08` applications using the same nuget are normally TLC applied.
def TC_07():
+ if not check_tc_support():
+ return "NONE - TC_07 is not supported on this platform"
+
sln_name = "Launcher_TC_TLC_07.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libHarfBuzzSharp.so*")
if sha not in raw:
- return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}Libraries"
sln_name = "Launcher_TC_TLC_08.Tizen"
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libHarfBuzzSharp.so*")
if sha not in raw:
- return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libHarfBuzzSharp.so library should exist in {DOTNET_DIR}Libraries"
if "OK" not in check_library_arch(f"{root_path}", "libHarfBuzzSharp.so"):
return "FAIL : The arch of the target and the arch of the library must match"
# The `Launcher_TC_TLC_09` application is normally TLC applied when uninstall.
def TC_08():
+ if not check_tc_support():
+ return "NONE - TC_08 is not supported on this platform"
+
sln_name = "Launcher_TC_TLC_09.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return f"FAIL : Get the root path for {pkg_id}"
if not exist(f"{root_path}/bin/libSkiaSharp.so"):
- return "FAIL : The libSkiaSharp.so library should exist"
+ return "FAIL : The libSkiaSharp.so library should exist in the application"
raw = cmd(f"shell ls -alZ {root_path}/bin/libSkiaSharp.so")
if (f"{root_path}/bin/libSkiaSharp.so" not in raw) or \
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha not in raw:
- return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should exist in {DOTNET_DIR}Libraries"
raw = cmd(f"uninstall {pkg_id}")
if "key[end] val[ok]" not in raw:
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libSkiaSharp.so*")
if sha in raw:
- return f"FAIL : The libSkiaSharp.so library should not exist in {DONTET_DIR}"
+ return f"FAIL : The libSkiaSharp.so library should not exist in {DOTNET_DIR}Libraries"
return "PASS"
# The `Launcher_TC_TLC_10` application should match the information of nuget with the value of TLC database.
def TC_09():
+ if not check_tc_support():
+ return "NONE - TC_09 is not supported on this platform"
+
sln_name = "Launcher_TC_TLC_10.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
raw = cmd(f"shell find {root_path}/bin/ -name lib*.so*")
lines1 = [l for l in raw.splitlines()]
if len(lines1) == 0:
- return "FAIL : The library should exist in the application"
+ return "FAIL : The libraries should exist in the application"
raw = subprocess.run((f"sdb -s {serial} shell sqlite3 {DOTNET_DIR}.TLC.App.list.db").split(), stdout=subprocess.PIPE, input=f"select * from TLC;\n.q\n", encoding="utf-8").stdout
lines2 = [l for l in raw.splitlines() if f"{pkg_id}" in l]
raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name {name}..{sha}")
if f"{DOTNET_DIR}Libraries/{name}..{sha}" not in raw:
- return f"FAIL : The {name} library should exist in {DOTNET_DIR}"
+ return f"FAIL : The {name} library should exist in {DOTNET_DIR}Libraries"
is_exist = False
for rcd in lines2:
global tpk_list
tpk_list = search_tpk(f"{module_name}")
- p = run_tc_array(module_name, tc_array)
- f = len(tc_array) - p
- r = round(((p / len(tc_array)) * 100), 2)
- print(f"--- {module_name} TCT Result ---\nFAIL : [{f}] / PASS : [{p}] - [{r}%]\n")
+ pn = run_tc_array(module_name, tc_array)
+ p = int(pn.split(":")[0])
+ n = int(pn.split(":")[1])
+ 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")
# Uninstall the application and restore to original state
def clean():