mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
* Tests for fixed-output derivations (and attribute selection, incidentally).
This commit is contained in:
parent
2167bf6b72
commit
78d84f5631
5 changed files with 67 additions and 1 deletions
18
tests/fixed.sh
Normal file
18
tests/fixed.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
source common.sh
|
||||
|
||||
drvs=$($nixinstantiate fixed.nix -A good)
|
||||
echo $drvs
|
||||
$nixstore -r $drvs
|
||||
|
||||
drvs=$($nixinstantiate fixed.nix -A good2)
|
||||
echo $drvs
|
||||
$nixstore -r $drvs
|
||||
|
||||
drvs=$($nixinstantiate fixed.nix -A bad)
|
||||
echo $drvs
|
||||
if $nixstore -r $drvs; then false; fi
|
||||
|
||||
if $nixinstantiate fixed.nix -A reallyBad; then false; fi
|
||||
|
||||
# While we're at it, check attribute selection a bit more.
|
||||
test $($nixinstantiate fixed.nix -A good.1 | wc -l) = 1
|
Loading…
Add table
Add a link
Reference in a new issue