mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
9afa697ab6
The basic idea here is to separate a few intertwined notions: 1. Not all "run bash tests" are "install tests" 2. Not all "run bash tests" use `tests/functional/init.sh`, or any pre-test initialization at all. This will used in the next commit when we have a test that check unit test golden master data. Also, move our custom `PS4` from the test to the test runner, as it is part of how we want to display the tests, not the test themselves. Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
15 lines
188 B
Bash
Executable File
15 lines
188 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu -o pipefail
|
|
|
|
test=$1
|
|
init=${2-}
|
|
|
|
dir="$(dirname "${BASH_SOURCE[0]}")"
|
|
source "$dir/common-test.sh"
|
|
|
|
if [ -n "$init" ]; then
|
|
(init_test)
|
|
fi
|
|
run_test_proper
|