From ebdbc1e7ad7997ce0aa3b76a03f3fea0b83d75c1 Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Mon, 18 Sep 2023 13:25:13 +0200 Subject: [PATCH] test: use sh shell in cli pretty test runner (POSIX) Bash is apparently missing in the Alpine Docker. Signed-off-by: Richard Alpe --- test/case/cli_pretty/run.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/case/cli_pretty/run.sh b/test/case/cli_pretty/run.sh index 7b286a0a..a6f04a59 100755 --- a/test/case/cli_pretty/run.sh +++ b/test/case/cli_pretty/run.sh @@ -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" $*