int resolvePlatformSpecificFiles(const std::string& rootPath)
{
std::string appBinPath = concatPath(rootPath, "bin");
+ std::string appLibPath = concatPath(rootPath, "lib");
std::string runtimesPath = concatPath(appBinPath, "runtimes");
+ // remove unused arch directory
+ std::vector<std::string> archList = {"x86", "x64", "arm", "armel", "arm64", "aarch64", "riscv32", "riscv64"};
+ archList.erase(find(archList.begin(), archList.end(), ARCHITECTURE_IDENTIFIER));
+ if (!strncmp(ARCHITECTURE_IDENTIFIER, "armel", 5)) {
+ archList.erase(find(archList.begin(), archList.end(), "arm"));
+ } else if (!strncmp(ARCHITECTURE_IDENTIFIER, "arm64", 5)) {
+ archList.erase(find(archList.begin(), archList.end(), "aarch64"));
+ }
+
+ for (const auto &arch : archList) {
+ std::string archPath = concatPath(appLibPath, arch);
+ if (exist(archPath)) {
+ if (!removeAll(archPath)) {
+ _ERR("Failed to remove %s directory", archPath.c_str());
+ }
+ }
+ }
+
// if runtimes directory doesnot exist, return 0
if (!isDirectory(runtimesPath)) {
return 0;
--- /dev/null
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31005.135\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_PLUGIN_11", "Launcher_TC_PLUGIN_11\Launcher_TC_PLUGIN_11.csproj", "{3daa496e-195a-4708-8316-dd6207adbd9a}"\r
+EndProject\r
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{c9bd2802-b0a0-41c2-9453-e159261615bc}"\r
+ ProjectSection(SolutionItems) = preProject\r
+ tizen_workspace.yaml = tizen_workspace.yaml\r
+ EndProjectSection\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
+ {3daa496e-195a-4708-8316-dd6207adbd9a}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {3daa496e-195a-4708-8316-dd6207adbd9a}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {3daa496e-195a-4708-8316-dd6207adbd9a}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {3daa496e-195a-4708-8316-dd6207adbd9a}.Release|Any CPU.Build.0 = Release|Any CPU\r
+\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+<!--\r
+***********************************************************************************************\r
+<Build.Directory.targets>\r
+WARNING: DO NOT MODIFY this file. Incorrect changes to this file will make it\r
+ impossible to load or build your projects from the IDE.\r
+\r
+***********************************************************************************************\r
+-->\r
+\r
+<Project> \r
+ <Target Name="BuildDotnet" AfterTargets="TizenPackage" >\r
+ <Message Text="Tizen Build starts here ------------" Importance="high"/>\r
+ <Message Text="$(MSBuildProjectDirectory)" Importance="high"/>\r
+ <PropertyGroup>\r
+ <WorkspaceFolder>$([System.IO.Path]::GetDirectoryName($(MSBuildProjectDirectory)))</WorkspaceFolder>\r
+ </PropertyGroup>\r
+ <Message Text="Workspace: '$(WorkspaceFolder)'" Importance="high" />\r
+\r
+ <Exec Command="C:\tizen-studio\tools\tizen-core\tz.exe pack -S $(ProjectDir) $(WorkspaceFolder)"> </Exec>\r
+ </Target>\r
+</Project>\r
--- /dev/null
+using System;\r
+using Tizen.NUI;\r
+using Tizen.NUI.BaseComponents;\r
+\r
+namespace Launcher_TC_PLUGIN_11\r
+{\r
+ 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 NUI World");\r
+ text.HorizontalAlignment = HorizontalAlignment.Center;\r
+ text.VerticalAlignment = VerticalAlignment.Center;\r
+ text.TextColor = Color.Blue;\r
+ text.PointSize = 12.0f;\r
+ text.HeightResizePolicy = ResizePolicyType.FillToParent;\r
+ text.WidthResizePolicy = ResizePolicyType.FillToParent;\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
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>net6.0-tizen</TargetFramework>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <Folder Include="res\" />\r
+ </ItemGroup>\r
+\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" api-version="9.0" package="org.tizen.example.Launcher_TC_PLUGIN_11" version="1.0.0">
+ <profile name="common" />
+ <ui-application appid="org.tizen.example.Launcher_TC_PLUGIN_11"
+ exec="Launcher_TC_PLUGIN_11.dll"
+ type="dotnet-nui"
+ multiple="false"
+ taskmanage="true"
+ nodisplay="false"
+ launch_mode="single"
+ api-version="12">
+ <label>Launcher_TC_PLUGIN_11</label>
+ <icon>Launcher_TC_PLUGIN_11.png</icon>
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
+ </ui-application>
+</manifest>
--- /dev/null
+# csproj file path
+csproj_file: Launcher_TC_PLUGIN_11.csproj
+
+# files monitored for dirty/modified status
+files:
+ - Launcher_TC_PLUGIN_11.csproj
+ - Launcher_TC_PLUGIN_11.cs
+ - tizen-manifest.xml
+ - shared/res/Launcher_TC_PLUGIN_11.png
\ No newline at end of file
return "PASS"
+# The `Launcher_TC_PLUGIN_11` application should not have a library of other architecture.
+def TC_11():
+ sln_name = "Launcher_TC_PLUGIN_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_PLUGIN_11"
+
+ root_path = get_root_path(f"{pkg_id}")
+ if root_path == "None":
+ return f"FAIL : Get the root path for {pkg_id}"
+
+ device_abi = get_device_abi()
+ if "arm_32" == device_abi:
+ if not exist(f"{root_path}/lib/arm") or \
+ not exist(f"{root_path}/lib/armel") or \
+ exist(f"{root_path}/lib/aarch64") or \
+ exist(f"{root_path}/lib/arm64") or \
+ exist(f"{root_path}/lib/riscv32") or \
+ exist(f"{root_path}/lib/riscv64") or \
+ exist(f"{root_path}/lib/x64") or \
+ exist(f"{root_path}/lib/x86"):
+ return "FAIL"
+ elif "arm_64" == device_abi:
+ if exist(f"{root_path}/lib/arm") or \
+ exist(f"{root_path}/lib/armel") or \
+ not exist(f"{root_path}/lib/aarch64") or \
+ not exist(f"{root_path}/lib/arm64") or \
+ exist(f"{root_path}/lib/riscv32") or \
+ exist(f"{root_path}/lib/riscv64") or \
+ exist(f"{root_path}/lib/x64") or \
+ exist(f"{root_path}/lib/x86"):
+ return "FAIL"
+ elif "riscv_32" == device_abi:
+ if exist(f"{root_path}/lib/arm") or \
+ exist(f"{root_path}/lib/armel") or \
+ exist(f"{root_path}/lib/aarch64") or \
+ exist(f"{root_path}/lib/arm64") or \
+ not exist(f"{root_path}/lib/riscv32") or \
+ exist(f"{root_path}/lib/riscv64") or \
+ exist(f"{root_path}/lib/x64") or \
+ exist(f"{root_path}/lib/x86"):
+ return "FAIL"
+ elif "riscv_64" == device_abi:
+ if exist(f"{root_path}/lib/arm") or \
+ exist(f"{root_path}/lib/armel") or \
+ exist(f"{root_path}/lib/aarch64") or \
+ exist(f"{root_path}/lib/arm64") or \
+ exist(f"{root_path}/lib/riscv32") or \
+ not exist(f"{root_path}/lib/riscv64") or \
+ exist(f"{root_path}/lib/x64") or \
+ exist(f"{root_path}/lib/x86"):
+ return "FAIL"
+ elif "x86_64" == device_abi:
+ if exist(f"{root_path}/lib/arm") or \
+ exist(f"{root_path}/lib/armel") or \
+ exist(f"{root_path}/lib/aarch64") or \
+ exist(f"{root_path}/lib/arm64") or \
+ exist(f"{root_path}/lib/riscv32") or \
+ exist(f"{root_path}/lib/riscv64") or \
+ not exist(f"{root_path}/lib/x64") or \
+ exist(f"{root_path}/lib/x86"):
+ return "FAIL"
+ elif "x86" == device_abi:
+ if exist(f"{root_path}/lib/arm") or \
+ exist(f"{root_path}/lib/armel") or \
+ exist(f"{root_path}/lib/aarch64") or \
+ exist(f"{root_path}/lib/arm64") or \
+ exist(f"{root_path}/lib/riscv32") or \
+ exist(f"{root_path}/lib/riscv64") or \
+ exist(f"{root_path}/lib/x64") or \
+ not exist(f"{root_path}/lib/x86"):
+ return "FAIL"
+ else:
+ return "NONE - TC_11 is not supported on this platform"
+
+
+ return "PASS"
+
# Run the test
def run():
cmd(f"root on")
cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_08.Tizen")
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")
# Main entry point
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_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08, TC_09, TC_10, TC_11]
global serial
if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
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_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_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
}
line = [l for l in raw.splitlines() if "cpu_arch" in l]
return line[0].split(":")[1]
+# Get the device abi
+def get_device_abi():
+ raw = cmd("capability")
+ line = [l for l in raw.splitlines() if "core_abi" in l]
+ return line[0].split(":")[1]
+
# Check the library type
def check_library_arch(rootpath, library):
raw = cmd(f"pull {rootpath}/bin/{library} {library}")