1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-27 07:22:07 +03:00
libvirt/tests/test_conf.sh

29 lines
505 B
Bash
Raw Normal View History

2008-04-18 19:28:33 +04:00
#!/bin/sh
test -z "$srcdir" && srcdir=$(pwd)
2008-04-18 19:28:33 +04:00
. "$srcdir/test-lib.sh"
2008-04-18 19:28:33 +04:00
test_intro $this_test
2008-04-18 19:28:33 +04:00
fail=0
i=0
2008-04-18 19:28:33 +04:00
data_dir=$abs_srcdir/confdata
for f in $(cd "$data_dir" && echo *.conf)
do
i=`expr $i + 1`
"$abs_builddir/test_conf" "$data_dir/$f" > "$f-actual"
2008-04-18 19:28:33 +04:00
expected="$data_dir"/`echo "$f" | sed s+\.conf$+\.out+`
if compare "$expected" "$f-actual"; then
ret=0
else
ret=1
2008-04-18 19:28:33 +04:00
fail=1
fi
test_result $i "$f" $ret
done
2008-04-18 19:28:33 +04:00
test_final $i $fail
2008-04-18 19:28:33 +04:00
(exit $fail); exit $fail