# Test Case for dotnet-launcher - DOTNETTOOL This script(TOOL.py) is a test that verifies the behavior of **dotnettool**. Check each option of the dotnettool. ``` sh-3.2# dotnettool -h Dotnet Tool Version: 1.0 ... ``` ### Usage * Build tpk Must be run(./BuildTPK.py) at least once. ``` launcher/tests/Apps$ ./BuildTPK.py ``` * Run **DOTNETTOOL** test ``` launcher/tests/TCs$ ./6_TOOL/TOOL.py launcher/tests/TCs/6_TOOL$ ./TOOL.py ``` * Run individual test ``` launcher/tests/TCs/6_TOOL$ ./TOOL.py TC_01 ``` ### Description * TC_01 ``` PASS : The dotnettool works normally. ``` 1. sh-3.2# dotnettool -h * TC_02 ``` PASS : The native image is generated normally. ``` 1. sh-3.2# dotnettool --ni-system * TC_03 ``` PASS : Remove the platform native image. ``` 1. sh-3.2# dotnettool --ni-reset-system * TC_04 ``` PASS : Create native image for System.Private.CoreLib.dll. ``` 1. sh-3.2# dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll * TC_05 ``` PASS : The file name of .dll and .ni.dll must match in the framework. ``` 1. sh-3.2# dotnettool --ni-dir /usr/share/dotnet.tizen/framework/ * TC_06 ``` PASS : The .ni.dll files should not exist in the framework. ``` 1. sh-3.2# dotnettool --ni-reset-dir /usr/share/dotnet.tizen/framework/ * TC_07 ``` PASS : Create native image for Tizen.dll in R2Rmode. ``` 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 : Create a native image for netstandard.dll by specifying the directory containing the IBC files. ``` 1. sh-3.2# dotnettool --ibc-dir /usr/share/dotnet.tizen/ibcdata/ --ni-dll /usr/share/dotnet.tizen/netcoreapp/netstandard.dll * TC_10 ``` 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_11 ``` 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_12 ``` 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_13 ``` 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_14 ``` 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_15 ``` 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_16 ``` PASS : The Database of the restored TAC and TLC must be a valid value. ``` 1. sh-3.2# dotnettool --tac-restore-db * TC_17 ``` PASS : The prefer_dotnet_aot metadata value of true will regenerates the native image in all .NET applications of read-only type. ``` 1. sh-3.2# dotnettool --ni-regen-all-ro-app * TC_18 ``` PASS : The Launcher_TC_TOOL_08 application should load the newly generated native image. ``` 1. Regenerated NI files of read-only application is stored at "/opt/usr/dotnet/apps/[PkgID]/bin/.native_image/". 2. The assembly in the "/opt/usr/dotnet/apps/[PkgId]/bin/.native/image/" should be loaded when running the application. * TC_19 ``` PASS : The `Launcher_TC_TOOL_09` application of read-only type generates native image. ``` 1. sh-3.2# dotnettool --ni-ro-pkg org.tizen.example.Launcher_TC_TOOL_09.Tizen * TC_20 ``` PASS : Print command and option while creating native image for Tizen.dll. ``` 1. sh-3.2# dotnettool --ni-dll --print-cmd /usr/share/dotnet.tizen/framework/Tizen.dll * TC_21 ``` PASS : Create native image for netstandard.dll by adding options --inputbubble and --compilebubblegenerics. ``` 1. sh-3.2# dotnettool --ni-dll --inputbubble --print-cmd /usr/share/dotnet.tizen/netcoreapp/netstandard.dll * TC_22 ``` PASS : Create native image for System.dll by adding options --inputbubble and --inputbubbleref. ``` 1. sh-3.2# dotnettool --ni-dll --inputbubble --inputbubbleref /usr/share/dotnet.tizen/netcoreapp/crossgen2 --print-cmd /usr/share/dotnet.tizen/netcoreapp/System.dll * TC_23 ``` PASS : Create native image for System.Console.dll by adding option --ref. ``` 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 * TC_24 ``` PASS : Create native image for mscorlib.dll by adding option --no-pipeline. ``` 1. sh-3.2# dotnettool --ni-dll --no-pipeline --print-cmd /usr/share/dotnet.tizen/netcoreapp/mscorlib.dll ---- ### Note * Precondition - Clone the **dotnet-launcher** repository. - The prerequisites are **sdb** and **python3.6+**. - The script must be run on the **host PC**. * SDBs sdb with a smart device selector. ``` [1] 192.168.250.250 - 0 [2] 002c02f56c7d6c66 - TW3 Select a device [1-2]: 2 ```