From da8cf80f72e817fdd92dae8a70d1afa92fdff921 Mon Sep 17 00:00:00 2001 From: Simon Schmid Date: Sun, 10 Nov 2024 23:26:50 +0100 Subject: [PATCH] Add -m option to run manual tests --- test/run | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/run b/test/run index e9a56f4..d4a9d51 100755 --- a/test/run +++ b/test/run @@ -8,7 +8,8 @@ run_tests() { DOCKER_BUILDKIT=1 docker build --target test -t "sschmid/pw/test/$1" -f "docker/$1/Dockerfile" . } -while getopts ":aj:p:" options; do +cmd_options=() +while getopts ":aj:mp:" options; do case "${options}" in a) run_tests alpine @@ -18,7 +19,11 @@ while getopts ":aj:p:" options; do run_tests ubuntu ;; j) - jobs="${OPTARG}" + cmd_options+=("--jobs" "${OPTARG}") + ;; + m) + export PW_TEST_RUN_MANUAL_TESTS=1 + cmd_options+=("--tap") ;; p) run_tests "${OPTARG}" @@ -32,5 +37,5 @@ while getopts ":aj:p:" options; do done shift $(( OPTIND - 1 )) -test/bats/bin/bats --jobs "${jobs:-1}" "${@:-test}" +test/bats/bin/bats "${cmd_options[@]}" "${@:-test}" test/shellcheck