run-tests: simplify setting default scenario
This commit is contained in:
parent
1a32292e07
commit
0a6b9beda5
@ -16,8 +16,8 @@
|
|||||||
# Example:
|
# Example:
|
||||||
# ./run-tests.sh -s electrs
|
# ./run-tests.sh -s electrs
|
||||||
#
|
#
|
||||||
# Run test and link results to avoid garbage collection
|
# Run test(s) and link results to avoid garbage collection
|
||||||
# ./run-tests.sh [--scenario <scenario>] --out-link-prefix /tmp/nix-bitcoin-test build
|
# ./run-tests.sh [--scenario <scenario>] --out-link-prefix /tmp/nix-bitcoin-test
|
||||||
#
|
#
|
||||||
# Pass extra args to nix-build
|
# Pass extra args to nix-build
|
||||||
# ./run-tests.sh build --builders 'ssh://mybuildhost - - 15'
|
# ./run-tests.sh build --builders 'ssh://mybuildhost - - 15'
|
||||||
@ -178,13 +178,11 @@ build() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set default scenario for all actions other than 'build'
|
|
||||||
if [[ $1 && $1 != build ]]; then
|
|
||||||
: ${scenario:=default}
|
|
||||||
fi
|
|
||||||
|
|
||||||
command="${1:-build}"
|
command="${1:-build}"
|
||||||
shift || true
|
shift || true
|
||||||
|
if [[ $command != build ]]; then
|
||||||
|
: ${scenario:=default}
|
||||||
|
fi
|
||||||
if [[ $command == eval ]]; then
|
if [[ $command == eval ]]; then
|
||||||
command=evalTest
|
command=evalTest
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user