aboutsummaryrefslogtreecommitdiff
path: root/tests/logging.sh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-26 17:58:53 +0100
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-02-26 17:58:53 +0100
commit84143c4bd80b38a44443e06f1c8c33dc212ccef7 (patch)
treefda29fc5e7addfe423a9d8631f6b42ae74c83a28 /tests/logging.sh
parent19437785ebf515aa0ac63541566d28267f63a333 (diff)
Test nix-store -l
Diffstat (limited to 'tests/logging.sh')
-rw-r--r--tests/logging.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/logging.sh b/tests/logging.sh
index 764999327..5ba71c3e4 100644
--- a/tests/logging.sh
+++ b/tests/logging.sh
@@ -4,7 +4,7 @@ clearStore
# Produce an escaped log file.
set -x
-nix-build --log-type escapes -vv dependencies.nix --no-out-link 2> $TEST_ROOT/log.esc
+path=$(nix-build --log-type escapes -vv dependencies.nix --no-out-link 2> $TEST_ROOT/log.esc)
# Convert it to an XML representation.
nix-log2xml < $TEST_ROOT/log.esc > $TEST_ROOT/log.xml
@@ -22,3 +22,13 @@ if test "$xsltproc" != "false"; then
# A few checks...
grep "<code>.*FOO" $TEST_ROOT/log.html || fail "bad HTML output"
fi
+
+# Test nix-store -l.
+[ "$(nix-store -l $path)" = FOO ]
+
+# Test compressed logs.
+clearStore
+rm -rf $NIX_LOG_DIR
+! nix-store -l $path
+nix-build dependencies.nix --no-out-link --option build-compress-log true
+[ "$(nix-store -l $path)" = FOO ]