Files
libguestfs/tools/test-virt-tar.sh
Richard W.M. Jones 995b3fecb9 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.
2011-08-01 15:13:08 +01:00

23 lines
335 B
Bash
Executable File

#!/bin/bash -
export LANG=C
set -e
# Read out the test directory using virt-tar.
./virt-tar -x ../images/fedora.img /bin test.tar
if [ "$(tar tf test.tar | sort)" != "./
./ls
./test1
./test2
./test3
./test4
./test5
./test6
./test7" ]; then
echo "$0: error: unexpected output in tarball from virt-tar"
exit 1
fi
rm test.tar