From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Brandon Maier via buildroot <buildroot@buildroot.org>
Cc: Brandon Maier <brandon.maier@collins.com>
Subject: Re: [Buildroot] [PATCH v2 2/4] package/bats-support: add bats support library
Date: Wed, 1 May 2024 23:13:46 +0200 [thread overview]
Message-ID: <20240501231346.442f0182@windsurf> (raw)
In-Reply-To: <20240425195816.2758964-2-brandon.maier@collins.com>
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
next prev parent reply other threads:[~2024-05-01 21:13 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 ` [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 [this message]
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=20240501231346.442f0182@windsurf \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox