mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
Merge branch 'master' into fzakaria/shellcheck-functional-dependencies.builder0
This commit is contained in:
commit
a534a27571
7 changed files with 28 additions and 23 deletions
|
|
@ -53,7 +53,9 @@ cd ..
|
|||
## With multiple input flakes
|
||||
[[ "$(NIX_GET_COMPLETIONS=5 nix build ./foo ./bar --override-input '')" == $'normal\na\t\nb\t' ]]
|
||||
## With tilde expansion
|
||||
# shellcheck disable=SC2088
|
||||
[[ "$(HOME=$PWD NIX_GET_COMPLETIONS=4 nix build '~/foo' --override-input '')" == $'normal\na\t' ]]
|
||||
# shellcheck disable=SC2088
|
||||
[[ "$(HOME=$PWD NIX_GET_COMPLETIONS=5 nix flake update --flake '~/foo' '')" == $'normal\na\t' ]]
|
||||
## Out of order
|
||||
[[ "$(NIX_GET_COMPLETIONS=3 nix build --override-input '' '' ./foo)" == $'normal\na\t' ]]
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ prev=$(nix config show | grep '^cores' | cut -d '=' -f 2 | xargs)
|
|||
export NIX_CONFIG="cores = 4242"$'\n'"experimental-features = nix-command flakes"
|
||||
exp_cores=$(nix config show | grep '^cores' | cut -d '=' -f 2 | xargs)
|
||||
exp_features=$(nix config show | grep '^experimental-features' | cut -d '=' -f 2 | xargs)
|
||||
[[ $prev != $exp_cores ]]
|
||||
[[ $prev != "$exp_cores" ]]
|
||||
[[ $exp_cores == "4242" ]]
|
||||
# flakes implies fetch-tree
|
||||
[[ $exp_features == "fetch-tree flakes nix-command" ]]
|
||||
|
|
@ -70,7 +70,7 @@ exp_features=$(nix config show | grep '^experimental-features' | cut -d '=' -f 2
|
|||
# Test that it's possible to retrieve a single setting's value
|
||||
val=$(nix config show | grep '^warn-dirty' | cut -d '=' -f 2 | xargs)
|
||||
val2=$(nix config show warn-dirty)
|
||||
[[ $val == $val2 ]]
|
||||
[[ $val == "$val2" ]]
|
||||
|
||||
# Test unit prefixes.
|
||||
[[ $(nix config show --min-free 64K min-free) = 65536 ]]
|
||||
|
|
|
|||
|
|
@ -11,22 +11,22 @@ echo "derivation is $drvPath"
|
|||
nix-store -q --tree "$drvPath" | grep '───.*builder-dependencies-input-1.sh'
|
||||
|
||||
# Test Graphviz graph generation.
|
||||
nix-store -q --graph "$drvPath" > $TEST_ROOT/graph
|
||||
nix-store -q --graph "$drvPath" > "$TEST_ROOT"/graph
|
||||
if test -n "$dot"; then
|
||||
# Does it parse?
|
||||
$dot < $TEST_ROOT/graph
|
||||
$dot < "$TEST_ROOT"/graph
|
||||
fi
|
||||
|
||||
# Test GraphML graph generation
|
||||
nix-store -q --graphml "$drvPath" > $TEST_ROOT/graphml
|
||||
nix-store -q --graphml "$drvPath" > "$TEST_ROOT"/graphml
|
||||
|
||||
outPath=$(nix-store -rvv "$drvPath") || fail "build failed"
|
||||
|
||||
# Test Graphviz graph generation.
|
||||
nix-store -q --graph "$outPath" > $TEST_ROOT/graph
|
||||
nix-store -q --graph "$outPath" > "$TEST_ROOT"/graph
|
||||
if test -n "$dot"; then
|
||||
# Does it parse?
|
||||
$dot < $TEST_ROOT/graph
|
||||
$dot < "$TEST_ROOT"/graph
|
||||
fi
|
||||
|
||||
nix-store -q --tree "$outPath" | grep '───.*dependencies-input-2'
|
||||
|
|
@ -53,7 +53,7 @@ input2OutPath=$(echo "$deps" | grep "dependencies-input-2")
|
|||
nix-store -q --referrers-closure "$input2OutPath" | grep "$outPath"
|
||||
|
||||
# Check that the derivers are set properly.
|
||||
test $(nix-store -q --deriver "$outPath") = "$drvPath"
|
||||
test "$(nix-store -q --deriver "$outPath")" = "$drvPath"
|
||||
nix-store -q --deriver "$input2OutPath" | grepQuiet -- "-input-2.drv"
|
||||
|
||||
# --valid-derivers returns the currently single valid .drv file
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# shellcheck shell=bash
|
||||
source ../common.sh
|
||||
|
||||
# Need backend to support text-hashing too
|
||||
|
|
|
|||
|
|
@ -11,4 +11,4 @@ clearStore
|
|||
|
||||
out2=$(nix-build ./text-hashed-output.nix -A wrapper --no-out-link)
|
||||
|
||||
diff -r $out1 $out2
|
||||
diff -r "$out1" "$out2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue