From 9f135be96e21d899b36ef2287a6ba8cea9beb4ff Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 15 Jul 2011 22:09:29 +0100 Subject: [PATCH] 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. --- regressions/test-guestfish-escapes.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/regressions/test-guestfish-escapes.sh b/regressions/test-guestfish-escapes.sh index 6f4f434..3ba37d2 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 -- 1.8.3.1