From dcf46b1c7602bb2ddd13e9bcf1fb66a8690f4864 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Tue, 27 Dec 2022 16:20:54 +0100 Subject: test script: Use positional arguments Reported-by: Helmut Grohne --- tests/create-and-run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/create-and-run.sh b/tests/create-and-run.sh index 4b5d986..0e2a3ca 100755 --- a/tests/create-and-run.sh +++ b/tests/create-and-run.sh @@ -2,6 +2,11 @@ # shellcheck disable=SC2086 +if test "$#" -ne 2; then + echo "$(basename $0) takes two positional arguments. architecture and release" 1>&2 + exit 1 +fi + set -ex cleanup() { @@ -11,7 +16,7 @@ cleanup() { trap cleanup EXIT INT TERM QUIT ssh-keygen -f ssh_id -N '' -debvm-create -k ssh_id.pub -o test.ext4 "$@" +debvm-create -k ssh_id.pub -o test.ext4 -a "$1" -r "$2" timeout 240s debvm-run -s 2222 -i test.ext4 & timeout=5 -- cgit v1.2.3