From a1a878190e4ad9fdd6085bd9ba79029b72e9b7ae Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com> Date: Wed, 3 Feb 2021 17:50:34 +0100 Subject: [PATCH] ohos-xtc-acts: Integrate OHOS snapshot ohos-xtc-acts is the starting point the porting of OHOS Application Compatibility Test Suite to Linux. Build a single initial test with make instead of OHOS specific and unusable BUILD.gn file. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com> --- .../0001-Add-makefile-based-on-zmk.patch | 56 +++++++++++++++++++ .../ohos-xts-acts/ohos-xts-acts_git.bb | 13 +++++ 2 files changed, 69 insertions(+) create mode 100644 meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts/0001-Add-makefile-based-on-zmk.patch create mode 100644 meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts_git.bb diff --git a/meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts/0001-Add-makefile-based-on-zmk.patch b/meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts/0001-Add-makefile-based-on-zmk.patch new file mode 100644 index 00000000..73240cd0 --- /dev/null +++ b/meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts/0001-Add-makefile-based-on-zmk.patch @@ -0,0 +1,56 @@ +From 6d6cd9463f97ab8e021798bd313655fad5802179 Mon Sep 17 00:00:00 2001 +From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com> +Date: Thu, 28 Jan 2021 14:25:09 +0100 +Subject: [PATCH] Add makefile based on zmk + +The makefile defines ActsDacTest.bin + +Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com> +--- + GNUmakefile | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + create mode 100644 GNUmakefile + +diff --git a/GNUmakefile b/GNUmakefile +new file mode 100644 +index 0000000..6a7a2d8 +--- /dev/null ++++ b/GNUmakefile +@@ -0,0 +1,37 @@ ++# SPDX-License-Identifier: Apache-2.0 ++# ++# Copyright 2021 Huawei Inc. ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++ ++include z.mk ++ ++Project.Name=ohos-xts-acts ++Project.Version=1 ++ ++$(eval $(call ZMK.Import,Configure)) ++ ++ActsDacTest.bin: CPPFLAGS += -iquote $(ZMK.OutOfTreeSourcePath)security_lite/permission_posix/dac/src ++# Incorrect platform macros used throughout harmony code. ++ActsDacTest.bin: CPPFLAGS += -D__LINUX__ ++# See corresponding BUILD.gn ++ActsDacTest.bin: CFLAGS += -Wno-error ++ ++ActsDacTest.bin.Sources = $(addprefix security_lite/permission_posix/dac/src/, \ ++ ActsDacPreTest.cpp \ ++ ActsDacTest.cpp \ ++ ActsDacTest.h \ ++ ActsSystemDevDacTest.cpp \ ++ ActsSystemJffsDacTest.cpp) ++ActsDacTest.bin: LDLIBS += -lgtest -lgtest_main -lpthread -lsec ++$(eval $(call ZMK.Expand,Program.Test,ActsDacTest.bin)) diff --git a/meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts_git.bb b/meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts_git.bb new file mode 100644 index 00000000..a0865cca --- /dev/null +++ b/meta-ohos-acts/recipes-ohos-xts-acts/ohos-xts-acts/ohos-xts-acts_git.bb @@ -0,0 +1,13 @@ +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=98c2e72b17fae6c40fb14fd5e43b29ec" + +SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/staging/xts_acts.git;protocol=https \ + file://0001-Add-makefile-based-on-zmk.patch \ + " +SRCREV = "2a3e429e72f8612e74a7d1e32567be11ef1541c4" +S = "${WORKDIR}/git" +PV = "0.0+git${SRCPV}" + +inherit zmk + +DEPENDS += "ohos-googletest ohos-libsec" -- GitLab