Skip to content
Snippets Groups Projects
Commit 3ef559ac authored by Zygmunt Krynicki's avatar Zygmunt Krynicki
Browse files

ohos-googletest: switch to current ostc branch


All of the staging components are moving to a model where the master
branch follows upstream open harmony gitee repository and the ostc
branch is re-based on that master, and contains additional patches.

The zmk patch was applied at the "local" upstream (ostc branch), so drop
if from the recipe.

Signed-off-by: default avatarZygmunt Krynicki <zygmunt.krynicki@huawei.com>
parent 0d6d3300
No related branches found
No related tags found
No related merge requests found
From c0a201576f9ed2bf8fe009722d63bea487493765 Mon Sep 17 00:00:00 2001
From: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
Date: Thu, 28 Jan 2021 09:17:22 +0100
Subject: [PATCH] Add makefile based on zmk
The makefile defines libgtest.so, libgtest_main.so and several classes of
header files.
Not all header files are installed yet, only those that were necessary by the
initial specific ACTS test that was compiled.
Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@huawei.com>
---
GNUmakefile | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 117 insertions(+)
create mode 100644 GNUmakefile
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..dc28364
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,117 @@
+# 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-googletest
+Project.Version=1
+
+libgtest.so: CPPFLAGS += -iquote $(ZMK.OutOfTreeSourcePath)googletest
+libgtest.so: CPPFLAGS += -iquote $(ZMK.OutOfTreeSourcePath)googletest/include
+libgtest.so.Sources = \
+ googletest/include/gtest/gtest-death-test.h \
+ googletest/include/gtest/gtest-message.h \
+ googletest/include/gtest/gtest-param-test.h \
+ googletest/include/gtest/gtest-printers.h \
+ googletest/include/gtest/gtest-test-part.h \
+ googletest/include/gtest/gtest-typed-test.h \
+ googletest/include/gtest/gtest_pred_impl.h \
+ googletest/include/gtest/gtest_prod.h \
+ googletest/include/gtest/internal/custom/gtest-port.h \
+ googletest/include/gtest/internal/custom/gtest-printers.h \
+ googletest/include/gtest/internal/custom/gtest.h \
+ googletest/include/gtest/internal/gtest-death-test-internal.h \
+ googletest/include/gtest/internal/gtest-filepath.h \
+ googletest/include/gtest/internal/gtest-internal.h \
+ googletest/include/gtest/internal/gtest-linked_ptr.h \
+ googletest/include/gtest/internal/gtest-param-util-generated.h \
+ googletest/include/gtest/internal/gtest-param-util.h \
+ googletest/include/gtest/internal/gtest-port-arch.h \
+ googletest/include/gtest/internal/gtest-port.h \
+ googletest/include/gtest/internal/gtest-string.h \
+ googletest/include/gtest/internal/gtest-tuple.h \
+ googletest/include/gtest/internal/gtest-type-util.h \
+ googletest/include/gtest/hwext/gtest-ext.h \
+ googletest/include/gtest/hwext/gtest-filter.h \
+ googletest/include/gtest/hwext/gtest-tag.h \
+ googletest/include/gtest/hwext/utils.h \
+ googletest/src/gtest-all.cc \
+ googletest/src/gtest-death-test.cc \
+ googletest/src/gtest-filepath.cc \
+ googletest/src/gtest-internal-inl.h \
+ googletest/src/gtest-port.cc \
+ googletest/src/gtest-printers.cc \
+ googletest/src/gtest-test-part.cc \
+ googletest/src/gtest-typed-test.cc \
+ googletest/src/gtest.cc \
+ googletest/src/hwext/gtest-ext.cc \
+ googletest/src/hwext/gtest-filter.cc \
+ googletest/src/hwext/gtest-tag.cc \
+ googletest/src/hwext/gtest-utils.cc
+libgtest.so.Sources := $(filter-out googletest/src/gtest-all.cc,$(libgtest.so.Sources))
+$(eval $(call ZMK.Expand,Library.So,libgtest.so))
+
+libgtest_main.so: CPPFLAGS += -iquote $(ZMK.OutOfTreeSourcePath)googletest
+libgtest_main.so: CPPFLAGS += -iquote $(ZMK.OutOfTreeSourcePath)googletest/include
+libgtest_main.so.Sources = \
+ googletest/src/gtest_main.cc
+$(eval $(call ZMK.Expand,Library.So,libgtest_main.so))
+
+# Public header files
+gtest-headers-public.InstallDir = $(includedir)/gtest
+gtest-headers-public.Headers = \
+ googletest/include/gtest/gtest-death-test.h \
+ googletest/include/gtest/gtest-message.h \
+ googletest/include/gtest/gtest-param-test.h \
+ googletest/include/gtest/gtest-printers.h \
+ googletest/include/gtest/gtest-spi.h \
+ googletest/include/gtest/gtest-test-part.h \
+ googletest/include/gtest/gtest-typed-test.h \
+ googletest/include/gtest/gtest.h \
+ googletest/include/gtest/gtest_pred_impl.h \
+ googletest/include/gtest/gtest_prod.h
+$(eval $(call ZMK.Expand,HeaderGroup,gtest-headers-public))
+
+# Internal headers required by ACTS
+gtest-headers-internal.InstallDir = $(includedir)/gtest/internal
+gtest-headers-internal.Headers = \
+ googletest/include/gtest/internal/gtest-death-test-internal.h \
+ googletest/include/gtest/internal/gtest-filepath.h \
+ googletest/include/gtest/internal/gtest-internal.h \
+ googletest/include/gtest/internal/gtest-linked_ptr.h \
+ googletest/include/gtest/internal/gtest-param-util-generated.h \
+ googletest/include/gtest/internal/gtest-param-util.h \
+ googletest/include/gtest/internal/gtest-port-arch.h \
+ googletest/include/gtest/internal/gtest-port.h \
+ googletest/include/gtest/internal/gtest-string.h \
+ googletest/include/gtest/internal/gtest-type-util.h
+$(eval $(call ZMK.Expand,HeaderGroup,gtest-headers-internal))
+
+# Internal custom headers required by ACTS
+gtest-headers-internal-custom.InstallDir = $(includedir)/gtest/internal/custom
+gtest-headers-internal-custom.Headers = \
+ googletest/include/gtest/internal/custom/gtest-port.h \
+ googletest/include/gtest/internal/custom/gtest-printers.h
+$(eval $(call ZMK.Expand,HeaderGroup,gtest-headers-internal-custom))
+
+# Harmony-specific extensions
+gtest-headers-hwext.InstallDir = $(includedir)/gtest/hwext
+gtest-headers-hwext.Headers = \
+ googletest/include/gtest/hwext/gtest-ext.h \
+ googletest/include/gtest/hwext/gtest-filter.h \
+ googletest/include/gtest/hwext/gtest-tag.h
+$(eval $(call ZMK.Expand,HeaderGroup,gtest-headers-hwext))
+
......@@ -4,10 +4,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
file://googlemock/scripts/generator/LICENSE;md5=2c0b90db7465231447cf2dd2e8163333 \
file://googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a"
SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/staging/third_party_googletest.git;protocol=https \
file://0001-Add-makefile-based-on-zmk.patch \
"
SRCREV = "f99de7cafdc7cd5374c1c7ef5252252a57aff04d"
SRC_URI = "git://git.ostc-eu.org/OSTC/OHOS/components/staging/third_party_googletest.git;protocol=https;branch=ostc"
SRCREV = "4aac960639cd965749f56028f0d12e90d58ebe01"
S = "${WORKDIR}/git"
PV = "0.0+git${SRCPV}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment