From: Brandon Maier via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Brandon Maier <brandon.maier@collins.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library
Date: Thu, 25 Apr 2024 19:58:14 +0000 [thread overview]
Message-ID: <20240425195816.2758964-2-brandon.maier@collins.com> (raw)
In-Reply-To: <20240412210850.17265-1-brandon.maier@collins.com>
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
next prev parent reply other threads:[~2024-04-25 19:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Brandon Maier via buildroot [this message]
2024-05-01 21:13 ` [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240425195816.2758964-2-brandon.maier@collins.com \
--to=buildroot@buildroot.org \
--cc=brandon.maier@collins.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.