summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-test
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-10-16 16:25:19 +0200
committerKhem Raj <raj.khem@gmail.com>2018-10-16 08:17:46 -0700
commit1d7ae7438aecb21f694a9e5a6c38f7833130882f (patch)
treeaaf1984942dc24937214325f04182ecb9dfde94b /meta-oe/recipes-test
parent7023d0f1171725118de3882c78bf64998f4bc697 (diff)
downloadmeta-openembedded-1d7ae7438aecb21f694a9e5a6c38f7833130882f.tar.gz
catch2: new package
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> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-test')
-rw-r--r--meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch46
-rw-r--r--meta-oe/recipes-test/catch2/catch2_2.4.1.bb24
2 files changed, 70 insertions, 0 deletions
diff --git a/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch b/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
new file mode 100644
index 000000000..307377563
--- /dev/null
+++ b/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
@@ -0,0 +1,46 @@
1From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001
2From: Miguel Gaio <mgaio35@gmail.com>
3Date: Wed, 3 Oct 2018 10:22:16 +0200
4Subject: [PATCH] Fix convert from char on ARM build
5
6Some platforms set the signedness of char to unsigned (eg. ARM).
7Convert from char should not assume the signedness of char.
8
9Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags.
10
11Signed-off-by: Miguel Gaio <mgaio35@gmail.com>
12
13Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff]
14
15Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
16---
17 include/internal/catch_tostring.cpp | 6 +++---
18 1 file changed, 3 insertions(+), 3 deletions(-)
19
20diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp
21index 4e0c027d..8cbabbf2 100644
22--- a/include/internal/catch_tostring.cpp
23+++ b/include/internal/catch_tostring.cpp
24@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) {
25 return b ? "true" : "false";
26 }
27
28-std::string StringMaker<char>::convert(char value) {
29+std::string StringMaker<signed char>::convert(signed char value) {
30 if (value == '\r') {
31 return "'\\r'";
32 } else if (value == '\f') {
33@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) {
34 return chstr;
35 }
36 }
37-std::string StringMaker<signed char>::convert(signed char c) {
38- return ::Catch::Detail::stringify(static_cast<char>(c));
39+std::string StringMaker<char>::convert(char c) {
40+ return ::Catch::Detail::stringify(static_cast<signed char>(c));
41 }
42 std::string StringMaker<unsigned char>::convert(unsigned char c) {
43 return ::Catch::Detail::stringify(static_cast<char>(c));
44--
452.19.1
46
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..0183c2e41
--- /dev/null
+++ b/meta-oe/recipes-test/catch2/catch2_2.4.1.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "A modern, C++-native, header-only, test framework for unit-tests, \
2TDD and BDD - using C++11, C++14, C++17 and later."
3AUTHOR = "Phil Nash, Martin Horenovsky and others"
4HOMEPAGE = "https://github.com/catchorg/Catch2"
5LICENSE = "BSL-1.0"
6LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
7
8SRC_URI = "git://github.com/catchorg/Catch2.git \
9 file://0001-Fix-convert-from-char-on-ARM-build.patch"
10SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007"
11
12S = "${WORKDIR}/git"
13
14inherit cmake python3native
15
16# Header-only library
17RDEPENDS_${PN}-dev = ""
18RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
19
20do_install_append() {
21 rm ${D}/${datadir}/Catch2/lldbinit
22 rm ${D}/${datadir}/Catch2/gdbinit
23 rmdir ${D}/${datadir}/Catch2/
24}