From: j-h.choi Date: Mon, 4 Jan 2021 01:15:59 +0000 (+0900) Subject: [TC Added] dotnettool option(--verbose) test in TOOL X-Git-Tag: submit/tizen/20210125.003944~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69452b24e276d24e4c6fabceaceea46fd99219d4;p=platform%2Fcore%2Fdotnet%2Flauncher.git [TC Added] dotnettool option(--verbose) test in TOOL Change-Id: I4ea2cece6457750953816e2399bc2d3cacd8cc3a --- diff --git a/tests/TCs/6_TOOL/README.md b/tests/TCs/6_TOOL/README.md index a27cd5f..bfc37e1 100644 --- a/tests/TCs/6_TOOL/README.md +++ b/tests/TCs/6_TOOL/README.md @@ -66,36 +66,41 @@ launcher/tests/TCs/6_TOOL$ ./TOOL.py TC_01 ``` 1. sh-3.2# dotnettool --r2r --ni-dll /usr/share/dotnet.tizen/framework/Tizen.dll * TC_08 +``` + PASS : Displays detailed information while creating native image for Tizen.Log.dll. +``` + 1. sh-3.2# dotnettool --verbose --ni-dll /usr/share/dotnet.tizen/framework/Tizen.Log.dll +* TC_09 ``` PASS : The Launcher_TC_TOOL_01 application does not have native image. ``` 1. sh-3.2# dotnettool --ni-reset-pkg org.tizen.example.Launcher_TC_TOOL_01.Tizen -* TC_09 +* TC_10 ``` PASS : The Launcher_TC_TOOL_02 application generates native image. ``` 1. sh-3.2# dotnettool --ni-pkg org.tizen.example.Launcher_TC_TOOL_02.Tizen -* TC_10 +* TC_11 ``` PASS : The prefer_dotnet_aot metadata value of true will regenerates the native image in all .NET applications. ``` 1. sh-3.2# dotnettool --ni-regen-all-app -* TC_11 +* TC_12 ``` PASS : The prefer_nuget_cache metadata value of true will regenerates the native image in the TAC. ``` 1. sh-3.2# dotnettool --tac-regen-all -* TC_12 +* TC_13 ``` PASS : The Launcher_TC_TOOL_05 application must not have TAC applied. ``` 1. sh-3.2# dotnettool --tac-disable-pkg org.tizen.example.Launcher_TC_TOOL_05.Tizen -* TC_13 +* TC_14 ``` PASS : The Launcher_TC_TOOL_06 application must have TAC applied. ``` 1. sh-3.2# dotnettool --tac-enable-pkg org.tizen.example.Launcher_TC_TOOL_06.Tizen -* TC_14 +* TC_15 ``` PASS : The Database of the restored TAC and TLC must be a valid value. ``` diff --git a/tests/TCs/6_TOOL/TOOL.py b/tests/TCs/6_TOOL/TOOL.py index 9b3a232..915fdec 100755 --- a/tests/TCs/6_TOOL/TOOL.py +++ b/tests/TCs/6_TOOL/TOOL.py @@ -121,8 +121,18 @@ def TC_07(): return "PASS" -# The `Launcher_TC_TOOL_01` application does not have native image. +# Displays detailed information while creating native image for Tizen.Log.dll. def TC_08(): + raw = cmd(f"shell dotnettool --verbose --ni-dll {FRAMEWORK_DIR}Tizen.Log.dll") + if ("Opening input file" not in raw) or \ + ("Breakdown of Indirections" not in raw) or \ + ("Tizen.Log.ni.dll generated successfully." not in raw): + return "FAIL : Displays detailed information while creating native image for Tizen.Log.dll" + + return "PASS" + +# The `Launcher_TC_TOOL_01` application does not have native image. +def TC_09(): sln_name = "Launcher_TC_TOOL_01.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -156,7 +166,7 @@ def TC_08(): return "PASS" # The `Launcher_TC_TOOL_02` application generates native image. -def TC_09(): +def TC_10(): sln_name = "Launcher_TC_TOOL_02.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -201,7 +211,7 @@ def TC_09(): return "PASS" # The `prefer_dotnet_aot` metadata value of `true` will regenerates the native image in all .NET applications. -def TC_10(): +def TC_11(): sln_name = "Launcher_TC_TOOL_03.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -242,7 +252,7 @@ def TC_10(): return "PASS" # The `prefer_nuget_cache` metadata value of `true` will regenerates the native image in the `TAC`. -def TC_11(): +def TC_12(): sln_name = "Launcher_TC_TOOL_04.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -260,7 +270,7 @@ def TC_11(): return "PASS" # The `Launcher_TC_TOOL_05` application must not have `TAC` applied. -def TC_12(): +def TC_13(): sln_name = "Launcher_TC_TOOL_05.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -309,7 +319,7 @@ def TC_12(): return "PASS" # The `Launcher_TC_TOOL_06` application must have `TAC` applied. -def TC_13(): +def TC_14(): sln_name = "Launcher_TC_TOOL_06.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -360,7 +370,7 @@ def TC_13(): return "PASS" # The `DB` of the restored `TAC` and `TLC` must be a valid value. -def TC_14(): +def TC_15(): sln_name = "Launcher_TC_TOOL_07.Tizen" tpk_path = get_tpk_path(tpk_list, f"{sln_name}") @@ -393,20 +403,18 @@ def TC_14(): return "PASS" -#def TC_15(): +#def TC_16(): #dotnettool --resolve-all-app -#def TC_16(): +#def TC_17(): #dotnettool --ibc-dir -#def TC_17(): +#def TC_18(): #dotnettool --instrument -#def TC_18(): +#def TC_19(): #dotnettool --compatibility -#def TC_19(): -#dotnettool --verbose # Run the test def run(): @@ -432,6 +440,7 @@ def clean(): cmd(f"uninstall org.tizen.example.Launcher_TC_TOOL_07.Tizen") cmd(f"shell rm {FRAMEWORK_DIR}Tizen.ni.dll") + cmd(f"shell rm {FRAMEWORK_DIR}Tizen.Log.ni.dll") # Main entry point def main(): @@ -449,7 +458,7 @@ 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_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] global serial if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]: @@ -470,9 +479,9 @@ def main(): 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_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_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 }