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