sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
from time import sleep
+from pathlib import Path
from Utils import *
return "PASS"
-# The `Launcher_TC_TOOL_01` application does not have native image.
+# Create a native image for netstandard.dll by specifying the directory containing the IBC files.
def TC_09():
+ current_path = os.path.abspath(__file__)
+ packaging_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../packaging"))
+ ibcdata_zip = ""
+
+ raw = cmd("capability")
+ line = [l for l in raw.splitlines() if "cpu_arch" in l]
+ target_arch = line[0].split(":")[1]
+ if ("armv7" == target_arch) or \
+ ("x86" == target_arch):
+ ibcdata_zip = "ibcdata_arm.zip"
+ else:
+ ibcdata_zip = "ibcdata_aarch64.zip"
+
+ cmd(f"push {packaging_path}/{ibcdata_zip} /tmp")
+ cmd(f"shell unzip /tmp/{ibcdata_zip} -d {IBCDATA_DIR}")
+ cmd(f"shell chsmack -a _ {IBCDATA_DIR} -r")
+
+ raw = cmd(f"shell find {IBCDATA_DIR}netstandard.ibc")
+ if f"No such file or directory" in raw:
+ return "FAIL : The netstandard.ibc file should exist"
+
+ raw = cmd(f"shell dotnettool --ibc-dir /usr/share/dotnet.tizen/ibcdata/ --ni-dll {RUNTIME_DIR}netstandard.dll")
+ if ("netstandard.dll (FNV)" not in raw) or \
+ ("netstandard.ni.dll generated successfully." not in raw):
+ return "FAIL : Create native image for netstandard.dll"
+
+ return "PASS"
+
+# The `Launcher_TC_TOOL_01` application does not have native image.
+def TC_10():
sln_name = "Launcher_TC_TOOL_01.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
# The `Launcher_TC_TOOL_02` application generates native image.
-def TC_10():
+def TC_11():
sln_name = "Launcher_TC_TOOL_02.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
# The `prefer_dotnet_aot` metadata value of `true` will regenerates the native image in all .NET applications.
-def TC_11():
+def TC_12():
sln_name = "Launcher_TC_TOOL_03.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
# The `prefer_nuget_cache` metadata value of `true` will regenerates the native image in the `TAC`.
-def TC_12():
+def TC_13():
sln_name = "Launcher_TC_TOOL_04.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
# The `Launcher_TC_TOOL_05` application must not have `TAC` applied.
-def TC_13():
+def TC_14():
sln_name = "Launcher_TC_TOOL_05.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
# The `Launcher_TC_TOOL_06` application must have `TAC` applied.
-def TC_14():
+def TC_15():
sln_name = "Launcher_TC_TOOL_06.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
# The `DB` of the restored `TAC` and `TLC` must be a valid value.
-def TC_15():
+def TC_16():
sln_name = "Launcher_TC_TOOL_07.Tizen"
tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
return "PASS"
-#def TC_16():
-#dotnettool --resolve-all-app
-
#def TC_17():
-#dotnettool --ibc-dir
+#dotnettool --resolve-all-app
#def TC_18():
#dotnettool --instrument
cmd(f"shell rm {FRAMEWORK_DIR}Tizen.ni.dll")
cmd(f"shell rm {FRAMEWORK_DIR}Tizen.Log.ni.dll")
+ cmd(f"shell rm {RUNTIME_DIR}netstandard.ni.dll")
+
+ cmd(f"shell rm -rf {IBCDATA_DIR}")
# Main entry point
def main():
else:
tc_array.append(funcMap[tc_num])
else:
- tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08, TC_09, TC_10, TC_11, TC_12, TC_13, TC_14, TC_15]
+ tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08, TC_09, TC_10, TC_11, TC_12, TC_13, TC_14, TC_15, TC_16]
global serial
if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
funcMap = {
-'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04, 'TC_05': TC_05, 'TC_06': TC_06, 'TC_07': TC_07,
-'TC_08': TC_08, 'TC_09': TC_09, 'TC_10': TC_10, 'TC_11': TC_11, 'TC_12': TC_12, 'TC_13': TC_13, 'TC_14': TC_14, 'TC_15': TC_15,
-'TOOL_TC_01': TC_01, 'TOOL_TC_02': TC_02, 'TOOL_TC_03': TC_03, 'TOOL_TC_04': TC_04, 'TOOL_TC_05': TC_05, 'TOOL_TC_06': TC_06, 'TOOL_TC_07': TC_07,
-'TOOL_TC_08': TC_08, 'TOOL_TC_09': TC_09, 'TOOL_TC_10': TC_10, 'TOOL_TC_11': TC_11, 'TOOL_TC_12': TC_12, 'TOOL_TC_13': TC_13, 'TOOL_TC_14': TC_14, 'TOOL_TC_15': TC_15
+'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04, 'TC_05': TC_05,
+'TC_06': TC_06, 'TC_07': TC_07, 'TC_08': TC_08, 'TC_09': TC_09, 'TC_10': TC_10,
+'TC_11': TC_11, 'TC_12': TC_12, 'TC_13': TC_13, 'TC_14': TC_14, 'TC_15': TC_15, 'TC_16': TC_16,
+'TOOL_TC_01': TC_01, 'TOOL_TC_02': TC_02, 'TOOL_TC_03': TC_03, 'TOOL_TC_04': TC_04, 'TOOL_TC_05': TC_05,
+'TOOL_TC_06': TC_06, 'TOOL_TC_07': TC_07, 'TOOL_TC_08': TC_08, 'TOOL_TC_09': TC_09, 'TOOL_TC_10': TC_10,
+'TOOL_TC_11': TC_11, 'TOOL_TC_12': TC_12, 'TOOL_TC_13': TC_13, 'TOOL_TC_14': TC_14, 'TOOL_TC_15': TC_15, 'TOOL_TC_16': TC_16
}