From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 07 Jun 2021 15:09:49 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lqF0n-0008Ux-Qj for lore@lore.pengutronix.de; Mon, 07 Jun 2021 15:09:49 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1lqF0n-0003nx-EK; Mon, 07 Jun 2021 15:09:49 +0200 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqF0C-0003mA-Tr; Mon, 07 Jun 2021 15:09:12 +0200 Received: from rhi by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lqF0C-0002OF-Id; Mon, 07 Jun 2021 15:09:12 +0200 From: Roland Hieber To: ptxdist@pengutronix.de Date: Mon, 7 Jun 2021 15:09:03 +0200 Message-Id: <20210607130909.4836-1-rhi@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [ptxdist] [PATCH 1/7] googletest: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Roland Hieber Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Signed-off-by: Roland Hieber --- rules/googletest.in | 41 +++++++++++++++++++++++++++ rules/googletest.make | 66 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 rules/googletest.in create mode 100644 rules/googletest.make diff --git a/rules/googletest.in b/rules/googletest.in new file mode 100644 index 000000000000..ab876ffd8a66 --- /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 000000000000..7f0c54f341f6 --- /dev/null +++ b/rules/googletest.make @@ -0,0 +1,66 @@ +# -*-makefile-*- +# +# Copyright (C) 2018 by Niklas Reisser +# +# 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 ") + @$(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 -- 2.29.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de