summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2021-06-07 15:09:03 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-06-11 11:14:02 +0200
commitd02a6c1d0d1d47f0237cb618ad68510267a9fa55 (patch)
tree21c9102c0a77902972fc0c10aca1f9d744c771a0
parent5b32cf900ef10071820f4250f7181eeeb94e082f (diff)
downloadptxdist-d02a6c1d0d1d47f0237cb618ad68510267a9fa55.tar.gz
ptxdist-d02a6c1d0d1d47f0237cb618ad68510267a9fa55.tar.xz
googletest: new package
Signed-off-by: Roland Hieber <rhi@pengutronix.de> Message-Id: <20210607130909.4836-1-rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/googletest.in41
-rw-r--r--rules/googletest.make66
2 files changed, 107 insertions, 0 deletions
diff --git a/rules/googletest.in b/rules/googletest.in
new file mode 100644
index 000000000..ab876ffd8
--- /dev/null
+++ b/rules/googletest.in
@@ -0,0 +1,41 @@
+## SECTION=test_suites
+
+config GOOGLETEST
+ select HOST_CMAKE
+ tristate
+ prompt "googletest"
+ help
+ Google's C++ test framework sources
+
+ Google Test is a framework for writing C++ tests on a
+ variety of platforms. Based on the xUnit
+ architecture. Supports automatic test discovery, a rich set
+ of assertions, user-defined assertions, death tests, fatal
+ and non-fatal failures, value- and type-parameterized tests,
+ various options for running the tests, and XML test report
+ generation.
+
+ Google Mock is an extension of Google Test for C++ mocking.
+ Inspired by jMock, EasyMock, and Hamcrest, and designed with
+ C++'s specifics in mind, it can help you derive better
+ designs of your system and write better tests.
+
+ Google Mock:
+
+ * provides a declarative syntax for defining mocks,
+ * can easily define partial (hybrid) mocks, which are a
+ cross of real and mock objects,
+ * handles functions of arbitrary types and overloaded
+ functions,
+ * comes with a rich set of matchers for validating function
+ arguments,
+ * uses an intuitive syntax for controlling the behavior of a
+ mock,
+ * does automatic verification of expectations (no
+ record-and-replay needed),
+ * allows arbitrary (partial) ordering constraints on
+ function calls to be expressed,
+ * lets a user extend it by defining new matchers and
+ actions.
+ * does not use exceptions, and
+ * is easy to learn and use.
diff --git a/rules/googletest.make b/rules/googletest.make
new file mode 100644
index 000000000..7f0c54f34
--- /dev/null
+++ b/rules/googletest.make
@@ -0,0 +1,66 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Niklas Reisser <Niklas.Reisser@de.bosch.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_GOOGLETEST) += googletest
+
+#
+# Paths and names
+#
+GOOGLETEST_VERSION := 1.8.1
+GOOGLETEST_MD5 := 2e6fbeb6a91310a16efe181886c59596
+GOOGLETEST := googletest-release-$(GOOGLETEST_VERSION)
+GOOGLETEST_SUFFIX := tar.gz
+GOOGLETEST_URL := https://github.com/google/googletest/archive/release-$(GOOGLETEST_VERSION).$(GOOGLETEST_SUFFIX)
+GOOGLETEST_SOURCE := $(SRCDIR)/$(GOOGLETEST).$(GOOGLETEST_SUFFIX)
+GOOGLETEST_DIR := $(BUILDDIR)/$(GOOGLETEST)
+GOOGLETEST_LICENSE := BSD-3-Clause
+GOOGLETEST_LICENSE_FILES := file://LICENSE;md5=cbbd27594afd089daa160d3a16dd515a
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+GOOGLETEST_CONF_TOOL := cmake
+GOOGLETEST_CONF_OPT := \
+ $(CROSS_CMAKE_USR) \
+ -DBUILD_GMOCK=ON \
+ -DBUILD_SHARED_LIBS=ON \
+ -DINSTALL_GTEST=ON \
+ -Dgmock_build_tests=OFF \
+ -Dgtest_build_samples=OFF \
+ -Dgtest_build_tests=OFF \
+ -Dgtest_disable_pthreads=OFF \
+ -Dgtest_force_shared_crt=OFF \
+ -Dgtest_hide_internal_symbols=OFF
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/googletest.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, googletest)
+ @$(call install_fixup, googletest,PRIORITY,optional)
+ @$(call install_fixup, googletest,SECTION,base)
+ @$(call install_fixup, googletest,AUTHOR,"Niklas Reisser <Niklas.Reisser@de.bosch.com>")
+ @$(call install_fixup, googletest,DESCRIPTION,missing)
+
+ @$(call install_lib, googletest, 0,0, 0644, libgmock)
+ @$(call install_lib, googletest, 0,0, 0644, libgtest)
+ @$(call install_lib, googletest, 0,0, 0644, libgtest_main)
+ @$(call install_lib, googletest, 0,0, 0644, libgmock_main)
+
+ @$(call install_finish, googletest)
+
+ @$(call touch)
+
+# vim: syntax=make