From 0a6b9beda5e02118e8ca6073b02d511cab021227 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 28 Sep 2020 13:09:09 +0200 Subject: [PATCH] run-tests: simplify setting default scenario --- test/run-tests.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/test/run-tests.sh b/test/run-tests.sh index dd1bed6..b3e460d 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -16,8 +16,8 @@ # Example: # ./run-tests.sh -s electrs # -# Run test and link results to avoid garbage collection -# ./run-tests.sh [--scenario ] --out-link-prefix /tmp/nix-bitcoin-test build +# Run test(s) and link results to avoid garbage collection +# ./run-tests.sh [--scenario ] --out-link-prefix /tmp/nix-bitcoin-test # # Pass extra args to nix-build # ./run-tests.sh build --builders 'ssh://mybuildhost - - 15' @@ -178,13 +178,11 @@ build() { fi } -# Set default scenario for all actions other than 'build' -if [[ $1 && $1 != build ]]; then - : ${scenario:=default} -fi - command="${1:-build}" shift || true +if [[ $command != build ]]; then + : ${scenario:=default} +fi if [[ $command == eval ]]; then command=evalTest fi