mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-03-08 01:24:09 +01:00
lib/tests: add strict option to checkConfigOutput
This commit is contained in:
parent
c988f82f7a
commit
53b47eb93d
1 changed files with 11 additions and 4 deletions
|
|
@ -58,12 +58,19 @@ logFailure() {
|
|||
evalConfig() {
|
||||
local attr=$1
|
||||
shift
|
||||
local script="import ./default.nix { modules = [ $* ];}"
|
||||
|
||||
local nix_args=()
|
||||
|
||||
if [ "${ABORT_ON_WARN-0}" = "1" ]; then
|
||||
local-nix-instantiate --option abort-on-warn true -E "$script" -A "$attr"
|
||||
else
|
||||
local-nix-instantiate -E "$script" -A "$attr"
|
||||
nix_args+=(--option abort-on-warn true)
|
||||
fi
|
||||
|
||||
if [ "${STRICT_EVAL-0}" = "1" ]; then
|
||||
nix_args+=(--strict)
|
||||
fi
|
||||
|
||||
local script="import ./default.nix { modules = [ $* ];}"
|
||||
local-nix-instantiate "${nix_args[@]}" -E "$script" -A "$attr"
|
||||
}
|
||||
|
||||
reportFailure() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue