File: test_conf.sh

package info (click to toggle)
libvirt 0.9.12.3-1+deb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 115,024 kB
  • sloc: ansic: 324,394; xml: 44,112; sh: 15,676; python: 6,198; makefile: 2,916; perl: 2,003; ml: 472; sed: 16
file content (28 lines) | stat: -rwxr-xr-x 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

test -z "$srcdir" && srcdir=$(pwd)

. "$srcdir/test-lib.sh"

test_intro $this_test

fail=0
i=0
data_dir=$abs_srcdir/confdata
for f in $(cd "$data_dir" && echo *.conf)
do
    i=`expr $i + 1`
    "$abs_builddir/conftest" "$data_dir/$f" > "$f-actual"
    expected="$data_dir"/`echo "$f" | sed s+\.conf$+\.out+`
    if compare "$expected" "$f-actual"; then
        ret=0
    else
        ret=1
        fail=1
    fi
    test_result $i "$f" $ret
done

test_final $i $fail

(exit $fail); exit $fail