2008-04-18 15:28:33 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2009-09-23 07:32:10 +00:00
|
|
|
test -z "$srcdir" && srcdir=$(pwd)
|
|
|
|
test -z "$abs_top_srcdir" && abs_top_srcdir=$(pwd)/..
|
|
|
|
test -z "$abs_top_builddir" && abs_top_builddir=$(pwd)/..
|
|
|
|
test -z "$abs_srcdir" && abs_srcdir=$(pwd)
|
|
|
|
test -z "$abs_builddir" && abs_builddir=$(pwd)
|
|
|
|
|
2008-04-18 15:28:33 +00:00
|
|
|
if test "$VERBOSE" = yes; then
|
|
|
|
set -x
|
2009-09-23 07:32:10 +00:00
|
|
|
$abs_top_builddir/tools/virsh --version
|
2008-04-18 15:28:33 +00:00
|
|
|
fi
|
|
|
|
|
2009-09-23 07:32:10 +00:00
|
|
|
. "$srcdir/test-lib.sh"
|
2008-04-18 15:28:33 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
fail=0
|
|
|
|
i=1
|
|
|
|
data_dir=$abs_srcdir/confdata
|
|
|
|
for f in $(cd "$data_dir" && echo *.conf)
|
2006-08-29 22:27:07 +00:00
|
|
|
do
|
2008-04-18 15:28:33 +00: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-29 22:27:07 +00:00
|
|
|
else
|
2008-04-18 15:28:33 +00:00
|
|
|
msg=FAILED
|
|
|
|
fail=1
|
2006-08-29 22:27:07 +00:00
|
|
|
fi
|
2008-04-18 15:28:33 +00:00
|
|
|
printf "%2d) %-60s ... %s\n" $i "$f" $msg
|
|
|
|
i=`expr $i + 1`
|
2006-08-29 22:27:07 +00:00
|
|
|
done
|
2008-04-18 15:28:33 +00:00
|
|
|
|
|
|
|
(exit $fail); exit $fail
|