@@ -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/
@@ -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"
new file mode 100644
@@ -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
new file mode 100644
@@ -0,0 +1,5 @@
+# Locally calculated
+sha256 98ca3b685f8b8993e48ec057565e6e2abcc541034ed5b0e81f191505682037fd bats-assert-2.1.0.tar.gz
+
+# License files
+sha256 36ffd9dc085d529a7e60e1276d73ae5a030b020313e6c5408593a6ae2af39673 LICENSE
new file mode 100644
@@ -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))
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