Add a simple test for nix why-depends

This commit is contained in:
regnat 2022-01-18 16:54:53 +01:00
parent f6f0bcf11f
commit 2ad2678c0b
3 changed files with 17 additions and 1 deletions

View file

@ -27,6 +27,8 @@ let {
input1 = input1 + "/.";
input2 = "${input2}/.";
input1_drv = input1;
input2_drv = input2;
input0_drv = input0;
meta.description = "Random test package";
};

View file

@ -61,7 +61,8 @@ nix_tests = \
ca/concurrent-builds.sh \
ca/nix-copy.sh \
eval-store.sh \
readfile-context.sh
readfile-context.sh \
why-depends.sh
# parallel.sh
ifeq ($(HAVE_LIBCPUID), 1)

13
tests/why-depends.sh Normal file
View file

@ -0,0 +1,13 @@
source common.sh
clearStore
cp ./dependencies.nix ./dependencies.builder0.sh ./config.nix $TEST_HOME
cd $TEST_HOME
nix-build ./dependencies.nix -A input0_drv -o dep
nix-build ./dependencies.nix -o toplevel
nix why-depends ./toplevel ./dep |
grep input-2