aboutsummaryrefslogtreecommitdiff
path: root/tests/logging.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/logging.sh')
-rw-r--r--tests/logging.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/logging.sh b/tests/logging.sh
index 60e2e1234..dffedcfe5 100644
--- a/tests/logging.sh
+++ b/tests/logging.sh
@@ -1,16 +1,17 @@
source common.sh
-$nixstore --gc
+clearStore
# Produce an escaped log file.
-$nixstore --log-type escapes -r -vv $($nixinstantiate dependencies.nix) 2> $TEST_ROOT/log.esc
+set -x
+$nixbuild --log-type escapes -vv dependencies.nix 2> $TEST_ROOT/log.esc
# Convert it to an XML representation.
$TOP/src/nix-log2xml/nix-log2xml < $TEST_ROOT/log.esc > $TEST_ROOT/log.xml
# Is this well-formed XML?
if test "$xmllint" != "false"; then
- $xmllint $xmlflags --noout $TEST_ROOT/log.xml
+ $xmllint $xmlflags --noout $TEST_ROOT/log.xml || fail "malformed XML"
fi
# Convert to HTML.
@@ -19,5 +20,5 @@ if test "$xsltproc" != "false"; then
# Ideally we would check that the generated HTML is valid...
# A few checks...
- grep "<li>.*<code>.*FOO" $TEST_ROOT/log.html
+ grep "<code>.*FOO" $TEST_ROOT/log.html || fail "bad HTML output"
fi