All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/protozero: disable tests
@ 2021-04-22 18:24 Fabrice Fontaine
  2021-04-23  7:53 ` Maxim Kochetkov
  2021-04-23 21:20 ` Thomas Petazzoni
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2021-04-22 18:24 UTC (permalink / raw)
  To: buildroot

Add a patch to disable tests through the standard BUILD_TESTING variable
which is already passed by cmake-package.

While at it, drop protobuf dependency which is only needed for tests

This will fix a build failure on toolchains without wchar, toolchains
for sh4 (ICE) or toolchains where gcc is affected by bug 64735.

Upstream thinks that this is unecessary but no additional feedback was
received on how we should handle those build failures

Fixes:
 - http://autobuild.buildroot.org/results/1cd24b757d87b963c70bc7ff927c6d983d0b142a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...CMakeLists.txt-respect-BUILD_TESTING.patch | 47 +++++++++++++++++++
 package/protozero/protozero.mk                |  4 --
 2 files changed, 47 insertions(+), 4 deletions(-)
 create mode 100644 package/protozero/0001-CMakeLists.txt-respect-BUILD_TESTING.patch

diff --git a/package/protozero/0001-CMakeLists.txt-respect-BUILD_TESTING.patch b/package/protozero/0001-CMakeLists.txt-respect-BUILD_TESTING.patch
new file mode 100644
index 0000000000..d0267e3283
--- /dev/null
+++ b/package/protozero/0001-CMakeLists.txt-respect-BUILD_TESTING.patch
@@ -0,0 +1,47 @@
+From 03daae49c8fa94513b508bd12f1597e8e5e086f2 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 17 Apr 2021 13:06:44 +0200
+Subject: [PATCH] CMakeLists.txt: respect BUILD_TESTING
+
+Don't build tests if the standard cmake BUILD_TESTING variable is set to
+OFF.
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/mapbox/protozero/pull/105]
+---
+ CMakeLists.txt | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f9702d6..7a40212 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+ 
+ #-----------------------------------------------------------------------------
+ 
++option(BUILD_TESTING "Build tests" ON)
+ option(WERROR "Add -Werror flag to build (turns warnings into errors)" ON)
+ 
+ if(MSVC)
+@@ -134,13 +135,13 @@ install(DIRECTORY include/protozero DESTINATION include)
+ 
+ #-----------------------------------------------------------------------------
+ 
+-enable_testing()
+-
+ add_subdirectory(doc)
+ 
+ add_subdirectory(tools)
+ 
+-add_subdirectory(test)
+-
++if(BUILD_TESTING)
++    enable_testing()
++    add_subdirectory(test)
++endif()
+ 
+ #-----------------------------------------------------------------------------
+-- 
+2.30.2
+
diff --git a/package/protozero/protozero.mk b/package/protozero/protozero.mk
index e4ce1a4730..80d16192e3 100644
--- a/package/protozero/protozero.mk
+++ b/package/protozero/protozero.mk
@@ -10,8 +10,4 @@ PROTOZERO_LICENSE = BSD-2-Clause, Apache-2.0
 PROTOZERO_LICENSE_FILES = LICENSE.md LICENSE.from_folly
 PROTOZERO_INSTALL_STAGING = YES
 
-ifeq ($(BR2_PACKAGE_PROTOBUF),y)
-PROTOZERO_DEPENDENCIES += protobuf
-endif
-
 $(eval $(cmake-package))
-- 
2.30.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/protozero: disable tests
  2021-04-22 18:24 [Buildroot] [PATCH 1/1] package/protozero: disable tests Fabrice Fontaine
@ 2021-04-23  7:53 ` Maxim Kochetkov
  2021-04-23 21:20 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Maxim Kochetkov @ 2021-04-23  7:53 UTC (permalink / raw)
  To: buildroot

22.04.2021 21:24, Fabrice Fontaine wrote:
> Add a patch to disable tests through the standard BUILD_TESTING variable
> which is already passed by cmake-package.
> 
> While at it, drop protobuf dependency which is only needed for tests
> 
> This will fix a build failure on toolchains without wchar, toolchains
> for sh4 (ICE) or toolchains where gcc is affected by bug 64735.
> 
> Upstream thinks that this is unecessary but no additional feedback was
> received on how we should handle those build failures
> 
> Fixes:
>   -http://autobuild.buildroot.org/results/1cd24b757d87b963c70bc7ff927c6d983d0b142a
> 
> Signed-off-by: Fabrice Fontaine<fontaine.fabrice@gmail.com>


Reviewed-by: Maxim Kochetkov <fido_max@inbox.ru>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] package/protozero: disable tests
  2021-04-22 18:24 [Buildroot] [PATCH 1/1] package/protozero: disable tests Fabrice Fontaine
  2021-04-23  7:53 ` Maxim Kochetkov
@ 2021-04-23 21:20 ` Thomas Petazzoni
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2021-04-23 21:20 UTC (permalink / raw)
  To: buildroot

On Thu, 22 Apr 2021 20:24:43 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Add a patch to disable tests through the standard BUILD_TESTING variable
> which is already passed by cmake-package.
> 
> While at it, drop protobuf dependency which is only needed for tests
> 
> This will fix a build failure on toolchains without wchar, toolchains
> for sh4 (ICE) or toolchains where gcc is affected by bug 64735.
> 
> Upstream thinks that this is unecessary but no additional feedback was
> received on how we should handle those build failures
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/1cd24b757d87b963c70bc7ff927c6d983d0b142a
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  ...CMakeLists.txt-respect-BUILD_TESTING.patch | 47 +++++++++++++++++++
>  package/protozero/protozero.mk                |  4 --
>  2 files changed, 47 insertions(+), 4 deletions(-)
>  create mode 100644 package/protozero/0001-CMakeLists.txt-respect-BUILD_TESTING.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-23 21:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 18:24 [Buildroot] [PATCH 1/1] package/protozero: disable tests Fabrice Fontaine
2021-04-23  7:53 ` Maxim Kochetkov
2021-04-23 21:20 ` Thomas Petazzoni

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.