diff mbox series

[libgpiod,3/3] tools: tests: force bats to use tap output format to remove indirect dependency on ncurses

Message ID 20230612025642.11554-4-warthog618@gmail.com
State New
Headers show
Series tools: tests: minor coverage and | expand

Commit Message

Kent Gibson June 12, 2023, 2:56 a.m. UTC
bats has an implicit depencency on ncurses, as I found when trying to
run the tests on a minimal install that lacked ncurses.
Rather than make the dependency explicit, force the output formatting to
use the TAP format which does not require ncurses.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
---
 tools/gpio-tools-test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartosz Golaszewski June 12, 2023, 6:58 p.m. UTC | #1
On Mon, Jun 12, 2023 at 4:57 AM Kent Gibson <warthog618@gmail.com> wrote:
>
> bats has an implicit depencency on ncurses, as I found when trying to
> run the tests on a minimal install that lacked ncurses.
> Rather than make the dependency explicit, force the output formatting to
> use the TAP format which does not require ncurses.
>
> Signed-off-by: Kent Gibson <warthog618@gmail.com>
> ---
>  tools/gpio-tools-test | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/gpio-tools-test b/tools/gpio-tools-test
> index ed39ed5..441ec66 100755
> --- a/tools/gpio-tools-test
> +++ b/tools/gpio-tools-test
> @@ -54,4 +54,4 @@ modprobe gpio-sim || die "unable to load the gpio-sim module"
>  mountpoint /sys/kernel/config/ > /dev/null 2> /dev/null || \
>         die "configfs not mounted at /sys/kernel/config/"
>
> -exec $BATS_PATH $SOURCE_DIR/$BATS_SCRIPT ${1+"$@"}
> +exec $BATS_PATH -F tap $SOURCE_DIR/$BATS_SCRIPT ${1+"$@"}
> --
> 2.40.1
>

That's interesting. I will backport it as this affects the recipe in
meta-openembedded an every distro that wants to package it with
run-time dependencies satisfied.

Thanks. I applied all three patches.

Bart
diff mbox series

Patch

diff --git a/tools/gpio-tools-test b/tools/gpio-tools-test
index ed39ed5..441ec66 100755
--- a/tools/gpio-tools-test
+++ b/tools/gpio-tools-test
@@ -54,4 +54,4 @@  modprobe gpio-sim || die "unable to load the gpio-sim module"
 mountpoint /sys/kernel/config/ > /dev/null 2> /dev/null || \
 	die "configfs not mounted at /sys/kernel/config/"
 
-exec $BATS_PATH $SOURCE_DIR/$BATS_SCRIPT ${1+"$@"}
+exec $BATS_PATH -F tap $SOURCE_DIR/$BATS_SCRIPT ${1+"$@"}