test: use sh shell in cli pretty test runner (POSIX)

Bash is apparently missing in the Alpine Docker.

Signed-off-by: Richard Alpe <richard@bit42.se>
This commit is contained in:
Richard Alpe
2023-09-19 11:57:08 +02:00
committed by Joachim Wiberg
parent 2830080c0f
commit ebdbc1e7ad
+6 -3
View File
@@ -1,9 +1,7 @@
#!/bin/bash
#!/bin/sh
SCRIPT_PATH="$(dirname "$(readlink -f "$0")")"
set -o pipefail
if [ $# -lt 2 ]; then
echo "Usage: $0 JSON-FILE MODULE [ ARGS ]"
exit 1
@@ -14,6 +12,11 @@ module=$1; shift
echo "1..1"
if [ ! -e "$SCRIPT_PATH/$json" ]; then
echo "not ok 1 - $SCRIPT_PATH/$json not found"
exit 1
fi
cat "$SCRIPT_PATH/$json" | \
"$SCRIPT_PATH"/../../../board/netconf/rootfs/lib/infix/cli-pretty \
"$module" $*