mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
* Check whether "nix-store -q --graph" generates a valid dot graph.
* Test "nix-store -q --tree" as well.
This commit is contained in:
parent
46f0cb0869
commit
ddb78dfc3d
2 changed files with 19 additions and 0 deletions
|
@ -85,6 +85,7 @@ AC_PATH_PROG(flex, flex, false)
|
||||||
AC_PATH_PROG(bison, bison, false)
|
AC_PATH_PROG(bison, bison, false)
|
||||||
NEED_PROG(perl, perl)
|
NEED_PROG(perl, perl)
|
||||||
NEED_PROG(tar, tar)
|
NEED_PROG(tar, tar)
|
||||||
|
AC_PATH_PROG(dot, dot)
|
||||||
|
|
||||||
NEED_PROG(cat, cat)
|
NEED_PROG(cat, cat)
|
||||||
AC_ARG_WITH(coreutils-bin, AC_HELP_STRING([--with-coreutils-bin=PATH],
|
AC_ARG_WITH(coreutils-bin, AC_HELP_STRING([--with-coreutils-bin=PATH],
|
||||||
|
|
|
@ -2,8 +2,26 @@ drvPath=$($TOP/src/nix-instantiate/nix-instantiate dependencies.nix)
|
||||||
|
|
||||||
echo "derivation is $drvPath"
|
echo "derivation is $drvPath"
|
||||||
|
|
||||||
|
$TOP/src/nix-store/nix-store -q --tree "$drvPath" | grep "| +---.*builder1.sh"
|
||||||
|
|
||||||
|
# Test Graphviz graph generation.
|
||||||
|
$TOP/src/nix-store/nix-store -q --graph "$drvPath" > $TEST_ROOT/graph
|
||||||
|
if test -n "$dot"; then
|
||||||
|
# Does it parse?
|
||||||
|
$dot < $TEST_ROOT/graph
|
||||||
|
fi
|
||||||
|
|
||||||
outPath=$($TOP/src/nix-store/nix-store -rvv "$drvPath")
|
outPath=$($TOP/src/nix-store/nix-store -rvv "$drvPath")
|
||||||
|
|
||||||
|
# Test Graphviz graph generation.
|
||||||
|
$TOP/src/nix-store/nix-store -q --graph "$outPath" > $TEST_ROOT/graph
|
||||||
|
if test -n "$dot"; then
|
||||||
|
# Does it parse?
|
||||||
|
$dot < $TEST_ROOT/graph
|
||||||
|
fi
|
||||||
|
|
||||||
|
$TOP/src/nix-store/nix-store -q --tree "$outPath" | grep "+---.*dependencies-input-2"
|
||||||
|
|
||||||
echo "output path is $outPath"
|
echo "output path is $outPath"
|
||||||
|
|
||||||
text=$(cat "$outPath"/foobar)
|
text=$(cat "$outPath"/foobar)
|
||||||
|
|
Loading…
Reference in a new issue