1 # Test Case for dotnet-launcher - DOTNETTOOL
3 This script(TOOL.py) is a test that verifies the behavior of **dotnettool**.
4 Check each option of the dotnettool.
8 Dotnet Tool Version: 1.0
16 Must be run(./BuildTPK.py) at least once.
18 launcher/tests/Apps$ ./BuildTPK.py
21 * Run **DOTNETTOOL** test
23 launcher/tests/TCs$ ./6_TOOL/TOOL.py
24 launcher/tests/TCs/6_TOOL$ ./TOOL.py
29 launcher/tests/TCs/6_TOOL$ ./TOOL.py TC_01
35 PASS : The dotnettool works normally.
37 1. sh-3.2# dotnettool -h
40 PASS : The native image is generated normally.
42 1. sh-3.2# dotnettool --ni-system
45 PASS : Remove the platform native image.
47 1. sh-3.2# dotnettool --ni-reset-system
50 PASS : Create native image for System.Private.CoreLib.dll.
52 1. sh-3.2# dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll
55 PASS : The file name of .dll and .ni.dll must match in the framework.
57 1. sh-3.2# dotnettool --ni-dir /usr/share/dotnet.tizen/framework/
60 PASS : The .ni.dll files should not exist in the framework.
62 1. sh-3.2# dotnettool --ni-reset-dir /usr/share/dotnet.tizen/framework/
65 PASS : Create native image for Tizen.dll in R2Rmode.
67 1. sh-3.2# dotnettool --r2r --ni-dll /usr/share/dotnet.tizen/framework/Tizen.dll
70 PASS : Displays detailed information while creating native image for Tizen.Log.dll.
72 1. sh-3.2# dotnettool --verbose --ni-dll /usr/share/dotnet.tizen/framework/Tizen.Log.dll
75 PASS : Create a native image for netstandard.dll by specifying the directory containing the IBC files.
77 1. sh-3.2# dotnettool --ibc-dir /usr/share/dotnet.tizen/ibcdata/ --ni-dll /usr/share/dotnet.tizen/netcoreapp/netstandard.dll
80 PASS : The Launcher_TC_TOOL_01 application does not have native image.
82 1. sh-3.2# dotnettool --ni-reset-pkg org.tizen.example.Launcher_TC_TOOL_01.Tizen
85 PASS : The Launcher_TC_TOOL_02 application generates native image.
87 1. sh-3.2# dotnettool --ni-pkg org.tizen.example.Launcher_TC_TOOL_02.Tizen
90 PASS : The prefer_dotnet_aot metadata value of true will regenerates the native image in all .NET applications.
92 1. sh-3.2# dotnettool --ni-regen-all-app
95 PASS : The prefer_nuget_cache metadata value of true will regenerates the native image in the TAC.
97 1. sh-3.2# dotnettool --tac-regen-all
100 PASS : The Launcher_TC_TOOL_05 application must not have TAC applied.
102 1. sh-3.2# dotnettool --tac-disable-pkg org.tizen.example.Launcher_TC_TOOL_05.Tizen
105 PASS : The Launcher_TC_TOOL_06 application must have TAC applied.
107 1. sh-3.2# dotnettool --tac-enable-pkg org.tizen.example.Launcher_TC_TOOL_06.Tizen
110 PASS : The Database of the restored TAC and TLC must be a valid value.
112 1. sh-3.2# dotnettool --tac-restore-db
115 PASS : The prefer_dotnet_aot metadata value of true will regenerates the native image in all .NET applications of read-only type.
117 1. sh-3.2# dotnettool --ni-regen-all-ro-app
120 PASS : The Launcher_TC_TOOL_08 application should load the newly generated native image.
122 1. Regenerated NI files of read-only application is stored at "/opt/usr/dotnet/apps/[PkgID]/bin/.native_image/".
123 2. The assembly in the "/opt/usr/dotnet/apps/[PkgId]/bin/.native/image/" should be loaded when running the application.
126 PASS : The `Launcher_TC_TOOL_09` application of read-only type generates native image.
128 1. sh-3.2# dotnettool --ni-ro-pkg org.tizen.example.Launcher_TC_TOOL_09.Tizen
131 PASS : Print command and option while creating native image for Tizen.dll.
133 1. sh-3.2# dotnettool --ni-dll --print-cmd /usr/share/dotnet.tizen/framework/Tizen.dll
136 PASS : Create native image for netstandard.dll by adding options --inputbubble and --compilebubblegenerics.
138 1. sh-3.2# dotnettool --ni-dll --inputbubble --print-cmd /usr/share/dotnet.tizen/netcoreapp/netstandard.dll
141 PASS : Create native image for System.dll by adding options --inputbubble and --inputbubbleref.
143 1. sh-3.2# dotnettool --ni-dll --inputbubble --inputbubbleref /usr/share/dotnet.tizen/netcoreapp/crossgen2 --print-cmd /usr/share/dotnet.tizen/netcoreapp/System.dll
146 PASS : Create native image for System.Console.dll by adding option --ref.
148 1. sh-3.2# dotnettool --ni-dll --ref /usr/share/dotnet.tizen/netcoreapp:/usr/share/dotnet.tizen/netcoreapp/crossgen2 --print-cmd /usr/share/dotnet.tizen/netcoreapp/System.Console.dll
151 PASS : Create native image for mscorlib.dll by adding option --no-pipeline.
153 1. sh-3.2# dotnettool --ni-dll --no-pipeline --print-cmd /usr/share/dotnet.tizen/netcoreapp/mscorlib.dll
159 - Clone the **dotnet-launcher** repository.
160 - The prerequisites are **sdb** and **python3.6+**.
161 - The script must be run on the **host PC**.
165 sdb with a smart device selector.
167 [1] 192.168.250.250 - 0
168 [2] 002c02f56c7d6c66 - TW3
169 Select a device [1-2]: 2