From: Bartosz Golaszewski <brgl@bgdev.pl>
To: openembedded-devel@lists.openembedded.org,
Khem Raj <raj.khem@gmail.com>,
Armin Kuster <akuster808@gmail.com>, Hiram Lew <lew@avast.com>,
Jan Kaisrlik <jan.kaisrlik@avast.com>,
Lukas Karas <karas@avast.com>
Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: [meta-oe][PATCH] catch2: new package
Date: Thu, 11 Oct 2018 11:08:24 +0200 [thread overview]
Message-ID: <20181011090824.21591-1-brgl@bgdev.pl> (raw)
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Add a recipe for the catch2 testing framework. There's a bug upstream
which makes it impossible to build with gcc7 so include a patch.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
.../0001-internal-fix-build-in-GCC-7.patch | 35 +++++++++++++++++++
meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 25 +++++++++++++
2 files changed, 60 insertions(+)
create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-internal-fix-build-in-GCC-7.patch
create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bb
diff --git a/meta-oe/recipes-test/catch2/catch2/0001-internal-fix-build-in-GCC-7.patch b/meta-oe/recipes-test/catch2/catch2/0001-internal-fix-build-in-GCC-7.patch
new file mode 100644
index 000000000..606398afa
--- /dev/null
+++ b/meta-oe/recipes-test/catch2/catch2/0001-internal-fix-build-in-GCC-7.patch
@@ -0,0 +1,35 @@
+From 857bf7e83db330682a4c722d0b57be1e4481f4e2 Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+Date: Thu, 11 Oct 2018 09:44:24 +0200
+Subject: [PATCH] internal: fix build in GCC 7
+
+The following error is emitted by gcc 7:
+
+include/internal/catch_tostring.cpp:217:21: error: comparison is always true due to limited range of data type [-Werror=type-limits]
+| } else if ('\0' <= value && value < ' ') {
+| ~~~~~^~~~~~~~
+| cc1plus: all warnings being treated as errors
+
+We can drop the first part of the if.
+
+Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
+---
+ include/internal/catch_tostring.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp
+index 4e0c027d..59cc8dec 100644
+--- a/include/internal/catch_tostring.cpp
++++ b/include/internal/catch_tostring.cpp
+@@ -214,7 +214,7 @@ std::string StringMaker<char>::convert(char value) {
+ return "'\\n'";
+ } else if (value == '\t') {
+ return "'\\t'";
+- } else if ('\0' <= value && value < ' ') {
++ } else if (value < ' ') {
+ return ::Catch::Detail::stringify(static_cast<unsigned int>(value));
+ } else {
+ char chstr[] = "' '";
+--
+2.19.1
+
diff --git a/meta-oe/recipes-test/catch2/catch2_2.4.1.bb b/meta-oe/recipes-test/catch2/catch2_2.4.1.bb
new file mode 100644
index 000000000..ba14a362c
--- /dev/null
+++ b/meta-oe/recipes-test/catch2/catch2_2.4.1.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "A modern, C++-native, header-only, test framework for unit-tests, \
+TDD and BDD - using C++11, C++14, C++17 and later."
+AUTHOR = "Phil Nash, Martin Horenovsky and others"
+HOMEPAGE = "https://github.com/catchorg/Catch2"
+LICENSE = "BSL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+SRC_URI = "git://github.com/catchorg/Catch2.git \
+ file://0001-internal-fix-build-in-GCC-7.patch"
+SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "python-native"
+
+inherit cmake python3native
+
+# Header-only library
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+ rm ${D}/usr/share/Catch2/lldbinit
+ rm ${D}/usr/share/Catch2/gdbinit
+ rmdir ${D}/usr/share/Catch2/
+}
--
2.19.1
next reply other threads:[~2018-10-11 9:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 9:08 Bartosz Golaszewski [this message]
2018-10-11 9:35 ` [meta-oe][PATCH] catch2: new package Vyacheslav Yurkov
2018-10-11 13:02 ` Bartosz Golaszewski
2018-10-11 13:23 ` Vyacheslav Yurkov
2018-10-11 14:32 ` akuster808
2018-10-15 14:50 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181011090824.21591-1-brgl@bgdev.pl \
--to=brgl@bgdev.pl \
--cc=akuster808@gmail.com \
--cc=bgolaszewski@baylibre.com \
--cc=jan.kaisrlik@avast.com \
--cc=karas@avast.com \
--cc=lew@avast.com \
--cc=openembedded-devel@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.