Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0
@ 2024-04-12 21:08 Brandon Maier via buildroot
  2024-04-12 21:08 ` [Buildroot] [PATCH 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-12 21:08 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

https://github.com/bats-core/bats-core/releases/tag/v1.11.0
https://github.com/bats-core/bats-core/releases/tag/v1.10.0
https://github.com/bats-core/bats-core/releases/tag/v1.9.0

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 package/bats-core/bats-core.hash | 2 +-
 package/bats-core/bats-core.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/bats-core/bats-core.hash b/package/bats-core/bats-core.hash
index 81c0229af4..25b2b60339 100644
--- a/package/bats-core/bats-core.hash
+++ b/package/bats-core/bats-core.hash
@@ -1,5 +1,5 @@
 # Locally calculated
-sha256  0f2df311a536e625a72bff64c838e67c7b5032e6ea9edcdf32758303062b2f3b  bats-core-1.8.2.tar.gz
+sha256  aeff09fdc8b0c88b3087c99de00cf549356d7a2f6a69e3fcec5e0e861d2f9063  bats-core-1.11.0.tar.gz
 
 # License files
 sha256  55074b2b3b87809105034e1468e59076554d76a80c67bcc592000cc3d929852d  LICENSE.md
diff --git a/package/bats-core/bats-core.mk b/package/bats-core/bats-core.mk
index e172445930..716b167c00 100644
--- a/package/bats-core/bats-core.mk
+++ b/package/bats-core/bats-core.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-BATS_CORE_VERSION = 1.8.2
+BATS_CORE_VERSION = 1.11.0
 BATS_CORE_SITE = $(call github,bats-core,bats-core,v$(BATS_CORE_VERSION))
 BATS_CORE_LICENSE = MIT
 BATS_CORE_LICENSE_FILES = LICENSE.md
-- 
2.29.0

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

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

* [Buildroot] [PATCH 2/4] package/bats-support: add bats support library
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
@ 2024-04-12 21:08 ` Brandon Maier via buildroot
  2024-04-12 21:08 ` [Buildroot] [PATCH 3/4] package/bats-assert: add bats-assert library Brandon Maier via buildroot
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-12 21:08 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

This library provides support functions needed by the bats-assert and
bats-file libraries.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-support which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-support/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/bats-support/Config.in         |  8 ++++++++
 package/bats-support/bats-support.hash |  5 +++++
 package/bats-support/bats-support.mk   | 17 +++++++++++++++++
 5 files changed, 32 insertions(+)
 create mode 100644 package/bats-support/Config.in
 create mode 100644 package/bats-support/bats-support.hash
 create mode 100644 package/bats-support/bats-support.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 399b2931ff..846dc987a4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -540,6 +540,7 @@ F:	package/ncdu/
 N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
+F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
 F:	package/unifdef/
diff --git a/package/Config.in b/package/Config.in
index 1935077f0f..eef0ccc588 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -170,6 +170,7 @@ endmenu
 menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-core/Config.in"
+	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
 	source "package/bsdiff/Config.in"
diff --git a/package/bats-support/Config.in b/package/bats-support/Config.in
new file mode 100644
index 0000000000..24b49cee1d
--- /dev/null
+++ b/package/bats-support/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_BATS_SUPPORT
+	bool "bats-support"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	help
+	  bats-support is a supporting library providing common
+	  functions to test helper libraries written for Bats.
+
+	  https://github.com/bats-core/bats-support
diff --git a/package/bats-support/bats-support.hash b/package/bats-support/bats-support.hash
new file mode 100644
index 0000000000..847f39e7c7
--- /dev/null
+++ b/package/bats-support/bats-support.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f  bats-support-0.3.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-support/bats-support.mk b/package/bats-support/bats-support.mk
new file mode 100644
index 0000000000..840aa52046
--- /dev/null
+++ b/package/bats-support/bats-support.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# bats-support
+#
+################################################################################
+
+BATS_SUPPORT_VERSION = 0.3.0
+BATS_SUPPORT_SITE = $(call github,bats-core,bats-support,v$(BATS_SUPPORT_VERSION))
+BATS_SUPPORT_LICENSE = CC0-1.0
+BATS_SUPPORT_LICENSE_FILES = LICENSE
+
+define BATS_SUPPORT_INSTALL_TARGET_CMDS
+	install -Dm 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-support"
+	install -Dm 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-support/src"
+endef
+
+$(eval $(generic-package))
-- 
2.29.0

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

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

* [Buildroot] [PATCH 3/4] package/bats-assert: add bats-assert library
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
  2024-04-12 21:08 ` [Buildroot] [PATCH 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
@ 2024-04-12 21:08 ` Brandon Maier via buildroot
  2024-04-12 21:08 ` [Buildroot] [PATCH 4/4] package/bats-file: add bats-file library Brandon Maier via buildroot
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-12 21:08 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

bats-assert is a helper library providing common assertions for Bats.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-assert which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-assert/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/bats-assert/Config.in        | 16 ++++++++++++++++
 package/bats-assert/bats-assert.hash |  5 +++++
 package/bats-assert/bats-assert.mk   | 17 +++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/bats-assert/Config.in
 create mode 100644 package/bats-assert/bats-assert.hash
 create mode 100644 package/bats-assert/bats-assert.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 846dc987a4..4bac9c9d1b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -540,6 +540,7 @@ F:	package/ncdu/
 N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
+F:	package/bats-assert/
 F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
diff --git a/package/Config.in b/package/Config.in
index eef0ccc588..9d54fd3817 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -170,6 +170,7 @@ endmenu
 menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-core/Config.in"
+	source "package/bats-assert/Config.in"
 	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
diff --git a/package/bats-assert/Config.in b/package/bats-assert/Config.in
new file mode 100644
index 0000000000..78fa0ac4d5
--- /dev/null
+++ b/package/bats-assert/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_BATS_ASSERT
+	bool "bats-assert"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	select BR2_PACKAGE_BATS_SUPPORT # runtime
+	help
+	  bats-assert is a helper library providing common assertions
+	  for Bats.
+
+	  In the context of this project, an assertion is a function
+	  that perform a test and returns 1 on failure or 0 on success.
+	  To make debugging easier, the assertion also outputs relevant
+	  information on failure. The output is formatted for
+	  readability. To make assertions usable outside of @test
+	  blocks, the output is sent to stderr.
+
+	  https://github.com/bats-core/bats-assert
diff --git a/package/bats-assert/bats-assert.hash b/package/bats-assert/bats-assert.hash
new file mode 100644
index 0000000000..94c3908ab3
--- /dev/null
+++ b/package/bats-assert/bats-assert.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  98ca3b685f8b8993e48ec057565e6e2abcc541034ed5b0e81f191505682037fd  bats-assert-2.1.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-assert/bats-assert.mk b/package/bats-assert/bats-assert.mk
new file mode 100644
index 0000000000..ec4858af7c
--- /dev/null
+++ b/package/bats-assert/bats-assert.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# bats-assert
+#
+################################################################################
+
+BATS_ASSERT_VERSION = 2.1.0
+BATS_ASSERT_SITE = $(call github,bats-core,bats-assert,v$(BATS_ASSERT_VERSION))
+BATS_ASSERT_LICENSE = CC0-1.0
+BATS_ASSERT_LICENSE_FILES = LICENSE
+
+define BATS_ASSERT_INSTALL_TARGET_CMDS
+	install -Dm 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-assert"
+	install -Dm 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-assert/src"
+endef
+
+$(eval $(generic-package))
-- 
2.29.0

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

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

* [Buildroot] [PATCH 4/4] package/bats-file: add bats-file library
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
  2024-04-12 21:08 ` [Buildroot] [PATCH 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
  2024-04-12 21:08 ` [Buildroot] [PATCH 3/4] package/bats-assert: add bats-assert library Brandon Maier via buildroot
@ 2024-04-12 21:08 ` Brandon Maier via buildroot
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-12 21:08 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

bats-file is a helper library providing common filesystem related
assertions and helpers for Bats.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-file which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-file/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 DEVELOPERS                       |  1 +
 package/Config.in                |  1 +
 package/bats-file/Config.in      | 15 +++++++++++++++
 package/bats-file/bats-file.hash |  5 +++++
 package/bats-file/bats-file.mk   | 17 +++++++++++++++++
 5 files changed, 39 insertions(+)
 create mode 100644 package/bats-file/Config.in
 create mode 100644 package/bats-file/bats-file.hash
 create mode 100644 package/bats-file/bats-file.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 4bac9c9d1b..d2c45c905f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -541,6 +541,7 @@ N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
 F:	package/bats-assert/
+F:	package/bats-file/
 F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
diff --git a/package/Config.in b/package/Config.in
index 9d54fd3817..e71421c2ff 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -171,6 +171,7 @@ menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-core/Config.in"
 	source "package/bats-assert/Config.in"
+	source "package/bats-file/Config.in"
 	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
diff --git a/package/bats-file/Config.in b/package/bats-file/Config.in
new file mode 100644
index 0000000000..fa9312c9e4
--- /dev/null
+++ b/package/bats-file/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_BATS_FILE
+	bool "bats-file"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	select BR2_PACKAGE_BATS_SUPPORT # runtime
+	help
+	  bats-file is a helper library providing common filesystem
+	  related assertions and helpers for Bats.
+
+	  Assertions are functions that perform a test and output
+	  relevant information on failure to help debugging. They return
+	  1 on failure and 0 otherwise. Output, formatted for
+	  readability, is sent to the standard error to make assertions
+	  usable outside of @test blocks too.
+
+	  https://github.com/bats-core/bats-file
diff --git a/package/bats-file/bats-file.hash b/package/bats-file/bats-file.hash
new file mode 100644
index 0000000000..9530dc6d9d
--- /dev/null
+++ b/package/bats-file/bats-file.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  9b69043241f3af1c2d251f89b4fcafa5df3f05e97b89db18d7c9bdf5731bb27a  bats-file-0.4.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-file/bats-file.mk b/package/bats-file/bats-file.mk
new file mode 100644
index 0000000000..dda2d17475
--- /dev/null
+++ b/package/bats-file/bats-file.mk
@@ -0,0 +1,17 @@
+################################################################################
+#
+# bats-file
+#
+################################################################################
+
+BATS_FILE_VERSION = 0.4.0
+BATS_FILE_SITE = $(call github,bats-core,bats-file,v$(BATS_FILE_VERSION))
+BATS_FILE_LICENSE = CC0-1.0
+BATS_FILE_LICENSE_FILES = LICENSE
+
+define BATS_FILE_INSTALL_TARGET_CMDS
+	install -Dm 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-file"
+	install -Dm 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-file/src"
+endef
+
+$(eval $(generic-package))
-- 
2.29.0

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

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

* [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
                   ` (2 preceding siblings ...)
  2024-04-12 21:08 ` [Buildroot] [PATCH 4/4] package/bats-file: add bats-file library Brandon Maier via buildroot
@ 2024-04-25 19:58 ` Brandon Maier via buildroot
  2024-05-01 21:09   ` Thomas Petazzoni via buildroot
  2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-25 19:58 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

https://github.com/bats-core/bats-core/releases/tag/v1.11.0
https://github.com/bats-core/bats-core/releases/tag/v1.10.0
https://github.com/bats-core/bats-core/releases/tag/v1.9.0

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 package/bats-core/bats-core.hash | 2 +-
 package/bats-core/bats-core.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/bats-core/bats-core.hash b/package/bats-core/bats-core.hash
index 81c0229af4..25b2b60339 100644
--- a/package/bats-core/bats-core.hash
+++ b/package/bats-core/bats-core.hash
@@ -1,5 +1,5 @@
 # Locally calculated
-sha256  0f2df311a536e625a72bff64c838e67c7b5032e6ea9edcdf32758303062b2f3b  bats-core-1.8.2.tar.gz
+sha256  aeff09fdc8b0c88b3087c99de00cf549356d7a2f6a69e3fcec5e0e861d2f9063  bats-core-1.11.0.tar.gz
 
 # License files
 sha256  55074b2b3b87809105034e1468e59076554d76a80c67bcc592000cc3d929852d  LICENSE.md
diff --git a/package/bats-core/bats-core.mk b/package/bats-core/bats-core.mk
index e172445930..716b167c00 100644
--- a/package/bats-core/bats-core.mk
+++ b/package/bats-core/bats-core.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-BATS_CORE_VERSION = 1.8.2
+BATS_CORE_VERSION = 1.11.0
 BATS_CORE_SITE = $(call github,bats-core,bats-core,v$(BATS_CORE_VERSION))
 BATS_CORE_LICENSE = MIT
 BATS_CORE_LICENSE_FILES = LICENSE.md
-- 
2.44.0

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

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

* [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
                   ` (3 preceding siblings ...)
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
@ 2024-04-25 19:58 ` Brandon Maier via buildroot
  2024-05-01 21:13   ` Thomas Petazzoni via buildroot
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 3/4] package/bats-assert: add bats-assert library Brandon Maier via buildroot
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 4/4] package/bats-file: add bats-file library Brandon Maier via buildroot
  6 siblings, 1 reply; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-25 19:58 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

This library provides support functions needed by the bats-assert and
bats-file libraries.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-support which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-support/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
Changes v1 -> v2:
- fix older versions of `install` that don't support -D
---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/bats-support/Config.in         |  8 ++++++++
 package/bats-support/bats-support.hash |  5 +++++
 package/bats-support/bats-support.mk   | 18 ++++++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/bats-support/Config.in
 create mode 100644 package/bats-support/bats-support.hash
 create mode 100644 package/bats-support/bats-support.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 399b2931ff..846dc987a4 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -540,6 +540,7 @@ F:	package/ncdu/
 N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
+F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
 F:	package/unifdef/
diff --git a/package/Config.in b/package/Config.in
index 1935077f0f..eef0ccc588 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -170,6 +170,7 @@ endmenu
 menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-core/Config.in"
+	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
 	source "package/bsdiff/Config.in"
diff --git a/package/bats-support/Config.in b/package/bats-support/Config.in
new file mode 100644
index 0000000000..24b49cee1d
--- /dev/null
+++ b/package/bats-support/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_BATS_SUPPORT
+	bool "bats-support"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	help
+	  bats-support is a supporting library providing common
+	  functions to test helper libraries written for Bats.
+
+	  https://github.com/bats-core/bats-support
diff --git a/package/bats-support/bats-support.hash b/package/bats-support/bats-support.hash
new file mode 100644
index 0000000000..847f39e7c7
--- /dev/null
+++ b/package/bats-support/bats-support.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f  bats-support-0.3.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-support/bats-support.mk b/package/bats-support/bats-support.mk
new file mode 100644
index 0000000000..37c69c7d62
--- /dev/null
+++ b/package/bats-support/bats-support.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# bats-support
+#
+################################################################################
+
+BATS_SUPPORT_VERSION = 0.3.0
+BATS_SUPPORT_SITE = $(call github,bats-core,bats-support,v$(BATS_SUPPORT_VERSION))
+BATS_SUPPORT_LICENSE = CC0-1.0
+BATS_SUPPORT_LICENSE_FILES = LICENSE
+
+define BATS_SUPPORT_INSTALL_TARGET_CMDS
+	install -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-support/src
+	install -m 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-support"
+	install -m 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-support/src"
+endef
+
+$(eval $(generic-package))
-- 
2.44.0

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

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

* [Buildroot] [PATCH v2 3/4] package/bats-assert: add bats-assert library
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
                   ` (4 preceding siblings ...)
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
@ 2024-04-25 19:58 ` Brandon Maier via buildroot
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 4/4] package/bats-file: add bats-file library Brandon Maier via buildroot
  6 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-25 19:58 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

bats-assert is a helper library providing common assertions for Bats.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-assert which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-assert/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
Changes v1 -> v2:
- fix older versions of `install` that don't support -D
- reorder package/Config.in to comply with check-package

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/bats-assert/Config.in        | 16 ++++++++++++++++
 package/bats-assert/bats-assert.hash |  5 +++++
 package/bats-assert/bats-assert.mk   | 18 ++++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/bats-assert/Config.in
 create mode 100644 package/bats-assert/bats-assert.hash
 create mode 100644 package/bats-assert/bats-assert.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 846dc987a4..4bac9c9d1b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -540,6 +540,7 @@ F:	package/ncdu/
 N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
+F:	package/bats-assert/
 F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
diff --git a/package/Config.in b/package/Config.in
index eef0ccc588..98ff90a005 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -169,6 +169,7 @@ endmenu
 
 menu "Development tools"
 	source "package/avocado/Config.in"
+	source "package/bats-assert/Config.in"
 	source "package/bats-core/Config.in"
 	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
diff --git a/package/bats-assert/Config.in b/package/bats-assert/Config.in
new file mode 100644
index 0000000000..78fa0ac4d5
--- /dev/null
+++ b/package/bats-assert/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_BATS_ASSERT
+	bool "bats-assert"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	select BR2_PACKAGE_BATS_SUPPORT # runtime
+	help
+	  bats-assert is a helper library providing common assertions
+	  for Bats.
+
+	  In the context of this project, an assertion is a function
+	  that perform a test and returns 1 on failure or 0 on success.
+	  To make debugging easier, the assertion also outputs relevant
+	  information on failure. The output is formatted for
+	  readability. To make assertions usable outside of @test
+	  blocks, the output is sent to stderr.
+
+	  https://github.com/bats-core/bats-assert
diff --git a/package/bats-assert/bats-assert.hash b/package/bats-assert/bats-assert.hash
new file mode 100644
index 0000000000..94c3908ab3
--- /dev/null
+++ b/package/bats-assert/bats-assert.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  98ca3b685f8b8993e48ec057565e6e2abcc541034ed5b0e81f191505682037fd  bats-assert-2.1.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-assert/bats-assert.mk b/package/bats-assert/bats-assert.mk
new file mode 100644
index 0000000000..2413b1f699
--- /dev/null
+++ b/package/bats-assert/bats-assert.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# bats-assert
+#
+################################################################################
+
+BATS_ASSERT_VERSION = 2.1.0
+BATS_ASSERT_SITE = $(call github,bats-core,bats-assert,v$(BATS_ASSERT_VERSION))
+BATS_ASSERT_LICENSE = CC0-1.0
+BATS_ASSERT_LICENSE_FILES = LICENSE
+
+define BATS_ASSERT_INSTALL_TARGET_CMDS
+	install -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-assert/src
+	install -m 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-assert"
+	install -m 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-assert/src"
+endef
+
+$(eval $(generic-package))
-- 
2.44.0

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

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

* [Buildroot] [PATCH v2 4/4] package/bats-file: add bats-file library
  2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
                   ` (5 preceding siblings ...)
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 3/4] package/bats-assert: add bats-assert library Brandon Maier via buildroot
@ 2024-04-25 19:58 ` Brandon Maier via buildroot
  6 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-04-25 19:58 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

bats-file is a helper library providing common filesystem related
assertions and helpers for Bats.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-file which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-file/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
Changes v1 -> v2:
- fix older versions of `install` that don't support -D
---
 DEVELOPERS                       |  1 +
 package/Config.in                |  1 +
 package/bats-file/Config.in      | 15 +++++++++++++++
 package/bats-file/bats-file.hash |  5 +++++
 package/bats-file/bats-file.mk   | 18 ++++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/bats-file/Config.in
 create mode 100644 package/bats-file/bats-file.hash
 create mode 100644 package/bats-file/bats-file.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 4bac9c9d1b..d2c45c905f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -541,6 +541,7 @@ N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
 F:	package/bats-assert/
+F:	package/bats-file/
 F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
diff --git a/package/Config.in b/package/Config.in
index 98ff90a005..4af0e52b58 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -171,6 +171,7 @@ menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-assert/Config.in"
 	source "package/bats-core/Config.in"
+	source "package/bats-file/Config.in"
 	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
diff --git a/package/bats-file/Config.in b/package/bats-file/Config.in
new file mode 100644
index 0000000000..fa9312c9e4
--- /dev/null
+++ b/package/bats-file/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_BATS_FILE
+	bool "bats-file"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	select BR2_PACKAGE_BATS_SUPPORT # runtime
+	help
+	  bats-file is a helper library providing common filesystem
+	  related assertions and helpers for Bats.
+
+	  Assertions are functions that perform a test and output
+	  relevant information on failure to help debugging. They return
+	  1 on failure and 0 otherwise. Output, formatted for
+	  readability, is sent to the standard error to make assertions
+	  usable outside of @test blocks too.
+
+	  https://github.com/bats-core/bats-file
diff --git a/package/bats-file/bats-file.hash b/package/bats-file/bats-file.hash
new file mode 100644
index 0000000000..9530dc6d9d
--- /dev/null
+++ b/package/bats-file/bats-file.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  9b69043241f3af1c2d251f89b4fcafa5df3f05e97b89db18d7c9bdf5731bb27a  bats-file-0.4.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-file/bats-file.mk b/package/bats-file/bats-file.mk
new file mode 100644
index 0000000000..66c2a7b9f3
--- /dev/null
+++ b/package/bats-file/bats-file.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# bats-file
+#
+################################################################################
+
+BATS_FILE_VERSION = 0.4.0
+BATS_FILE_SITE = $(call github,bats-core,bats-file,v$(BATS_FILE_VERSION))
+BATS_FILE_LICENSE = CC0-1.0
+BATS_FILE_LICENSE_FILES = LICENSE
+
+define BATS_FILE_INSTALL_TARGET_CMDS
+	install -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-file/src
+	install -m 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-file"
+	install -m 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-file/src"
+endef
+
+$(eval $(generic-package))
-- 
2.44.0

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

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

* Re: [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
@ 2024-05-01 21:09   ` Thomas Petazzoni via buildroot
  2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
  1 sibling, 0 replies; 16+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-01 21:09 UTC (permalink / raw)
  To: Brandon Maier via buildroot; +Cc: Brandon Maier

On Thu, 25 Apr 2024 19:58:13 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> https://github.com/bats-core/bats-core/releases/tag/v1.11.0
> https://github.com/bats-core/bats-core/releases/tag/v1.10.0
> https://github.com/bats-core/bats-core/releases/tag/v1.9.0
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
>  package/bats-core/bats-core.hash | 2 +-
>  package/bats-core/bats-core.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
@ 2024-05-01 21:13   ` Thomas Petazzoni via buildroot
  2024-05-03  2:01     ` [Buildroot] [External] " Maier, Brandon L Collins via buildroot
  0 siblings, 1 reply; 16+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-01 21:13 UTC (permalink / raw)
  To: Brandon Maier via buildroot; +Cc: Brandon Maier

Hello Brandon,

Thanks for the patch!

Commit title should be:

	package/bats-support: new package

More comments below.

On Thu, 25 Apr 2024 19:58:14 +0000
Brandon Maier via buildroot <buildroot@buildroot.org> wrote:

> This library provides support functions needed by the bats-assert and
> bats-file libraries.
> 
> This library does not provide an installer. Manually install the files
> under /usr/lib/bats/bats-support which is what the Arch Linux package
> does[1]. This makes the library loadable using `bats_load_library`[2].
> 
> [1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-support/-/blob/main/PKGBUILD?ref_type=heads
> [2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
> Changes v1 -> v2:
> - fix older versions of `install` that don't support -D

Hu? We use the -D option of install everywhere in Buildroot. How can
your build work if you have a version of install that doesn't support
-D ?
> +define BATS_SUPPORT_INSTALL_TARGET_CMDS
> +	install -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-support/src
> +	install -m 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-support"
> +	install -m 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-support/src"

Use $(INSTALL) instead of install.

You can skip the double quotes around the file paths. We don't double
quotes the paths in any other Buildroot .mk file.

Also, -m 0644 is not consistent with how the files from bats-core are
installed:

$ ls -l output/target/usr/lib/bats-core/
total 68
-rwxr-xr-x. 1 thomas thomas  7988  1 mai   23:03 common.bash
-rwxr-xr-x. 1 thomas thomas  6058  1 mai   23:03 formatter.bash
-rwxr-xr-x. 1 thomas thomas   838  1 mai   23:03 preprocessing.bash
-rwxr-xr-x. 1 thomas thomas  3722  1 mai   23:03 semaphore.bash
-rwxr-xr-x. 1 thomas thomas 16483  1 mai   23:03 test_functions.bash
-rwxr-xr-x. 1 thomas thomas 14979  1 mai   23:03 tracing.bash
-rwxr-xr-x. 1 thomas thomas  1019  1 mai   23:03 validator.bash
-rwxr-xr-x. 1 thomas thomas  1900  1 mai   23:03 warnings.bash

They are installed 0755. Should we try to be consistent with this? Or
it doesn't make sense for a specific reason?

Also, while not mandatory at all, it would be nice to have small
runtime tests for these bats-* packages. Nothing fancy, just something
stupid/simple that exercises a bit those packages.

These comments apply in a completely identical way to the other 2
patches in this series.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 1/4] package/bats-support: new package
  2024-04-25 19:58 ` [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
  2024-05-01 21:09   ` Thomas Petazzoni via buildroot
@ 2024-05-03  1:59   ` Brandon Maier via buildroot
  2024-05-03  1:59     ` [Buildroot] [PATCH v3 2/4] package/bats-assert: " Brandon Maier via buildroot
                       ` (3 more replies)
  1 sibling, 4 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-05-03  1:59 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

This library provides support functions needed by the bats-assert and
bats-file libraries.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-support which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-support/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
v2:
- fix older versions of install that don't support -D with -t

v3:
- fix commit subject to be 'new package'
- switch 'install' to '$(INSTALL)'
- install with 0755 permissions
- remove unneeded quotes
---
 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/bats-support/Config.in         |  8 ++++++++
 package/bats-support/bats-support.hash |  5 +++++
 package/bats-support/bats-support.mk   | 18 ++++++++++++++++++
 5 files changed, 33 insertions(+)
 create mode 100644 package/bats-support/Config.in
 create mode 100644 package/bats-support/bats-support.hash
 create mode 100644 package/bats-support/bats-support.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 5d198567d8..7fc46d6b43 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -540,6 +540,7 @@ F:	package/ncdu/
 N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
+F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
 F:	package/unifdef/
diff --git a/package/Config.in b/package/Config.in
index 38e9c94198..f1da714418 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -170,6 +170,7 @@ endmenu
 menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-core/Config.in"
+	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
 	source "package/bsdiff/Config.in"
diff --git a/package/bats-support/Config.in b/package/bats-support/Config.in
new file mode 100644
index 0000000000..24b49cee1d
--- /dev/null
+++ b/package/bats-support/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_BATS_SUPPORT
+	bool "bats-support"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	help
+	  bats-support is a supporting library providing common
+	  functions to test helper libraries written for Bats.
+
+	  https://github.com/bats-core/bats-support
diff --git a/package/bats-support/bats-support.hash b/package/bats-support/bats-support.hash
new file mode 100644
index 0000000000..847f39e7c7
--- /dev/null
+++ b/package/bats-support/bats-support.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f  bats-support-0.3.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-support/bats-support.mk b/package/bats-support/bats-support.mk
new file mode 100644
index 0000000000..765e08ffce
--- /dev/null
+++ b/package/bats-support/bats-support.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# bats-support
+#
+################################################################################
+
+BATS_SUPPORT_VERSION = 0.3.0
+BATS_SUPPORT_SITE = $(call github,bats-core,bats-support,v$(BATS_SUPPORT_VERSION))
+BATS_SUPPORT_LICENSE = CC0-1.0
+BATS_SUPPORT_LICENSE_FILES = LICENSE
+
+define BATS_SUPPORT_INSTALL_TARGET_CMDS
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-support/src
+	$(INSTALL) -m 0755 $(@D)/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-support
+	$(INSTALL) -m 0755 $(@D)/src/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-support/src
+endef
+
+$(eval $(generic-package))
-- 
2.44.0

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

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

* [Buildroot] [PATCH v3 2/4] package/bats-assert: new package
  2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
@ 2024-05-03  1:59     ` Brandon Maier via buildroot
  2024-05-03  1:59     ` [Buildroot] [PATCH v3 3/4] package/bats-file: " Brandon Maier via buildroot
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-05-03  1:59 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

bats-assert is a helper library providing common assertions for Bats.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-assert which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-assert/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
v2:
- fix older versions of install that don't support -D with -t

v3:
- fix commit subject to be 'new package'
- switch 'install' to '$(INSTALL)'
- install with 0755 permissions
- remove unneeded quotes
---
 DEVELOPERS                           |  1 +
 package/Config.in                    |  1 +
 package/bats-assert/Config.in        | 16 ++++++++++++++++
 package/bats-assert/bats-assert.hash |  5 +++++
 package/bats-assert/bats-assert.mk   | 18 ++++++++++++++++++
 5 files changed, 41 insertions(+)
 create mode 100644 package/bats-assert/Config.in
 create mode 100644 package/bats-assert/bats-assert.hash
 create mode 100644 package/bats-assert/bats-assert.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 7fc46d6b43..2dfd5afd34 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -540,6 +540,7 @@ F:	package/ncdu/
 N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
+F:	package/bats-assert/
 F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
diff --git a/package/Config.in b/package/Config.in
index f1da714418..673fc9a811 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -169,6 +169,7 @@ endmenu
 
 menu "Development tools"
 	source "package/avocado/Config.in"
+	source "package/bats-assert/Config.in"
 	source "package/bats-core/Config.in"
 	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
diff --git a/package/bats-assert/Config.in b/package/bats-assert/Config.in
new file mode 100644
index 0000000000..78fa0ac4d5
--- /dev/null
+++ b/package/bats-assert/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_BATS_ASSERT
+	bool "bats-assert"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	select BR2_PACKAGE_BATS_SUPPORT # runtime
+	help
+	  bats-assert is a helper library providing common assertions
+	  for Bats.
+
+	  In the context of this project, an assertion is a function
+	  that perform a test and returns 1 on failure or 0 on success.
+	  To make debugging easier, the assertion also outputs relevant
+	  information on failure. The output is formatted for
+	  readability. To make assertions usable outside of @test
+	  blocks, the output is sent to stderr.
+
+	  https://github.com/bats-core/bats-assert
diff --git a/package/bats-assert/bats-assert.hash b/package/bats-assert/bats-assert.hash
new file mode 100644
index 0000000000..94c3908ab3
--- /dev/null
+++ b/package/bats-assert/bats-assert.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  98ca3b685f8b8993e48ec057565e6e2abcc541034ed5b0e81f191505682037fd  bats-assert-2.1.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-assert/bats-assert.mk b/package/bats-assert/bats-assert.mk
new file mode 100644
index 0000000000..c0e37e0048
--- /dev/null
+++ b/package/bats-assert/bats-assert.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# bats-assert
+#
+################################################################################
+
+BATS_ASSERT_VERSION = 2.1.0
+BATS_ASSERT_SITE = $(call github,bats-core,bats-assert,v$(BATS_ASSERT_VERSION))
+BATS_ASSERT_LICENSE = CC0-1.0
+BATS_ASSERT_LICENSE_FILES = LICENSE
+
+define BATS_ASSERT_INSTALL_TARGET_CMDS
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-assert/src
+	$(INSTALL) -m 0755 $(@D)/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-assert
+	$(INSTALL) -m 0755 $(@D)/src/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-assert/src
+endef
+
+$(eval $(generic-package))
-- 
2.44.0

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

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

* [Buildroot] [PATCH v3 3/4] package/bats-file: new package
  2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
  2024-05-03  1:59     ` [Buildroot] [PATCH v3 2/4] package/bats-assert: " Brandon Maier via buildroot
@ 2024-05-03  1:59     ` Brandon Maier via buildroot
  2024-05-03  2:00     ` [Buildroot] [PATCH v3 4/4] support/testing: add bats runtime test Brandon Maier via buildroot
  2024-05-05  9:21     ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Yann E. MORIN
  3 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-05-03  1:59 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

bats-file is a helper library providing common filesystem related
assertions and helpers for Bats.

This library does not provide an installer. Manually install the files
under /usr/lib/bats/bats-file which is what the Arch Linux package
does[1]. This makes the library loadable using `bats_load_library`[2].

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-file/-/blob/main/PKGBUILD?ref_type=heads
[2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
v2:
- fix older versions of install that don't support -D with -t

v3:
- fix commit subject to be 'new package'
- switch 'install' to '$(INSTALL)'
- install with 0755 permissions
- remove unneeded quotes
---
 DEVELOPERS                       |  1 +
 package/Config.in                |  1 +
 package/bats-file/Config.in      | 15 +++++++++++++++
 package/bats-file/bats-file.hash |  5 +++++
 package/bats-file/bats-file.mk   | 18 ++++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/bats-file/Config.in
 create mode 100644 package/bats-file/bats-file.hash
 create mode 100644 package/bats-file/bats-file.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 2dfd5afd34..c2d3f52a59 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -541,6 +541,7 @@ N:	Brandon Maier <brandon.maier@collins.com>
 F:	board/freescale/ls1046a-frwy/
 F:	configs/ls1046a-frwy_defconfig
 F:	package/bats-assert/
+F:	package/bats-file/
 F:	package/bats-support/
 F:	package/python-pysensors/
 F:	package/qoriq-fm-ucode/
diff --git a/package/Config.in b/package/Config.in
index 673fc9a811..eac9b74ba4 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -171,6 +171,7 @@ menu "Development tools"
 	source "package/avocado/Config.in"
 	source "package/bats-assert/Config.in"
 	source "package/bats-core/Config.in"
+	source "package/bats-file/Config.in"
 	source "package/bats-support/Config.in"
 	source "package/binutils/Config.in"
 	source "package/bitwise/Config.in"
diff --git a/package/bats-file/Config.in b/package/bats-file/Config.in
new file mode 100644
index 0000000000..fa9312c9e4
--- /dev/null
+++ b/package/bats-file/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_BATS_FILE
+	bool "bats-file"
+	depends on BR2_PACKAGE_BATS_CORE # runtime
+	select BR2_PACKAGE_BATS_SUPPORT # runtime
+	help
+	  bats-file is a helper library providing common filesystem
+	  related assertions and helpers for Bats.
+
+	  Assertions are functions that perform a test and output
+	  relevant information on failure to help debugging. They return
+	  1 on failure and 0 otherwise. Output, formatted for
+	  readability, is sent to the standard error to make assertions
+	  usable outside of @test blocks too.
+
+	  https://github.com/bats-core/bats-file
diff --git a/package/bats-file/bats-file.hash b/package/bats-file/bats-file.hash
new file mode 100644
index 0000000000..9530dc6d9d
--- /dev/null
+++ b/package/bats-file/bats-file.hash
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256  9b69043241f3af1c2d251f89b4fcafa5df3f05e97b89db18d7c9bdf5731bb27a  bats-file-0.4.0.tar.gz
+
+# License files
+sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
diff --git a/package/bats-file/bats-file.mk b/package/bats-file/bats-file.mk
new file mode 100644
index 0000000000..0499327fe0
--- /dev/null
+++ b/package/bats-file/bats-file.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# bats-file
+#
+################################################################################
+
+BATS_FILE_VERSION = 0.4.0
+BATS_FILE_SITE = $(call github,bats-core,bats-file,v$(BATS_FILE_VERSION))
+BATS_FILE_LICENSE = CC0-1.0
+BATS_FILE_LICENSE_FILES = LICENSE
+
+define BATS_FILE_INSTALL_TARGET_CMDS
+	$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-file/src
+	$(INSTALL) -m 0755 $(@D)/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-file
+	$(INSTALL) -m 0755 $(@D)/src/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-file/src
+endef
+
+$(eval $(generic-package))
-- 
2.44.0

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

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

* [Buildroot] [PATCH v3 4/4] support/testing: add bats runtime test
  2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
  2024-05-03  1:59     ` [Buildroot] [PATCH v3 2/4] package/bats-assert: " Brandon Maier via buildroot
  2024-05-03  1:59     ` [Buildroot] [PATCH v3 3/4] package/bats-file: " Brandon Maier via buildroot
@ 2024-05-03  2:00     ` Brandon Maier via buildroot
  2024-05-05  9:21     ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Yann E. MORIN
  3 siblings, 0 replies; 16+ messages in thread
From: Brandon Maier via buildroot @ 2024-05-03  2:00 UTC (permalink / raw)
  To: buildroot; +Cc: Brandon Maier, Thomas Petazzoni

Tests the bats-core, bats-support, bats-assert, and bats-file packages.

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 support/testing/tests/package/test_bats.py    | 33 +++++++++++++++++++
 .../rootfs-overlay/root/test-bats-assert.bats | 11 +++++++
 .../rootfs-overlay/root/test-bats-core.bats   | 11 +++++++
 .../rootfs-overlay/root/test-bats-file.bats   | 10 ++++++
 4 files changed, 65 insertions(+)
 create mode 100644 support/testing/tests/package/test_bats.py
 create mode 100755 support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-assert.bats
 create mode 100755 support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-core.bats
 create mode 100755 support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-file.bats

diff --git a/support/testing/tests/package/test_bats.py b/support/testing/tests/package/test_bats.py
new file mode 100644
index 0000000000..c75a6df294
--- /dev/null
+++ b/support/testing/tests/package/test_bats.py
@@ -0,0 +1,33 @@
+import os
+
+import infra.basetest
+
+
+class TestBats(infra.basetest.BRTest):
+    config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+        """
+        BR2_ENABLE_LOCALE_WHITELIST=""
+        BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y
+        BR2_PACKAGE_BASH=y
+        BR2_PACKAGE_BATS_CORE=y
+        BR2_PACKAGE_BATS_ASSERT=y
+        BR2_PACKAGE_BATS_FILE=y
+        BR2_ROOTFS_OVERLAY="{}"
+        BR2_TARGET_ROOTFS_CPIO=y
+        # BR2_TARGET_ROOTFS_TAR is not set
+        """.format(
+           # overlay to add a gnuradio python test script
+           infra.filepath("tests/package/test_bats/rootfs-overlay"))
+
+    def test_run(self):
+        cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+        self.emulator.boot(arch="armv5",
+                           kernel="builtin",
+                           options=["-initrd", cpio_file])
+        self.emulator.login()
+
+        self.assertRunOk("bats --version")
+
+        self.assertRunOk("bats /root/test-bats-core.bats", timeout=5)
+        self.assertRunOk("bats /root/test-bats-assert.bats", timeout=5)
+        self.assertRunOk("bats /root/test-bats-file.bats", timeout=5)
diff --git a/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-assert.bats b/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-assert.bats
new file mode 100755
index 0000000000..cd0cb48290
--- /dev/null
+++ b/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-assert.bats
@@ -0,0 +1,11 @@
+#!/usr/bin/env bats
+
+setup() {
+    bats_load_library bats-support
+    bats_load_library bats-assert
+}
+
+@test "bats-assert assert_output" {
+    run echo "Hello World"
+    assert_output "Hello World"
+}
diff --git a/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-core.bats b/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-core.bats
new file mode 100755
index 0000000000..54ec941e03
--- /dev/null
+++ b/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-core.bats
@@ -0,0 +1,11 @@
+#!/usr/bin/env bats
+
+@test "bats-core true" {
+    true
+}
+
+@test "bats-core run" {
+    run echo "Hello World"
+    [ "$status" -eq 0 ]
+    [ "$output" = "Hello World" ]
+}
diff --git a/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-file.bats b/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-file.bats
new file mode 100755
index 0000000000..0ac2616b99
--- /dev/null
+++ b/support/testing/tests/package/test_bats/rootfs-overlay/root/test-bats-file.bats
@@ -0,0 +1,10 @@
+#!/usr/bin/env bats
+
+setup() {
+    bats_load_library bats-support
+    bats_load_library bats-file
+}
+
+@test "bats-file assert_exists" {
+    assert_exists /root/test-bats-file.bats
+}
-- 
2.44.0

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

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

* Re: [Buildroot] [External] Re: [PATCH v2 2/4] package/bats-support: add bats support library
  2024-05-01 21:13   ` Thomas Petazzoni via buildroot
@ 2024-05-03  2:01     ` Maier, Brandon L Collins via buildroot
  0 siblings, 0 replies; 16+ messages in thread
From: Maier, Brandon L Collins via buildroot @ 2024-05-03  2:01 UTC (permalink / raw)
  To: Thomas Petazzoni, Brandon Maier via buildroot

Hi Thomas,

> -----Original Message-----
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Sent: Wednesday, May 1, 2024 4:14 PM
> To: Brandon Maier via buildroot <buildroot@buildroot.org>
> Cc: Maier, Brandon L Collins <Brandon.Maier@collins.com>
> Subject: [External] Re: [Buildroot] [PATCH v2 2/4] package/bats-support: add bats
> support library
> > Changes v1 -> v2:
> > - fix older versions of `install` that don't support -D
>
> Hu? We use the -D option of install everywhere in Buildroot. How can
> your build work if you have a version of install that doesn't support
> -D ?

Sorry I didn't look at this close enough. It's an issue that older versions of `install` didn't support using both `-D` and `-t <dir>` at the same time.

> > +define BATS_SUPPORT_INSTALL_TARGET_CMDS
> > +   install -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-support/src
> > +   install -m 0644 $(@D)/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-
> support"
> > +   install -m 0644 $(@D)/src/*.bash -t "$(TARGET_DIR)/usr/lib/bats/bats-
> support/src"
>
> Use $(INSTALL) instead of install.
>
> You can skip the double quotes around the file paths. We don't double
> quotes the paths in any other Buildroot .mk file.
>
> Also, -m 0644 is not consistent with how the files from bats-core are
> installed:
>
> $ ls -l output/target/usr/lib/bats-core/
> total 68
> -rwxr-xr-x. 1 thomas thomas  7988  1 mai   23:03 common.bash
> -rwxr-xr-x. 1 thomas thomas  6058  1 mai   23:03 formatter.bash
> -rwxr-xr-x. 1 thomas thomas   838  1 mai   23:03 preprocessing.bash
> -rwxr-xr-x. 1 thomas thomas  3722  1 mai   23:03 semaphore.bash
> -rwxr-xr-x. 1 thomas thomas 16483  1 mai   23:03 test_functions.bash
> -rwxr-xr-x. 1 thomas thomas 14979  1 mai   23:03 tracing.bash
> -rwxr-xr-x. 1 thomas thomas  1019  1 mai   23:03 validator.bash
> -rwxr-xr-x. 1 thomas thomas  1900  1 mai   23:03 warnings.bash
>
> They are installed 0755. Should we try to be consistent with this? Or
> it doesn't make sense for a specific reason?

I will change to make it consistent. Both 0755 or 0644 would work as the files must be sourced, which only needs read permission.

>
> Also, while not mandatory at all, it would be nice to have small
> runtime tests for these bats-* packages. Nothing fancy, just something
> stupid/simple that exercises a bit those packages.
>
> These comments apply in a completely identical way to the other 2
> patches in this series.
>
> Thanks!
>
> Thomas

Thanks for the review! I agree with the other comments as well. I sent a v3 with changes.

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

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

* Re: [Buildroot] [PATCH v3 1/4] package/bats-support: new package
  2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
                       ` (2 preceding siblings ...)
  2024-05-03  2:00     ` [Buildroot] [PATCH v3 4/4] support/testing: add bats runtime test Brandon Maier via buildroot
@ 2024-05-05  9:21     ` Yann E. MORIN
  3 siblings, 0 replies; 16+ messages in thread
From: Yann E. MORIN @ 2024-05-05  9:21 UTC (permalink / raw)
  To: Brandon Maier; +Cc: Thomas Petazzoni, buildroot

Brandon, All,

On 2024-05-03 01:59 +0000, Brandon Maier via buildroot spake thusly:
> This library provides support functions needed by the bats-assert and
> bats-file libraries.
> 
> This library does not provide an installer. Manually install the files
> under /usr/lib/bats/bats-support which is what the Arch Linux package
> does[1]. This makes the library loadable using `bats_load_library`[2].
> 
> [1] https://gitlab.archlinux.org/archlinux/packaging/packages/bats-support/-/blob/main/PKGBUILD?ref_type=heads
> [2] https://bats-core.readthedocs.io/en/stable/writing-tests.html#bats-load-library-load-system-wide-libraries
> 
> Signed-off-by: Brandon Maier <brandon.maier@collins.com>
> ---
[--SNIP--]
> diff --git a/package/Config.in b/package/Config.in
> index 38e9c94198..f1da714418 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -170,6 +170,7 @@ endmenu
>  menu "Development tools"
>  	source "package/avocado/Config.in"
>  	source "package/bats-core/Config.in"
> +	source "package/bats-support/Config.in"

While this looks like the thing to do, including the bats sub-packages
from here is sub-optimal. Indeed, when all the series is applied, the
menuconfig will look something like:

    [ ] bats-assert (NEW)
    [*] bats
    [ ]   bats-file (NEW)
    [ ]   bats-support (NEW)

This is not very nice-looking.

Instead, I've moved the 'source' statements to the bats-core package
itself (elided for brevity; check the actual package for exact code):

    config BR2_PACKAGE_BATS_CORE
        bool "bats-core"

    if BR2_PACKAGE_BATS_CORE

    source "package/bats-assert/Config.in"
    source "package/bats-file/Config.in"
    source "package/bats-support/Config.in"

    endif

Now the menuconfig looks nicer:

    [*] bats
    [ ]   bats-assert (NEW)
    [ ]   bats-file (NEW)
    [ ]   bats-support (NEW)

As a consequence of the includes now being guarded by the if-endif
conditional block, the dependency on bats-core is no longer needed on
each package, so I also dropped it.

Series applied to master with this little cleanup, thanks!

Regards,
Yann E. MORIN.

>  	source "package/binutils/Config.in"
>  	source "package/bitwise/Config.in"
>  	source "package/bsdiff/Config.in"
> diff --git a/package/bats-support/Config.in b/package/bats-support/Config.in
> new file mode 100644
> index 0000000000..24b49cee1d
> --- /dev/null
> +++ b/package/bats-support/Config.in
> @@ -0,0 +1,8 @@
> +config BR2_PACKAGE_BATS_SUPPORT
> +	bool "bats-support"
> +	depends on BR2_PACKAGE_BATS_CORE # runtime
> +	help
> +	  bats-support is a supporting library providing common
> +	  functions to test helper libraries written for Bats.
> +
> +	  https://github.com/bats-core/bats-support
> diff --git a/package/bats-support/bats-support.hash b/package/bats-support/bats-support.hash
> new file mode 100644
> index 0000000000..847f39e7c7
> --- /dev/null
> +++ b/package/bats-support/bats-support.hash
> @@ -0,0 +1,5 @@
> +# Locally calculated
> +sha256  7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f  bats-support-0.3.0.tar.gz
> +
> +# License files
> +sha256  36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673  LICENSE
> diff --git a/package/bats-support/bats-support.mk b/package/bats-support/bats-support.mk
> new file mode 100644
> index 0000000000..765e08ffce
> --- /dev/null
> +++ b/package/bats-support/bats-support.mk
> @@ -0,0 +1,18 @@
> +################################################################################
> +#
> +# bats-support
> +#
> +################################################################################
> +
> +BATS_SUPPORT_VERSION = 0.3.0
> +BATS_SUPPORT_SITE = $(call github,bats-core,bats-support,v$(BATS_SUPPORT_VERSION))
> +BATS_SUPPORT_LICENSE = CC0-1.0
> +BATS_SUPPORT_LICENSE_FILES = LICENSE
> +
> +define BATS_SUPPORT_INSTALL_TARGET_CMDS
> +	$(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/bats/bats-support/src
> +	$(INSTALL) -m 0755 $(@D)/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-support
> +	$(INSTALL) -m 0755 $(@D)/src/*.bash -t $(TARGET_DIR)/usr/lib/bats/bats-support/src
> +endef
> +
> +$(eval $(generic-package))
> -- 
> 2.44.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-05-05  9:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12 21:08 [Buildroot] [PATCH 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
2024-04-12 21:08 ` [Buildroot] [PATCH 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
2024-04-12 21:08 ` [Buildroot] [PATCH 3/4] package/bats-assert: add bats-assert library Brandon Maier via buildroot
2024-04-12 21:08 ` [Buildroot] [PATCH 4/4] package/bats-file: add bats-file library Brandon Maier via buildroot
2024-04-25 19:58 ` [Buildroot] [PATCH v2 1/4] package/bats-core: bump to version 1.11.0 Brandon Maier via buildroot
2024-05-01 21:09   ` Thomas Petazzoni via buildroot
2024-05-03  1:59   ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Brandon Maier via buildroot
2024-05-03  1:59     ` [Buildroot] [PATCH v3 2/4] package/bats-assert: " Brandon Maier via buildroot
2024-05-03  1:59     ` [Buildroot] [PATCH v3 3/4] package/bats-file: " Brandon Maier via buildroot
2024-05-03  2:00     ` [Buildroot] [PATCH v3 4/4] support/testing: add bats runtime test Brandon Maier via buildroot
2024-05-05  9:21     ` [Buildroot] [PATCH v3 1/4] package/bats-support: new package Yann E. MORIN
2024-04-25 19:58 ` [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library Brandon Maier via buildroot
2024-05-01 21:13   ` Thomas Petazzoni via buildroot
2024-05-03  2:01     ` [Buildroot] [External] " Maier, Brandon L Collins via buildroot
2024-04-25 19:58 ` [Buildroot] [PATCH v2 3/4] package/bats-assert: add bats-assert library Brandon Maier via buildroot
2024-04-25 19:58 ` [Buildroot] [PATCH v2 4/4] package/bats-file: add bats-file library Brandon Maier via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox