mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-26 16:18:52 +03:00
run-tests: fix CLI
Restore the original behavior that was accidentally changed: When no args are given, run the basic test suite. Otherwise, run the given command with default scenario 'default'. Previously, `run-tests.sh build` ran the basic test suite instead of building the default scenario.
This commit is contained in:
parent
b2a7158c4e
commit
8cbdef8bf6
@ -185,20 +185,22 @@ all() {
|
||||
scenario=netnsRegtest buildTest "$@"
|
||||
}
|
||||
|
||||
# An alias for buildTest
|
||||
build() {
|
||||
if [[ $scenario ]]; then
|
||||
buildTest "$@"
|
||||
else
|
||||
basic "$@"
|
||||
fi
|
||||
buildTest "$@"
|
||||
}
|
||||
|
||||
command="${1:-build}"
|
||||
shift || true
|
||||
if [[ $command != build ]]; then
|
||||
if [[ $# > 0 && $1 != -* ]]; then
|
||||
# An explicit command was provided
|
||||
command=$1
|
||||
shift
|
||||
if [[ $command == eval ]]; then
|
||||
command=evalTest
|
||||
fi
|
||||
: ${scenario:=default}
|
||||
fi
|
||||
if [[ $command == eval ]]; then
|
||||
command=evalTest
|
||||
elif [[ $scenario ]]; then
|
||||
command=buildTest
|
||||
else
|
||||
command=basic
|
||||
fi
|
||||
$command "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user