All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/catch2: new package
@ 2022-06-08  8:16 Michael Nosthoff via buildroot
  2022-06-15 10:41 ` Alexander Dahl
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Nosthoff via buildroot @ 2022-06-08  8:16 UTC (permalink / raw)
  To: buildroot; +Cc: Samuel Martin

Catch2 is a modern C++ unit testing framework which is
increasing in popularity.
This package is staging only and allows to build tests
to be run on the target.

Further it can also be built as host package (similar to
gtest)

- https://github.com/catchorg/Catch2

Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
 DEVELOPERS                 |  1 +
 package/Config.in          |  1 +
 package/catch2/Config.in   | 28 ++++++++++++++++++++++++++++
 package/catch2/catch2.hash |  3 +++
 package/catch2/catch2.mk   | 19 +++++++++++++++++++
 5 files changed, 52 insertions(+)
 create mode 100644 package/catch2/Config.in
 create mode 100644 package/catch2/catch2.hash
 create mode 100644 package/catch2/catch2.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 86755bfe18..211e876e16 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2027,6 +2027,7 @@ F:	package/gnuplot/
 F:	package/sdl2/
 
 N:	Michael Nosthoff <buildroot@heine.tech>
+F:	package/catch2/
 F:	package/grpc/
 F:	package/gtest/
 F:	package/libabseil-cpp/
diff --git a/package/Config.in b/package/Config.in
index 3b089166da..77ada20db9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1929,6 +1929,7 @@ menu "Other"
 	source "package/boost/Config.in"
 	source "package/c-capnproto/Config.in"
 	source "package/capnproto/Config.in"
+	source "package/catch2/Config.in"
 	source "package/cctz/Config.in"
 	source "package/cereal/Config.in"
 	source "package/clang/Config.in"
diff --git a/package/catch2/Config.in b/package/catch2/Config.in
new file mode 100644
index 0000000000..b0eee9fa47
--- /dev/null
+++ b/package/catch2/Config.in
@@ -0,0 +1,28 @@
+config BR2_PACKAGE_CATCH2
+	bool "catch2"
+	depends on BR2_USE_WCHAR
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on BR2_USE_MMU # fork()
+	help
+	  Catch2 is mainly a unit testing framework for C++, but it
+	  also provides basic micro-benchmarking features, and simple
+	  BDD macros.
+
+	  Catch2's main advantage is that using it is both simple and
+	  natural. Tests autoregister themselves and do not have to
+	  be named with valid identifiers, assertions look like
+	  normal C++ code, and sections provide a nice way to share
+	  set-up and tear-down code in tests.
+
+	  This package allows running testsuites on the target which
+	  might be advantageous in certain cases.
+
+	  https://github.com/catchorg/Catch2
+
+comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
+		!BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/catch2/catch2.hash b/package/catch2/catch2.hash
new file mode 100644
index 0000000000..8d47257abe
--- /dev/null
+++ b/package/catch2/catch2.hash
@@ -0,0 +1,3 @@
+# Locally computed:
+sha256  8c4173c68ae7da1b5b505194a0c2d6f1b2aef4ec1e3e7463bde451f26bbaf4e7  v3.0.1.tar.gz
+sha256  c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566  LICENSE.txt
diff --git a/package/catch2/catch2.mk b/package/catch2/catch2.mk
new file mode 100644
index 0000000000..e04b8a6b0a
--- /dev/null
+++ b/package/catch2/catch2.mk
@@ -0,0 +1,19 @@
+################################################################################
+#
+# catch2
+#
+################################################################################
+
+CATCH2_VERSION = 3.0.1
+CATCH2_SOURCE = v$(CATCH2_VERSION).tar.gz
+CATCH2_SITE = https://github.com/catchorg/Catch2/archive
+CATCH2_INSTALL_STAGING = YES
+CATCH2_INSTALL_TARGET = NO
+CATCH2_LICENSE = BSL-1.0
+CATCH2_LICENSE_FILES = LICENSE.txt
+CATCH2_SUPPORTS_IN_SOURCE_BUILD = NO
+
+CATCH2_CONF_OPTS = -DCATCH_INSTALL_DOCS=OFF
+
+$(eval $(cmake-package))
+$(eval $(host-cmake-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/catch2: new package
  2022-06-08  8:16 [Buildroot] [PATCH] package/catch2: new package Michael Nosthoff via buildroot
@ 2022-06-15 10:41 ` Alexander Dahl
  2022-06-15 11:58   ` Michael Nosthoff via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Dahl @ 2022-06-15 10:41 UTC (permalink / raw)
  To: Michael Nosthoff; +Cc: Samuel Martin, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 4809 bytes --]

Hello Michael,

On Wed, Jun 08, 2022 at 10:16:02AM +0200, Michael Nosthoff via buildroot wrote:
> Catch2 is a modern C++ unit testing framework which is
> increasing in popularity.
> This package is staging only and allows to build tests
> to be run on the target.
> 
> Further it can also be built as host package (similar to
> gtest)
> 
> - https://github.com/catchorg/Catch2
> 
> Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
> ---
>  DEVELOPERS                 |  1 +
>  package/Config.in          |  1 +
>  package/catch2/Config.in   | 28 ++++++++++++++++++++++++++++
>  package/catch2/catch2.hash |  3 +++
>  package/catch2/catch2.mk   | 19 +++++++++++++++++++
>  5 files changed, 52 insertions(+)
>  create mode 100644 package/catch2/Config.in
>  create mode 100644 package/catch2/catch2.hash
>  create mode 100644 package/catch2/catch2.mk
> 
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 86755bfe18..211e876e16 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -2027,6 +2027,7 @@ F:	package/gnuplot/
>  F:	package/sdl2/
>  
>  N:	Michael Nosthoff <buildroot@heine.tech>
> +F:	package/catch2/
>  F:	package/grpc/
>  F:	package/gtest/
>  F:	package/libabseil-cpp/
> diff --git a/package/Config.in b/package/Config.in
> index 3b089166da..77ada20db9 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1929,6 +1929,7 @@ menu "Other"
>  	source "package/boost/Config.in"
>  	source "package/c-capnproto/Config.in"
>  	source "package/capnproto/Config.in"
> +	source "package/catch2/Config.in"
>  	source "package/cctz/Config.in"
>  	source "package/cereal/Config.in"
>  	source "package/clang/Config.in"
> diff --git a/package/catch2/Config.in b/package/catch2/Config.in
> new file mode 100644
> index 0000000000..b0eee9fa47
> --- /dev/null
> +++ b/package/catch2/Config.in
> @@ -0,0 +1,28 @@
> +config BR2_PACKAGE_CATCH2
> +	bool "catch2"
> +	depends on BR2_USE_WCHAR
> +	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on BR2_INSTALL_LIBSTDCPP
> +	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
> +	depends on BR2_USE_MMU # fork()
> +	help
> +	  Catch2 is mainly a unit testing framework for C++, but it
> +	  also provides basic micro-benchmarking features, and simple
> +	  BDD macros.
> +
> +	  Catch2's main advantage is that using it is both simple and
> +	  natural. Tests autoregister themselves and do not have to
> +	  be named with valid identifiers, assertions look like
> +	  normal C++ code, and sections provide a nice way to share
> +	  set-up and tear-down code in tests.
> +
> +	  This package allows running testsuites on the target which
> +	  might be advantageous in certain cases.
> +
> +	  https://github.com/catchorg/Catch2
> +
> +comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
> +	depends on BR2_USE_MMU
> +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> +		!BR2_INSTALL_LIBSTDCPP || \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9

That comment wording doesn't seem right.  Did you mean "catch2"
instead of "gtest" here?

Greets
Alex

> diff --git a/package/catch2/catch2.hash b/package/catch2/catch2.hash
> new file mode 100644
> index 0000000000..8d47257abe
> --- /dev/null
> +++ b/package/catch2/catch2.hash
> @@ -0,0 +1,3 @@
> +# Locally computed:
> +sha256  8c4173c68ae7da1b5b505194a0c2d6f1b2aef4ec1e3e7463bde451f26bbaf4e7  v3.0.1.tar.gz
> +sha256  c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566  LICENSE.txt
> diff --git a/package/catch2/catch2.mk b/package/catch2/catch2.mk
> new file mode 100644
> index 0000000000..e04b8a6b0a
> --- /dev/null
> +++ b/package/catch2/catch2.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# catch2
> +#
> +################################################################################
> +
> +CATCH2_VERSION = 3.0.1
> +CATCH2_SOURCE = v$(CATCH2_VERSION).tar.gz
> +CATCH2_SITE = https://github.com/catchorg/Catch2/archive
> +CATCH2_INSTALL_STAGING = YES
> +CATCH2_INSTALL_TARGET = NO
> +CATCH2_LICENSE = BSL-1.0
> +CATCH2_LICENSE_FILES = LICENSE.txt
> +CATCH2_SUPPORTS_IN_SOURCE_BUILD = NO
> +
> +CATCH2_CONF_OPTS = -DCATCH_INSTALL_DOCS=OFF
> +
> +$(eval $(cmake-package))
> +$(eval $(host-cmake-package))
> -- 
> 2.25.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN     | speech censured, the first thought forbidden, the
 X  AGAINST      | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL    | (Jean-Luc Picard, quoting Judge Aaron Satie)

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot]  [PATCH] package/catch2: new package
  2022-06-15 10:41 ` Alexander Dahl
@ 2022-06-15 11:58   ` Michael Nosthoff via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Nosthoff via buildroot @ 2022-06-15 11:58 UTC (permalink / raw)
  To: Alexander Dahl; +Cc: Samuel Martin, buildroot

Hi Alex,

On Wednesday, June 15, 2022 12:41 CEST, Alexander Dahl <post@lespocky.de> wrote:

> Hello Michael,
> 
> On Wed, Jun 08, 2022 at 10:16:02AM +0200, Michael Nosthoff via buildroot wrote:
> > +
> > +comment "gtest needs a toolchain w/ C++, wchar, threads, gcc >= 4.9"
> > +	depends on BR2_USE_MMU
> > +	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
> > +		!BR2_INSTALL_LIBSTDCPP || \
> > +		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
> 
> That comment wording doesn't seem right.  Did you mean "catch2"
> instead of "gtest" here?
> 
 whoopsi, classical copy&paste error. I'll send a v2.

Regards,
Michael

> Greets
> Alex
>

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-06-15 11:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08  8:16 [Buildroot] [PATCH] package/catch2: new package Michael Nosthoff via buildroot
2022-06-15 10:41 ` Alexander Dahl
2022-06-15 11:58   ` Michael Nosthoff via buildroot

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.