[OE-core] [meta-oe][PATCH] gtest, gmock: Created a git version of gtest.

Paulo Neves ptsneves at gmail.com
Mon Jul 2 15:03:03 UTC 2018


There are no new tag releases of the googletest
repositories for 2 years, while development
continued.
Created a new recipe for non tagged release
hash. This new recipe does not require the
package config patch as it is supported by
upstream.

Refactored common recipe data in an include
file.
---
 meta-oe/recipes-test/gtest/gtest.inc      | 19 +++++++++++++++++++
 meta-oe/recipes-test/gtest/gtest_1.8.0.bb | 20 +-------------------
 meta-oe/recipes-test/gtest/gtest_git.bb   |  6 ++++++
 3 files changed, 26 insertions(+), 19 deletions(-)
 create mode 100644 meta-oe/recipes-test/gtest/gtest.inc
 create mode 100644 meta-oe/recipes-test/gtest/gtest_git.bb

diff --git a/meta-oe/recipes-test/gtest/gtest.inc b/meta-oe/recipes-test/gtest/gtest.inc
new file mode 100644
index 000000000..7a834ef25
--- /dev/null
+++ b/meta-oe/recipes-test/gtest/gtest.inc
@@ -0,0 +1,19 @@
+DESCRIPTION = "Google's framework for writing C++ tests"
+HOMEPAGE = "https://github.com/google/googletest"
+SECTION = "libs"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
+                    file://googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a"
+
+PROVIDES += "gmock"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+ALLOW_EMPTY_${PN} = "1"
+ALLOW_EMPTY_${PN}-dbg = "1"
+
+RDEPENDS_${PN}-dev += "${PN}-staticdev"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-test/gtest/gtest_1.8.0.bb b/meta-oe/recipes-test/gtest/gtest_1.8.0.bb
index 48cf4e04b..b264862f1 100644
--- a/meta-oe/recipes-test/gtest/gtest_1.8.0.bb
+++ b/meta-oe/recipes-test/gtest/gtest_1.8.0.bb
@@ -1,24 +1,6 @@
-DESCRIPTION = "Google's framework for writing C++ tests"
-HOMEPAGE = "https://github.com/google/googletest"
-SECTION = "libs"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://googlemock/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
-                    file://googletest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a"
-
-PROVIDES += "gmock"
-
-S = "${WORKDIR}/git"
+require gtest.inc
 SRCREV = "ec44c6c1675c25b9827aacd08c02433cccde7780"
 SRC_URI = "\
     git://github.com/google/googletest.git;protocol=https; \
     file://Add-pkg-config-support.patch \
 "
-
-inherit cmake
-
-ALLOW_EMPTY_${PN} = "1"
-ALLOW_EMPTY_${PN}-dbg = "1"
-
-RDEPENDS_${PN}-dev += "${PN}-staticdev"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-test/gtest/gtest_git.bb b/meta-oe/recipes-test/gtest/gtest_git.bb
new file mode 100644
index 000000000..2f091b2c7
--- /dev/null
+++ b/meta-oe/recipes-test/gtest/gtest_git.bb
@@ -0,0 +1,6 @@
+require gtest.inc
+SRCREV = "ba96d0b1161f540656efdaed035b3c062b60e006"
+SRC_URI = "\
+    git://github.com/google/googletest.git;protocol=https; \
+"
+
-- 
2.14.1




More information about the Openembedded-core mailing list