Check the SPC before creating a native image for the app
[platform/core/dotnet/launcher.git] / tests / TCs / 1_AOT / README.md
1 # Test Case for dotnet-launcher - AOT
2
3 This script(AOT.py) is a test that verifies the behavior of **prefer_dotnet_aot** metadata.
4 ```
5 <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
6 <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="false" />
7 ```
8
9 ### Usage
10
11 * Build tpk
12
13   Must be run(./BuildTPK.py) at least once.
14 ```
15 launcher/tests/Apps$ ./BuildTPK.py
16 ```
17
18 * Run **AOT** test
19 ```
20 launcher/tests/TCs$ ./1_AOT/AOT.py
21 launcher/tests/TCs/1_AOT$ ./AOT.py
22 ```
23
24 * Run individual test
25 ```
26 launcher/tests/TCs/1_AOT$ ./AOT.py TC_01
27 ```
28
29 ### Description
30 * TC_01
31 ```
32   PASS : The Launcher_TC_AOT_01 application does not generate native image.
33 ```
34   1. The `System.Private.CoreLib.ni.dll`(SPC.dll.Backup) file exists.
35   2. There is no `prefer_dotnet_aot` metadata in the manifest.
36   3. The `.native_image` folder and `.ni.dll` files do not exist.
37 * TC_02
38 ```
39   PASS : The Launcher_TC_AOT_02 application generates native image when the SPC.ni.dll exists.
40 ```
41   1. The `System.Private.CoreLib.ni.dll`(SPC.dll.Backup) file exists.
42   2. The `prefer_dotnet_aot` metadata value is `true` in the manifest.
43   3. The `.native_image` folder and `.ni.dll` files exist.
44   4. The number of `.dll` files and the number of `.ni.dll` files in the application are the same.
45   5. The file names of `.dll` and `.ni.dll` must match in the application.
46 * TC_03
47 ```
48   PASS : The Launcher_TC_AOT_03 application does not generate native image when the SPC.ni.dll doesn't exist.
49 ```
50   1. The `System.Private.CoreLib.ni.dll`(SPC.dll.Backup) file does not exist.
51   2. The `prefer_dotnet_aot` metadata value is `true` in the manifest.
52   3. The `.native_image` folder and `.ni.dll` files do  exist.
53 ----
54
55 ### Note
56
57 * Precondition
58   - Clone the **dotnet-launcher** repository.
59   - The prerequisites are **sdb** and **python3.6+**.
60   - The script must be run on the **host PC**.
61
62 * SDBs
63
64     sdb with a smart device selector.
65 ```
66 [1] 192.168.250.250 - 0
67 [2] 002c02f56c7d6c66 - TW3
68 Select a device [1-2]: 2
69 ```