mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
Merge pull request #10650 from fricklerhandwerk/simplify-shell-tests
tests: remove unneeded indirection
This commit is contained in:
commit
ea70878a76
@ -17,11 +17,3 @@ TESTS_ENVIRONMENT=(
|
||||
run () {
|
||||
cd "$(dirname $1)" && env "${TESTS_ENVIRONMENT[@]}" $BASH -x -e -u -o pipefail $(basename $1)
|
||||
}
|
||||
|
||||
init_test () {
|
||||
run "$init" 2>/dev/null > /dev/null
|
||||
}
|
||||
|
||||
run_test_proper () {
|
||||
run "$test"
|
||||
}
|
||||
|
@ -9,6 +9,6 @@ dir="$(dirname "${BASH_SOURCE[0]}")"
|
||||
source "$dir/common-test.sh"
|
||||
|
||||
if [ -n "$init" ]; then
|
||||
(init_test)
|
||||
(run "$init" 2>/dev/null > /dev/null)
|
||||
fi
|
||||
run_test_proper
|
||||
run "$test"
|
||||
|
@ -23,9 +23,9 @@ fi
|
||||
|
||||
run_test () {
|
||||
if [ -n "$init" ]; then
|
||||
(init_test 2>/dev/null > /dev/null)
|
||||
(run "$init" 2>/dev/null > /dev/null)
|
||||
fi
|
||||
log="$(run_test_proper 2>&1)" && status=0 || status=$?
|
||||
log="$(run "$test" 2>&1)" && status=0 || status=$?
|
||||
}
|
||||
|
||||
run_test
|
||||
|
Loading…
Reference in New Issue
Block a user