From: Richard W.M. Jones Date: Mon, 1 Aug 2011 14:13:08 +0000 (+0100) Subject: virt-tar test: Stable ordering of test output. X-Git-Tag: 1.12.3~7 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=d3b089fcb170c214be31e4869cd16a149c6b9dd1;hp=d5551678e8112fd2d81f160e74901e1ca57c5db9;p=libguestfs.git virt-tar test: Stable ordering of test output. The files could be listed in any order, resulting in the test failing for no reason. Sort the output of tar. (cherry picked from commit 995b3fecb9af7a8bd52b238bad2a631a1193c83a) --- diff --git a/tools/test-virt-tar.sh b/tools/test-virt-tar.sh index 2239c13..dec4f48 100755 --- a/tools/test-virt-tar.sh +++ b/tools/test-virt-tar.sh @@ -6,7 +6,7 @@ set -e # Read out the test directory using virt-tar. ./virt-tar -x ../images/fedora.img /bin test.tar -if [ "$(tar tf test.tar)" != "./ +if [ "$(tar tf test.tar | sort)" != "./ ./ls ./test1 ./test2