mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Cleanup test skipping
- Try not to put cryptic "99" in many places Factor out `exit 99` into `skipTest` function - Alows make sure skipping a test is done with a reason `skipTest` takes a mandatory argument - Separate pure conditionals vs side-effectful test skipping. "require daemon" already had this, but "sandbox support" did not.
This commit is contained in:
parent
7f46ebcf90
commit
bfb9eb87fe
15 changed files with 33 additions and 49 deletions
|
@ -1,13 +1,13 @@
|
|||
# Test that we can successfully migrate from an older db schema
|
||||
|
||||
source common.sh
|
||||
|
||||
# Only run this if we have an older Nix available
|
||||
# XXX: This assumes that the `daemon` package is older than the `client` one
|
||||
if [[ -z "${NIX_DAEMON_PACKAGE-}" ]]; then
|
||||
exit 99
|
||||
skipTest "not using the Nix daemon"
|
||||
fi
|
||||
|
||||
source common.sh
|
||||
|
||||
killDaemon
|
||||
|
||||
# Fill the db using the older Nix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue