summaryrefslogtreecommitdiffstats
path: root/regressions
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-07-15 22:09:29 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-07-15 22:09:29 +0100
commit9f135be96e21d899b36ef2287a6ba8cea9beb4ff (patch)
tree000ecdad23682ea20292b991481a65ad9b57bc21 /regressions
parent1f0c650c8ffdf0602ec74b999f62d3efa6822c96 (diff)
downloadlibguestfs-9f135be96e21d899b36ef2287a6ba8cea9beb4ff.tar.gz
libguestfs-9f135be96e21d899b36ef2287a6ba8cea9beb4ff.tar.xz
libguestfs-9f135be96e21d899b36ef2287a6ba8cea9beb4ff.zip
Fix test-guestfish-escapes regression test to work with debug/trace enabled.
If debugging or tracing is enabled, extra messages are sent to stderr which mess with this test. Remove the extra messages before checking stderr. This updates commit 617e7f6bafa7de2303c08e1715004aae3141c389.
Diffstat (limited to 'regressions')
-rwxr-xr-xregressions/test-guestfish-escapes.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/regressions/test-guestfish-escapes.sh b/regressions/test-guestfish-escapes.sh
index 6f4f4341..3ba37d2f 100755
--- a/regressions/test-guestfish-escapes.sh
+++ b/regressions/test-guestfish-escapes.sh
@@ -20,7 +20,7 @@
set -e
-rm -f test.output test.error
+rm -f test.output test.error test.error.old
../fish/guestfish <<'EOF' 2>test.error | od > test.output
echo ""
@@ -47,6 +47,11 @@ echo "\100"
-echo """
EOF
+# Since trace and debug output also goes to stderr, we must
+# remove it before testing.
+mv test.error test.error.old
+grep -v '^libguestfs: ' < test.error.old > test.error
+
if [ "$(cat test.error)" != "\
guestfish: invalid escape sequence in string (starting at offset 0)
guestfish: invalid escape sequence in string (starting at offset 0)
@@ -75,4 +80,4 @@ if [ "$(cat test.output)" != "\
exit 1
fi
-rm -f test.output test.error
+rm -f test.output test.error test.error.old