[Pkg-libvirt-commits] [libguestfs] 52/59: tests/regressions/rhbz895904.sh: Rewrite without multi-line expression.
Hilko Bengen
bengen at moszumanska.debian.org
Thu Mar 20 23:05:41 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 7fe365eee68b49972a1c528ddd78101215e1defd
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sun Mar 16 22:44:03 2014 +0000
tests/regressions/rhbz895904.sh: Rewrite without multi-line expression.
RHEL 6-era bash cannot handle the multi-line $(...) expression in the
original code. Rewrite the test so it is semantically the same but
doesn't have the expression that old bash can't handle.
---
tests/regressions/rhbz895904.sh | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/tests/regressions/rhbz895904.sh b/tests/regressions/rhbz895904.sh
index 99a9c58..f239986 100755
--- a/tests/regressions/rhbz895904.sh
+++ b/tests/regressions/rhbz895904.sh
@@ -23,22 +23,21 @@
set -e
export LANG=C
-output=$(
-../../fish/guestfish -N rhbz895904.img=fs \
- -m /dev/sda1 <<EOF | sort -k 3
+rm -f rhbz895904.img rhbz895904.out
+
+../../fish/guestfish -N rhbz895904.img=fs -m /dev/sda1 <<EOF | sort -k 3 > rhbz895904.out
mkdir /test
touch /test/file1
mkdir /test/subdir
write /test/subdir/file2 abc
checksums-out crc /test -
EOF
-)
-if [ "$output" != "4294967295 0 ./file1
+if [ "$(cat rhbz895904.out)" != "4294967295 0 ./file1
1219131554 3 ./subdir/file2" ]; then
echo "$0: unexpected output from checksums-out command:"
- echo "$output"
+ cat rhbz895904.out
exit 1
fi
-rm rhbz895904.img
+rm rhbz895904.img rhbz895904.out
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list