2008-04-18 23:28:33 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if test "$VERBOSE" = yes; then
|
|
|
|
set -x
|
|
|
|
virsh --version
|
|
|
|
fi
|
|
|
|
|
|
|
|
. $srcdir/test-lib.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
if test "x$abs_srcdir" = x; then
|
|
|
|
abs_srcdir=`pwd`
|
|
|
|
abs_builddir=`pwd`
|
|
|
|
fi
|
|
|
|
|
|
|
|
fail=0
|
|
|
|
i=1
|
|
|
|
data_dir=$abs_srcdir/confdata
|
|
|
|
for f in $(cd "$data_dir" && echo *.conf)
|
2006-08-30 06:27:07 +08:00
|
|
|
do
|
2008-04-18 23:28:33 +08:00
|
|
|
"$abs_builddir/conftest" "$data_dir/$f" > "$f-actual"
|
|
|
|
expected="$data_dir"/`echo "$f" | sed s+\.conf$+\.out+`
|
|
|
|
if compare "$expected" "$f-actual"; then
|
|
|
|
msg=OK
|
2006-08-30 06:27:07 +08:00
|
|
|
else
|
2008-04-18 23:28:33 +08:00
|
|
|
msg=FAILED
|
|
|
|
fail=1
|
2006-08-30 06:27:07 +08:00
|
|
|
fi
|
2008-04-18 23:28:33 +08:00
|
|
|
printf "%2d) %-60s ... %s\n" $i "$f" $msg
|
|
|
|
i=`expr $i + 1`
|
2006-08-30 06:27:07 +08:00
|
|
|
done
|
2008-04-18 23:28:33 +08:00
|
|
|
|
|
|
|
(exit $fail); exit $fail
|