catch2: new package
PATCH v2 1/1 catch2: new package
From: Bartosz Golaszewski <[email protected]>
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.
---
v1 -> v2:
- upstream merged a different solution for the build error: backport the relevant patch, include Upstream-Status tag
- use ${datadir} instead of hardcoded paths
- depend on python3-native, not python-native
- replace ALLOW_EMPTY_${PN} = "1" with RDEPENDS/RRECOMMENDS
...1-Fix-convert-from-char-on-ARM-build.patch | 46 +++++++++++++++++++ meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 26 +++++++++++ 2 files changed, 72 insertions(+) create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bb
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +46 -0
@@ -0,0 +1,46 @@ +From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001 +From: Miguel Gaio <[email protected]> +Date: Wed, 3 Oct 2018 10:22:16 +0200 +Subject: [PATCH] Fix convert from char on ARM build + +Some platforms set the signedness of char to unsigned (eg. ARM). +Convert from char should not assume the signedness of char. + +Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags. + +Signed-off-by: Miguel Gaio <[email protected]> + +Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff] + +Signed-off-by: Bartosz Golaszewski <[email protected]> +--- + include/internal/catch_tostring.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp +index 4e0c027d..8cbabbf2 100644 +--- a/include/internal/catch_tostring.cpp ++++ b/include/internal/catch_tostring.cpp +@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) { + return b ? "true" : "false"; + } + +-std::string StringMaker<char>::convert(char value) { ++std::string StringMaker<signed char>::convert(signed char value) { + if (value == '\r') { + return "'\\r'"; + } else if (value == '\f') { +@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) { + return chstr; + } + } +-std::string StringMaker<signed char>::convert(signed char c) { +- return ::Catch::Detail::stringify(static_cast<char>(c)); ++std::string StringMaker<char>::convert(char c) { ++ return ::Catch::Detail::stringify(static_cast<signed char>(c)); + } + std::string StringMaker<unsigned char>::convert(unsigned char c) { + return ::Catch::Detail::stringify(static_cast<char>(c)); +-- +2.19.1 +
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +26 -0
@@ -0,0 +1,26 @@ +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-Fix-convert-from-char-on-ARM-build.patch" +SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-native" + +inherit cmake python3native + +# Header-only library +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +do_install_append() { + rm ${D}/${datadir}/Catch2/lldbinit + rm ${D}/${datadir}/Catch2/gdbinit + rmdir ${D}/${datadir}/Catch2/ +}
Signature · 1 line
2.19.1
Quoted 83 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>---
v1 -> v2:
- upstream merged a different solution for the build error: backport the relevant patch, include Upstream-Status tag
- use ${datadir} instead of hardcoded paths
- depend on python3-native, not python-native
- replace ALLOW_EMPTY_${PN} = "1" with RDEPENDS/RRECOMMENDS...1-Fix-convert-from-char-on-ARM-build.patch | 46 +++++++++++++++++++ meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 26 +++++++++++ 2 files changed, 72 insertions(+) create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bbmeta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +46
-0@@ -0,0 +1,46 @@ +From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001 +From: Miguel Gaio <[email protected]> +Date: Wed, 3 Oct 2018 10:22:16 +0200 +Subject: [PATCH] Fix convert from char on ARM build + +Some platforms set the signedness of char to unsigned (eg. ARM). +Convert from char should not assume the signedness of char. + +Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags. + +Signed-off-by: Miguel Gaio <[email protected]> + +Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff] + +Signed-off-by: Bartosz Golaszewski <[email protected]> +--- + include/internal/catch_tostring.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp +index 4e0c027d..8cbabbf2 100644 +--- a/include/internal/catch_tostring.cpp ++++ b/include/internal/catch_tostring.cpp +@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) { + return b ? "true" : "false"; + } + +-std::string StringMaker<char>::convert(char value) { ++std::string StringMaker<signed char>::convert(signed char value) { + if (value == '\r') { + return "'\\r'"; + } else if (value == '\f') { +@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) { + return chstr; + } + } +-std::string StringMaker<signed char>::convert(signed char c) { +- return ::Catch::Detail::stringify(static_cast<char>(c)); ++std::string StringMaker<char>::convert(char c) { ++ return ::Catch::Detail::stringify(static_cast<signed char>(c)); + } + std::string StringMaker<unsigned char>::convert(unsigned char c) { + return ::Catch::Detail::stringify(static_cast<char>(c)); +-- +2.19.1 +meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +4
-0@@ -0,0 +1,26 @@ +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"
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 14
Quoted 10 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +10
-0+LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c" + +SRC_URI = "git://github.com/catchorg/Catch2.git \ + file://0001-Fix-convert-from-char-on-ARM-build.patch" +SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-native"
this is redundant since python3native is being inherited.
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 25
Quoted 11 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +11
-0+ +inherit cmake python3native + +# Header-only library +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +do_install_append() { + rm ${D}/${datadir}/Catch2/lldbinit + rm ${D}/${datadir}/Catch2/gdbinit + rmdir ${D}/${datadir}/Catch2/
why not just delete whole dir in one go ?
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +1
-1+} --2.19.1
pon., 15 paź 2018 o 20:04 Khem Raj <[email protected]> napisał(a):
Quoted 89 lines · Bartosz Golaszewski
Quoted 87 lines
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>---
v1 -> v2:
- upstream merged a different solution for the build error: backport the relevant patch, include Upstream-Status tag
- use ${datadir} instead of hardcoded paths
- depend on python3-native, not python-native
- replace ALLOW_EMPTY_${PN} = "1" with RDEPENDS/RRECOMMENDS...1-Fix-convert-from-char-on-ARM-build.patch | 46 +++++++++++++++++++ meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 26 +++++++++++ 2 files changed, 72 insertions(+) create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bbmeta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +46
-0@@ -0,0 +1,46 @@ +From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001 +From: Miguel Gaio <[email protected]> +Date: Wed, 3 Oct 2018 10:22:16 +0200 +Subject: [PATCH] Fix convert from char on ARM build + +Some platforms set the signedness of char to unsigned (eg. ARM). +Convert from char should not assume the signedness of char. + +Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags. + +Signed-off-by: Miguel Gaio <[email protected]> + +Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff] + +Signed-off-by: Bartosz Golaszewski <[email protected]> +--- + include/internal/catch_tostring.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp +index 4e0c027d..8cbabbf2 100644 +--- a/include/internal/catch_tostring.cpp ++++ b/include/internal/catch_tostring.cpp +@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) { + return b ? "true" : "false"; + } + +-std::string StringMaker<char>::convert(char value) { ++std::string StringMaker<signed char>::convert(signed char value) { + if (value == '\r') { + return "'\\r'"; + } else if (value == '\f') { +@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) { + return chstr; + } + } +-std::string StringMaker<signed char>::convert(signed char c) { +- return ::Catch::Detail::stringify(static_cast<char>(c)); ++std::string StringMaker<char>::convert(char c) { ++ return ::Catch::Detail::stringify(static_cast<signed char>(c)); + } + std::string StringMaker<unsigned char>::convert(unsigned char c) { + return ::Catch::Detail::stringify(static_cast<char>(c)); +-- +2.19.1 +meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +8
-0@@ -0,0 +1,26 @@ +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 \
Quoted 9 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 14
Quoted 6 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +6
-0+ file://0001-Fix-convert-from-char-on-ARM-build.patch" +SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-native"this is redundant since python3native is being inherited.
But if I don't do it, cmake fails:
| -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) | CMake Error at CMakeLists.txt:43 (message): | Python not found, but required for tests | | | -- Configuring incomplete, errors occurred!
Specifically this macro: find_package(PythonInterp)
Bart
Quoted 18 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 25
Quoted 11 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +11
-0+ +inherit cmake python3native + +# Header-only library +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +do_install_append() { + rm ${D}/${datadir}/Catch2/lldbinit + rm ${D}/${datadir}/Catch2/gdbinit + rmdir ${D}/${datadir}/Catch2/why not just delete whole dir in one go ?
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +1
-1+} --2.19.1
Quoted 114 lines · Bartosz Golaszewski
pon., 15 paź 2018 o 20:04 Khem Raj <[email protected]> napisał(a):
Quoted 89 lines · Bartosz Golaszewski
Quoted 87 lines
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>---
v1 -> v2:
- upstream merged a different solution for the build error: backport the relevant patch, include Upstream-Status tag
- use ${datadir} instead of hardcoded paths
- depend on python3-native, not python-native
- replace ALLOW_EMPTY_${PN} = "1" with RDEPENDS/RRECOMMENDS...1-Fix-convert-from-char-on-ARM-build.patch | 46 +++++++++++++++++++ meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 26 +++++++++++ 2 files changed, 72 insertions(+) create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bbmeta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +46
-0@@ -0,0 +1,46 @@ +From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001 +From: Miguel Gaio <[email protected]> +Date: Wed, 3 Oct 2018 10:22:16 +0200 +Subject: [PATCH] Fix convert from char on ARM build + +Some platforms set the signedness of char to unsigned (eg. ARM). +Convert from char should not assume the signedness of char. + +Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags. + +Signed-off-by: Miguel Gaio <[email protected]> + +Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff] + +Signed-off-by: Bartosz Golaszewski <[email protected]> +--- + include/internal/catch_tostring.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp +index 4e0c027d..8cbabbf2 100644 +--- a/include/internal/catch_tostring.cpp ++++ b/include/internal/catch_tostring.cpp +@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) { + return b ? "true" : "false"; + } + +-std::string StringMaker<char>::convert(char value) { ++std::string StringMaker<signed char>::convert(signed char value) { + if (value == '\r') { + return "'\\r'"; + } else if (value == '\f') { +@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) { + return chstr; + } + } +-std::string StringMaker<signed char>::convert(signed char c) { +- return ::Catch::Detail::stringify(static_cast<char>(c)); ++std::string StringMaker<char>::convert(char c) { ++ return ::Catch::Detail::stringify(static_cast<signed char>(c)); + } + std::string StringMaker<unsigned char>::convert(unsigned char c) { + return ::Catch::Detail::stringify(static_cast<char>(c)); +-- +2.19.1 +meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +8
-0@@ -0,0 +1,26 @@ +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 \Quoted 9 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 14
Quoted 6 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +6
-0+ file://0001-Fix-convert-from-char-on-ARM-build.patch" +SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-native"this is redundant since python3native is being inherited.
But if I don't do it, cmake fails:
| -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) | CMake Error at CMakeLists.txt:43 (message): | Python not found, but required for tests | | | -- Configuring incomplete, errors occurred!
Quoted 2 lines
Specifically this macro:
find_package(PythonInterp)
thats strange, since build dep should be added and be ready to use before do_configure of this package begins. Please dig into the root cause.
Quoted 20 lines
Bart
Quoted 18 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 25
Quoted 11 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +11
-0+ +inherit cmake python3native + +# Header-only library +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +do_install_append() { + rm ${D}/${datadir}/Catch2/lldbinit + rm ${D}/${datadir}/Catch2/gdbinit + rmdir ${D}/${datadir}/Catch2/why not just delete whole dir in one go ?
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +1
-1+} --2.19.1
pon., 15 paź 2018 o 20:16 Khem Raj <[email protected]> napisał(a):
Quoted 116 lines · Bartosz Golaszewski
Quoted 114 lines
pon., 15 paź 2018 o 20:04 Khem Raj <[email protected]> napisał(a):
Quoted 89 lines · Bartosz Golaszewski
Quoted 87 lines
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>---
v1 -> v2:
- upstream merged a different solution for the build error: backport the relevant patch, include Upstream-Status tag
- use ${datadir} instead of hardcoded paths
- depend on python3-native, not python-native
- replace ALLOW_EMPTY_${PN} = "1" with RDEPENDS/RRECOMMENDS...1-Fix-convert-from-char-on-ARM-build.patch | 46 +++++++++++++++++++ meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 26 +++++++++++ 2 files changed, 72 insertions(+) create mode 100644 meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bbmeta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +46
-0@@ -0,0 +1,46 @@ +From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:00 2001 +From: Miguel Gaio <[email protected]> +Date: Wed, 3 Oct 2018 10:22:16 +0200 +Subject: [PATCH] Fix convert from char on ARM build + +Some platforms set the signedness of char to unsigned (eg. ARM). +Convert from char should not assume the signedness of char. + +Fix build issue with -Werror,-Wtautological-unsigned-zero-compare flags. + +Signed-off-by: Miguel Gaio <[email protected]> + +Upstream-Status: Accepted [Commit f1faaa9c107113692301ad8bb56084460ef1a2ff] + +Signed-off-by: Bartosz Golaszewski <[email protected]> +--- + include/internal/catch_tostring.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/internal/catch_tostring.cpp b/include/internal/catch_tostring.cpp +index 4e0c027d..8cbabbf2 100644 +--- a/include/internal/catch_tostring.cpp ++++ b/include/internal/catch_tostring.cpp +@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(bool b) { + return b ? "true" : "false"; + } + +-std::string StringMaker<char>::convert(char value) { ++std::string StringMaker<signed char>::convert(signed char value) { + if (value == '\r') { + return "'\\r'"; + } else if (value == '\f') { +@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(char value) { + return chstr; + } + } +-std::string StringMaker<signed char>::convert(signed char c) { +- return ::Catch::Detail::stringify(static_cast<char>(c)); ++std::string StringMaker<char>::convert(char c) { ++ return ::Catch::Detail::stringify(static_cast<signed char>(c)); + } + std::string StringMaker<unsigned char>::convert(unsigned char c) { + return ::Catch::Detail::stringify(static_cast<char>(c)); +-- +2.19.1 +meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +8
-0@@ -0,0 +1,26 @@ +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 \Quoted 9 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 14
Quoted 6 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +6
-0+ file://0001-Fix-convert-from-char-on-ARM-build.patch" +SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-native"this is redundant since python3native is being inherited.
But if I don't do it, cmake fails:
| -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) | CMake Error at CMakeLists.txt:43 (message): | Python not found, but required for tests | | | -- Configuring incomplete, errors occurred!
Quoted 7 lines
Quoted 2 lines
Specifically this macro:
find_package(PythonInterp)thats strange, since build dep should be added and be ready to use before
do_configureof this package begins. Please dig into the root cause.
How about doing what other packages seem to be doing in this case - dropping python3-native from DEPENDS and only inheriting python3native?
I don't really have the time to dig into it now, I can either do this or keep this package downstream for now.
Bart
Quoted 20 lines
Quoted 20 lines
Bart
Quoted 18 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 25
Quoted 11 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +11
-0+ +inherit cmake python3native + +# Header-only library +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +do_install_append() { + rm ${D}/${datadir}/Catch2/lldbinit + rm ${D}/${datadir}/Catch2/gdbinit + rmdir ${D}/${datadir}/Catch2/why not just delete whole dir in one go ?
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +1
-1+} --2.19.1
Quoted 141 lines · Bartosz Golaszewski
pon., 15 paź 2018 o 20:16 Khem Raj <[email protected]> napisał(a):
Quoted 2 lines
On Mon, Oct 15, 2018 at 11:11 AM Bartosz Golaszewski <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
pon., 15 paź 2018 o 20:04 Khem Raj <[email protected]> napisał(a):
Quoted 2 lines
On Mon, Oct 15, 2018 at 8:54 AM Bartosz Golaszewski <[email protected]>
Quoted 4 lines · wrote:
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
From: Bartosz Golaszewski <[email protected]>
Add a recipe for the catch2 testing framework. There's a bug
upstream
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
which makes it impossible to build with gcc7 so include a patch.
Signed-off-by Bartosz Golaszewski <[email protected]>---
v1 -> v2:
- upstream merged a different solution for the build error:backport
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
the relevant patch, include Upstream-Status tag
- use ${datadir} instead of hardcoded paths
- depend on python3-native, not python-native
- replace ALLOW_EMPTY_${PN} = "1" with RDEPENDS/RRECOMMENDS...1-Fix-convert-from-char-on-ARM-build.patch | 46+++++++++++++++++++
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb | 26 +++++++++++ 2 files changed, 72 insertions(+) create mode 100644
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patchQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
create mode 100644 meta-oe/recipes-test/catch2/catch2_2.4.1.bbdiff --git
a/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patchb/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-opython3nativen-ARM-build.patchQuoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
new file mode 100644
index 000000000..307377563
---/dev/null
+++
b/meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patchQuoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review line 1
Quoted 2 lines
(quoted diff) +1
-0@@ -0,0 +1,46 @@ +From 5729874fa5059c39aa97cfa08fddf107b7a65c9e Mon Sep 17 00:00:002001
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 8 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +8
-0+From: Miguel Gaio <[email protected]> +Date: Wed, 3 Oct 2018 10:22:16 +0200 +Subject: [PATCH] Fix convert from char on ARM build + +Some platforms set the signedness of char to unsigned (eg. ARM). +Convert from char should not assume the signedness of char. + +Fix build issue with -Werror,-Wtautological-unsigned-zero-compareflags.
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +4
-0+ +Signed-off-by: Miguel Gaio <[email protected]> + +Upstream-Status: Accepted [Commit
f1faaa9c107113692301ad8bb56084460ef1a2ff]Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 7 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +7
-0+ +Signed-off-by: Bartosz Golaszewski <[email protected]> +--- + include/internal/catch_tostring.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/include/internal/catch_tostring.cppb/include/internal/catch_tostring.cpp
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +4
-0+index 4e0c027d..8cbabbf2 100644 +--- a/include/internal/catch_tostring.cpp ++++ b/include/internal/catch_tostring.cpp +@@ -205,7 +205,7 @@ std::string StringMaker<bool>::convert(boolb) {
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 5 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +5
-0+ return b ? "true" : "false"; + } + +-std::string StringMaker<char>::convert(char value) { ++std::string StringMaker<signed char>::convert(signed char value){
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +4
-0+ if (value == '\r') { + return "'\\r'"; + } else if (value == '\f') { +@@ -222,8 +222,8 @@ std::string StringMaker<char>::convert(charvalue) {
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch
Quoted 7 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +7
-0+ return chstr; + } + } +-std::string StringMaker<signed char>::convert(signed char c) { +- return ::Catch::Detail::stringify(static_cast<char>(c)); ++std::string StringMaker<char>::convert(char c) { ++ return ::Catch::Detail::stringify(static_cast<signedchar>(c));
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Review line 42
Quoted 2 lines
(quoted diff) +2
-0+ } + std::string StringMaker<unsigned char>::convert(unsigned char c){
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Review
Quoted 5 lines
meta-oe/recipes-test/catch2/catch2/0001-Fix-convert-from-char-on-ARM-build.patch new file +4
-0+ return ::Catch::Detail::stringify(static_cast<char>(c)); +-- +2.19.1 +(quoted diff) +0
-0b/meta-oe/recipes-test/catch2/catch2_2.4.1.bb
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 1
Quoted 6 lines
new file mode 100644
index 000000000..370ade150meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +1
-0@@ -0,0 +1,26 @@ +DESCRIPTION = "A modern, C++-native, header-only, test frameworkfor unit-tests, \
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb
Quoted 5 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +5
-0+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"
Quoted 28 lines
Quoted 27 lines
Quoted 11 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 14
Quoted 8 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +8
-0+ +SRC_URI = "git://github.com/catchorg/Catch2.git \ + file://0001-Fix-convert-from-char-on-ARM-build.patch" +SRCREV = "9e1bdca4667295fcb16265eae00efa8423f07007" + +S = "${WORKDIR}/git" + +DEPENDS = "python3-native"this is redundant since python3native is being inherited.
But if I don't do it, cmake fails:
| -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) | CMake Error at CMakeLists.txt:43 (message): | Python not found, but required for tests | | | -- Configuring incomplete, errors occurred!Specifically this macro:
find_package(PythonInterp)
Quoted 9 lines
Quoted 4 lines
thats strange, since build dep should be added and be ready to use before
do_configureof this package begins. Please dig into the root cause.How about doing what other packages seem to be doing in this case - dropping python3-native from DEPENDS and only inheriting python3native?
Yes that’s precisely what I asked
Quoted 2 lines
I don't really have the time to dig into it now, I can either do this or keep this package downstream for now.
It’s your choice and it does not affect my acceptance criteria
Quoted 24 lines
Bart
Quoted 20 lines
Quoted 20 lines
Bart
Quoted 18 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb line 25
Quoted 11 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +11
-0+ +inherit cmake python3native + +# Header-only library +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" + +do_install_append() { + rm ${D}/${datadir}/Catch2/lldbinit + rm ${D}/${datadir}/Catch2/gdbinit + rmdir ${D}/${datadir}/Catch2/why not just delete whole dir in one go ?
Quoted 4 lines
meta-oe/recipes-test/catch2/catch2_2.4.1.bb new file +1
-1+} --2.19.1