Add TCs(rpk_aot, lib_folder_tlc, .res_mount_folder_create)
authorj-h.choi <j-h.choi@samsung.com>
Fri, 8 Nov 2024 06:53:39 +0000 (15:53 +0900)
committerWoongsuk <ws77.cho@samsung.com>
Wed, 4 Jun 2025 06:53:34 +0000 (15:53 +0900)
Change-Id: I45887299314fbf57fddd2540819206936b439350

20 files changed:
tests/Apps/BuildTPK.py
tests/Apps/Launcher_TC_AOT_04/org.tizen.example.Launcher_TC_AOT_04-1.0.0.rpk [new file with mode: 0755]
tests/Apps/Launcher_TC_AOT_04/res/allowed/tizen.sample.resource/Launcher_TC_AOT_04.dll [new file with mode: 0755]
tests/Apps/Launcher_TC_AOT_04/shared/res/Launcher_TC_AOT_04.png [new file with mode: 0755]
tests/Apps/Launcher_TC_AOT_04/tizen-manifest.xml [new file with mode: 0755]
tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12.sln [new file with mode: 0755]
tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12.csproj [new file with mode: 0755]
tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/Main.cs [new file with mode: 0755]
tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/shared/res/Launcher_TC_PLUGIN_12.png [new file with mode: 0755]
tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/tizen-manifest.xml [new file with mode: 0755]
tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11.sln [new file with mode: 0755]
tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/Launcher_TC_TLC_11.csproj [new file with mode: 0755]
tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/Main.cs [new file with mode: 0755]
tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/lib/libtest.so [new file with mode: 0755]
tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/shared/res/Launcher_TC_TLC_11.png [new file with mode: 0755]
tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/tizen-manifest.xml [new file with mode: 0755]
tests/TCs/1_AOT/AOT.py
tests/TCs/2_PLUGIN/PLUGIN.py
tests/TCs/5_TLC/TLC.py
tests/TCs/Utils.py

index b74baa2a01ab74f6e44bb14487bf026bc08bd09c..7dc92da20c8809b04970195082fc628f20cd36a5 100755 (executable)
@@ -61,6 +61,11 @@ def rename_tpk(slnname, filepath):
     subprocess.run((f"mv {filepath} {new_filepath}").split(), encoding="utf-8", stdout=subprocess.PIPE).stdout
     return new_filepath
 
+# Copy the rpk app
+def copy_rpk():
+    subprocess.run((f"cp Launcher_TC_AOT_04/org.tizen.example.Launcher_TC_AOT_04-1.0.0.rpk .").split(), encoding="utf-8", stdout=subprocess.PIPE).stdout
+    print(f"Copy complete : org.tizen.example.Launcher_TC_AOT_04-1.0.0.rpk")
+
 # Main entry point
 def main():
     parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter)
@@ -74,6 +79,7 @@ def main():
     else:
         sln_lists = get_sln_list("./", args.rebuild)
 
+    copy_rpk()
     build_tpk(sorted(sln_lists))
 
 
diff --git a/tests/Apps/Launcher_TC_AOT_04/org.tizen.example.Launcher_TC_AOT_04-1.0.0.rpk b/tests/Apps/Launcher_TC_AOT_04/org.tizen.example.Launcher_TC_AOT_04-1.0.0.rpk
new file mode 100755 (executable)
index 0000000..6f55fba
Binary files /dev/null and b/tests/Apps/Launcher_TC_AOT_04/org.tizen.example.Launcher_TC_AOT_04-1.0.0.rpk differ
diff --git a/tests/Apps/Launcher_TC_AOT_04/res/allowed/tizen.sample.resource/Launcher_TC_AOT_04.dll b/tests/Apps/Launcher_TC_AOT_04/res/allowed/tizen.sample.resource/Launcher_TC_AOT_04.dll
new file mode 100755 (executable)
index 0000000..8729f15
Binary files /dev/null and b/tests/Apps/Launcher_TC_AOT_04/res/allowed/tizen.sample.resource/Launcher_TC_AOT_04.dll differ
diff --git a/tests/Apps/Launcher_TC_AOT_04/shared/res/Launcher_TC_AOT_04.png b/tests/Apps/Launcher_TC_AOT_04/shared/res/Launcher_TC_AOT_04.png
new file mode 100755 (executable)
index 0000000..9765b1b
Binary files /dev/null and b/tests/Apps/Launcher_TC_AOT_04/shared/res/Launcher_TC_AOT_04.png differ
diff --git a/tests/Apps/Launcher_TC_AOT_04/tizen-manifest.xml b/tests/Apps/Launcher_TC_AOT_04/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..0f6b003
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="9.0" package="org.tizen.example.Launcher_TC_AOT_04" res-type="tizen.sample.resource" res-version="1.5.0" version="1.0.0">
+    <icon>Launcher_TC_AOT_04.png</icon>
+    <label>Launcher_TC_AOT_04</label>
+    <allowed-package id="org.tizen.example.*"/>
+    <metadata key="http://tizen.org/metadata/ui-gadget/dll" value="Launcher_TC_AOT_04.dll" />
+    <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+</manifest>
diff --git a/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12.sln b/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12.sln
new file mode 100755 (executable)
index 0000000..aae8364
--- /dev/null
@@ -0,0 +1,27 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 17\r
+VisualStudioVersion = 17.11.35327.3\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_PLUGIN_12", "Launcher_TC_PLUGIN_12\Launcher_TC_PLUGIN_12.csproj", "{17B31F7B-A019-4198-94F2-189419DA239F}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {17B31F7B-A019-4198-94F2-189419DA239F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {17B31F7B-A019-4198-94F2-189419DA239F}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {17B31F7B-A019-4198-94F2-189419DA239F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\r
+               {17B31F7B-A019-4198-94F2-189419DA239F}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {17B31F7B-A019-4198-94F2-189419DA239F}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {17B31F7B-A019-4198-94F2-189419DA239F}.Release|Any CPU.Deploy.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+               SolutionGuid = {576BD8A2-5349-4FCF-A323-CE5526FD57C8}\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12.csproj b/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12.csproj
new file mode 100755 (executable)
index 0000000..d01402f
--- /dev/null
@@ -0,0 +1,6 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net6.0-tizen8.0</TargetFramework>
+    <OutputType>Exe</OutputType>
+  </PropertyGroup>
+</Project>
diff --git a/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/Main.cs b/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/Main.cs
new file mode 100755 (executable)
index 0000000..d57a457
--- /dev/null
@@ -0,0 +1,52 @@
+using System;\r
+\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+\r
+namespace Launcher_TC_PLUGIN_12\r
+{\r
+    internal class Program : NUIApplication\r
+    {\r
+        protected override void OnCreate()\r
+        {\r
+            base.OnCreate();\r
+            Initialize();\r
+        }\r
+\r
+        void Initialize()\r
+        {\r
+            Window.Instance.KeyEvent += OnKeyEvent;\r
+\r
+            TextLabel text = new TextLabel("Hello Tizen")\r
+            {\r
+                HorizontalAlignment = HorizontalAlignment.Center,\r
+                VerticalAlignment = VerticalAlignment.Center,\r
+                TextColor = Color.Blue,\r
+                PointSize = 12.0f,\r
+                HeightResizePolicy = ResizePolicyType.FillToParent,\r
+                WidthResizePolicy = ResizePolicyType.FillToParent\r
+            };\r
+            Window.Instance.GetDefaultLayer().Add(text);\r
+\r
+            Animation animation = new Animation(2000);\r
+            animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 0, 500);\r
+            animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000);\r
+            animation.Looping = true;\r
+            animation.Play();\r
+        }\r
+\r
+        public void OnKeyEvent(object sender, Window.KeyEventArgs e)\r
+        {\r
+            if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))\r
+            {\r
+                Exit();\r
+            }\r
+        }\r
+\r
+        static void Main(string[] args)\r
+        {\r
+            var app = new Program();\r
+            app.Run(args);\r
+        }\r
+    }\r
+}\r
diff --git a/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/shared/res/Launcher_TC_PLUGIN_12.png b/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/shared/res/Launcher_TC_PLUGIN_12.png
new file mode 100755 (executable)
index 0000000..9f3cb98
Binary files /dev/null and b/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/shared/res/Launcher_TC_PLUGIN_12.png differ
diff --git a/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/tizen-manifest.xml b/tests/Apps/Launcher_TC_PLUGIN_12/Launcher_TC_PLUGIN_12/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..e2d25d6
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="8" package="org.tizen.example.Launcher_TC_PLUGIN_12" version="1.0.0">
+  <profile name="common" />
+  <ui-application appid="org.tizen.example.Launcher_TC_PLUGIN_12"
+          exec="Launcher_TC_PLUGIN_12.dll"
+          type="dotnet"
+          multiple="false"
+          taskmanage="true"
+          nodisplay="false"
+          launch_mode="single">
+    <label>Launcher_TC_PLUGIN_12</label>
+    <icon>Launcher_TC_PLUGIN_12.png</icon>
+    <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+    <res-control resource-type="tizen.sample.resource" min-res-version="1.0.0" max-res-version="2.0.0" auto-close="false"></res-control>
+  </ui-application>
+</manifest>
diff --git a/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11.sln b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11.sln
new file mode 100755 (executable)
index 0000000..12764d6
--- /dev/null
@@ -0,0 +1,27 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 17\r
+VisualStudioVersion = 17.11.35327.3\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_TLC_11", "Launcher_TC_TLC_11\Launcher_TC_TLC_11.csproj", "{2977BA09-D3BC-4B80-BD0C-799954A3E160}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Any CPU = Debug|Any CPU\r
+               Release|Any CPU = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {2977BA09-D3BC-4B80-BD0C-799954A3E160}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+               {2977BA09-D3BC-4B80-BD0C-799954A3E160}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+               {2977BA09-D3BC-4B80-BD0C-799954A3E160}.Debug|Any CPU.Deploy.0 = Debug|Any CPU\r
+               {2977BA09-D3BC-4B80-BD0C-799954A3E160}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+               {2977BA09-D3BC-4B80-BD0C-799954A3E160}.Release|Any CPU.Build.0 = Release|Any CPU\r
+               {2977BA09-D3BC-4B80-BD0C-799954A3E160}.Release|Any CPU.Deploy.0 = Release|Any CPU\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+       GlobalSection(ExtensibilityGlobals) = postSolution\r
+               SolutionGuid = {1E2E3A50-FE17-48ED-B8C7-409FBB2535F1}\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/Launcher_TC_TLC_11.csproj b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/Launcher_TC_TLC_11.csproj
new file mode 100755 (executable)
index 0000000..1b4ca73
--- /dev/null
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+  <PropertyGroup>
+    <TargetFramework>net6.0-tizen8.0</TargetFramework>
+    <OutputType>Exe</OutputType>
+  </PropertyGroup>
+  <ItemGroup>\r
+    <PackageReference Include="SkiaSharp" Version="2.88.9" />\r
+  </ItemGroup>
+</Project>
diff --git a/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/Main.cs b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/Main.cs
new file mode 100755 (executable)
index 0000000..ec4dcba
--- /dev/null
@@ -0,0 +1,52 @@
+using System;\r
+\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+\r
+namespace Launcher_TC_TLC_11\r
+{\r
+    internal class Program : NUIApplication\r
+    {\r
+        protected override void OnCreate()\r
+        {\r
+            base.OnCreate();\r
+            Initialize();\r
+        }\r
+\r
+        void Initialize()\r
+        {\r
+            Window.Instance.KeyEvent += OnKeyEvent;\r
+\r
+            TextLabel text = new TextLabel("Hello Tizen")\r
+            {\r
+                HorizontalAlignment = HorizontalAlignment.Center,\r
+                VerticalAlignment = VerticalAlignment.Center,\r
+                TextColor = Color.Blue,\r
+                PointSize = 12.0f,\r
+                HeightResizePolicy = ResizePolicyType.FillToParent,\r
+                WidthResizePolicy = ResizePolicyType.FillToParent\r
+            };\r
+            Window.Instance.GetDefaultLayer().Add(text);\r
+\r
+            Animation animation = new Animation(2000);\r
+            animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 0, 500);\r
+            animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000);\r
+            animation.Looping = true;\r
+            animation.Play();\r
+        }\r
+\r
+        public void OnKeyEvent(object sender, Window.KeyEventArgs e)\r
+        {\r
+            if (e.Key.State == Key.StateType.Down && (e.Key.KeyPressedName == "XF86Back" || e.Key.KeyPressedName == "Escape"))\r
+            {\r
+                Exit();\r
+            }\r
+        }\r
+\r
+        static void Main(string[] args)\r
+        {\r
+            var app = new Program();\r
+            app.Run(args);\r
+        }\r
+    }\r
+}\r
diff --git a/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/lib/libtest.so b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/lib/libtest.so
new file mode 100755 (executable)
index 0000000..b898f33
--- /dev/null
@@ -0,0 +1 @@
+libtest
\ No newline at end of file
diff --git a/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/shared/res/Launcher_TC_TLC_11.png b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/shared/res/Launcher_TC_TLC_11.png
new file mode 100755 (executable)
index 0000000..9f3cb98
Binary files /dev/null and b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/shared/res/Launcher_TC_TLC_11.png differ
diff --git a/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/tizen-manifest.xml b/tests/Apps/Launcher_TC_TLC_11/Launcher_TC_TLC_11/tizen-manifest.xml
new file mode 100755 (executable)
index 0000000..9dac64b
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="8" package="org.tizen.example.Launcher_TC_TLC_11" version="1.0.0">
+  <profile name="common" />
+  <ui-application appid="org.tizen.example.Launcher_TC_TLC_11"
+          exec="Launcher_TC_TLC_11.dll"
+          type="dotnet"
+          multiple="false"
+          taskmanage="true"
+          nodisplay="false"
+          launch_mode="single">
+    <label>Launcher_TC_TLC_11</label>
+    <icon>Launcher_TC_TLC_11.png</icon>
+    <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+    <metadata key="http://tizen.org/metadata/prefer_nuget_cache" value="true" />
+  </ui-application>
+</manifest>
index ee704bc65657fdabdecc497cb64a20942cdd4eac..3ecd91e708ff01f8191935298284d6101f7f772b 100755 (executable)
@@ -110,6 +110,44 @@ def TC_03():
 
     return "PASS"
 
+# The `Launcher_TC_AOT_04` resource package generates native image when the SPC.ni.dll exists.
+def TC_04():
+    sln_name = "Launcher_TC_AOT_04"
+
+    tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
+    if tpk_path == None:
+        return f"FAIL : Get the tpk path for {sln_name}"
+
+    if "OK" not in app_install(f"{tpk_path}", True):
+        return f"FAIL : Install the application for {tpk_path}"
+
+    pkg_id = "org.tizen.example.Launcher_TC_AOT_04"
+
+    root_path = get_root_path(f"{pkg_id}")
+    if root_path == "None":
+        return f"FAIL : Get the root path for {pkg_id}"
+
+    if exist(f"{root_path}/res/allowed/tizen.sample.resource/.native_image"):
+        return "FAIL : The .native_image folder should not exist"
+
+    raw = cmd(f"shell find {root_path}/res/allowed/tizen.sample.resource/ -name *.ni.dll")
+    lines1 = [l for l in raw.splitlines()]
+    raw = cmd(f"shell find {root_path}/res/allowed/tizen.sample.resource/ -maxdepth 1 -name *.dll -not -name *.ni.dll")
+    lines2 = [l for l in raw.splitlines()]
+    if len(lines1) != len(lines2):
+        return "FAIL : The number of .dll and .ni.dll must match in the application"
+
+    for ni in lines1:
+        is_same = False
+        for dll in lines2:
+            if Path(ni).name.replace(".ni.dll", "") == Path(dll).name.replace(".dll", ""):
+                is_same = True
+                break
+        if not is_same:
+            return "FAIL : The file name of .dll and .ni.dll must match in the application"
+
+    return "PASS"
+
 # Run the test
 def run():
     cmd(f"root on")
@@ -135,6 +173,7 @@ def clean():
     cmd(f"uninstall org.tizen.example.Launcher_TC_AOT_01.Tizen")
     cmd(f"uninstall org.tizen.example.Launcher_TC_AOT_02.Tizen")
     cmd(f"uninstall org.tizen.example.Launcher_TC_AOT_03.Tizen")
+    cmd(f"uninstall org.tizen.example.Launcher_TC_AOT_04")
 
     create_spc_ni()
 
@@ -174,8 +213,8 @@ def main():
 
 
 funcMap = {
-'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03,
-'AOT_TC_01': TC_01, 'AOT_TC_02': TC_02, 'AOT_TC_03': TC_03
+'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04,
+'AOT_TC_01': TC_01, 'AOT_TC_02': TC_02, 'AOT_TC_03': TC_03, 'AOT_TC_04': TC_04
 }
 
 
index be55dceb9887344e4157a94ead31bfe59e938694..5ae95c1f4104cb4b34e785c6ff49c51a71bc8e60 100755 (executable)
@@ -387,6 +387,29 @@ def TC_11():
 
     return "PASS"
 
+
+# The Launcher_TC_PLUGIN_12 application must have a .res_mount folder.
+def TC_12():
+    sln_name = "Launcher_TC_PLUGIN_12"
+
+    tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
+    if tpk_path == None:
+        return f"FAIL : Get the tpk path for {sln_name}"
+
+    if "OK" not in app_install(f"{tpk_path}"):
+        return f"FAIL : Install the application for {tpk_path}"
+
+    pkg_id = f"org.tizen.example.Launcher_TC_PLUGIN_12"
+
+    root_path = get_root_path(f"{pkg_id}")
+    if root_path == "None":
+        return f"FAIL : Get the root path for {pkg_id}"
+
+    if not exist(f"{root_path}/bin/.res_mount"):
+        return "FAIL : The .res_mount folder should exist"
+
+    return "PASS"
+
 # Run the test
 def run():
     cmd(f"root on")
@@ -420,6 +443,7 @@ def clean():
     cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_09.Tizen")
     cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_10.Tizen")
     cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_11")
+    cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_12")
 
 # Main entry point
 def main():
@@ -437,7 +461,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_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]
 
     global serial
     if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
@@ -457,10 +481,10 @@ 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,
-'PLUGIN_TC_01': TC_01, 'PLUGIN_TC_02': TC_02, 'PLUGIN_TC_03': TC_03, 'PLUGIN_TC_04': TC_04, 'PLUGIN_TC_05': TC_05,
-'PLUGIN_TC_06': TC_06, 'PLUGIN_TC_07': TC_07, 'PLUGIN_TC_08': TC_08, 'PLUGIN_TC_09': TC_09, 'PLUGIN_TC_10': TC_10, 'PLUGIN_TC_11': TC_11
+'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,
+'PLUGIN_TC_01': TC_01, 'PLUGIN_TC_02': TC_02, 'PLUGIN_TC_03': TC_03, 'PLUGIN_TC_04': TC_04, 'PLUGIN_TC_05': TC_05, 'PLUGIN_TC_06': TC_06,
+'PLUGIN_TC_07': TC_07, 'PLUGIN_TC_08': TC_08, 'PLUGIN_TC_09': TC_09, 'PLUGIN_TC_10': TC_10, 'PLUGIN_TC_11': TC_11, 'PLUGIN_TC_12': TC_12
 }
 
 
index c958103bde361ba076649500a12ce5a8bf4b2950..11ab974600fd10eb6ad5ff0ca1a6616e7aca1b1d 100755 (executable)
@@ -565,6 +565,42 @@ def TC_09():
 
     return "PASS"
 
+# The `Launcher_TC_TLC_01` application must have TLC applied.
+def TC_10():
+    if not check_tc_support():
+        return "NONE - TC_10 is not supported on this platform"
+
+    sln_name = "Launcher_TC_TLC_11"
+
+    tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
+    if tpk_path == None:
+        return f"FAIL : Get the tpk path for {sln_name}"
+
+    if "OK" not in app_install(f"{tpk_path}"):
+        return f"FAIL : Install the application for {tpk_path}"
+
+    pkg_id = f"org.tizen.example.Launcher_TC_TLC_11"
+
+    root_path = get_root_path(f"{pkg_id}")
+    if root_path == "None":
+        return f"FAIL : Get the root path for {pkg_id}"
+
+    if not exist(f"{root_path}/lib/libtest.so"):
+        return "FAIL : The libtest.so library should exist in the application"
+
+    raw = cmd(f"shell ls -alZ {root_path}/lib/libtest.so")
+    if (f"{root_path}/lib/libtest.so" not in raw) or \
+       (f"{DOTNET_DIR}Libraries/libtest.so.." not in raw):
+        return "FAIL : The libtest.so library should exist or be a symbolic link"
+
+    sha = raw.split("..")[1].rstrip()
+
+    raw = cmd(f"shell find {DOTNET_DIR}Libraries/ -name libtest.so*")
+    if sha not in raw:
+        return f"FAIL : The libtest.so library should exist in {DOTNET_DIR}Libraries"
+
+    return "PASS"
+
 # Run the test
 def run():
     cmd(f"root on")
@@ -593,6 +629,7 @@ def clean():
     cmd(f"uninstall org.tizen.example.Launcher_TC_TLC_08.Tizen")
     cmd(f"uninstall org.tizen.example.Launcher_TC_TLC_09.Tizen")
     cmd(f"uninstall org.tizen.example.Launcher_TC_TLC_10.Tizen")
+    cmd(f"uninstall org.tizen.example.Launcher_TC_TLC_11")
 
 # Main entry point
 def main():
@@ -610,7 +647,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_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08, TC_09, TC_10]
 
     global serial
     if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
@@ -630,9 +667,9 @@ def main():
 
 
 funcMap = {
-'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_02_03, 'TC_04': TC_04, 'TC_05': TC_04_05, 'TC_06': TC_04_05_06, 'TC_07': TC_07, 'TC_08': TC_08, 'TC_09': TC_09,
+'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_02_03, 'TC_04': TC_04, 'TC_05': TC_04_05, 'TC_06': TC_04_05_06, 'TC_07': TC_07, 'TC_08': TC_08, 'TC_09': TC_09, 'TC_10': TC_10,
 'TLC_TC_01': TC_01, 'TLC_TC_02': TC_02, 'TLC_TC_03': TC_02_03, 'TLC_TC_04': TC_04, 'TLC_TC_05': TC_04_05,
-'TLC_TC_06': TC_04_05_06, 'TLC_TC_07': TC_07, 'TLC_TC_08': TC_08, 'TLC_TC_09': TC_09
+'TLC_TC_06': TC_04_05_06, 'TLC_TC_07': TC_07, 'TLC_TC_08': TC_08, 'TLC_TC_09': TC_09, 'TLC_TC_10': TC_10
 }
 
 
index e3028543fcb3596d4a05030d2410bb8c63daa0d8..99618cb7383f0bfd55034bb3263a40486761cca5 100755 (executable)
@@ -64,7 +64,7 @@ def search_tpk(module, dirname=None):
             search_tpk(module, full_filename)
         else:
             ext = os.path.splitext(full_filename)[-1]
-            if ext == ".tpk" and f"{module}" in full_filename:
+            if ext == ".tpk" or ext == ".rpk" and f"{module}" in full_filename:
                 tpk_lists.append(full_filename)
     return tpk_lists
 
@@ -76,13 +76,16 @@ def get_tpk_path(tpk_list, sln_name):
     return None
 
 # Install the application
-def app_install(tpk_path):
+def app_install(tpk_path, isRpk=False):
     raw = cmd(f"push {tpk_path} {OWNER_DIR}")
     if "1 file(s) pushed. 0 file(s) skipped." not in raw:
         return "FAIL"
 
     tpk_name = Path(tpk_path).name
-    raw = cmd(f"shell pkgcmd -i -t tpk -p {OWNER_DIR}{tpk_name}")
+    if (isRpk):
+        raw = cmd(f"shell pkgcmd -i -t rpk -p {OWNER_DIR}{tpk_name}")
+    else:
+        raw = cmd(f"shell pkgcmd -i -t tpk -p {OWNER_DIR}{tpk_name}")
     if "key[end] val[ok]" not in raw:
         cmd(f"shell rm {OWNER_DIR}{tpk_name}")
         return "FAIL"