UTF8 library is now a shared library.
[gedcom-parse.git] / t / src / test_bulk.sh
1 # $Id$
2 # $Name$
3 # Common test part for the test scripts
4
5 ltcmd="$builddir/../libtool --mode=execute"
6 for lib in $test_libs $builddir/../utf8/libutf8tools.la
7 do
8   ltcmd="$ltcmd -dlopen $lib"
9 done
10
11 echo "======================================================">> $logfile
12 echo "Performing test '$test_name'" >> $logfile
13 $ltcmd $GEDCOM_TESTENV $builddir/src/$test_program $options $test_args
14 result=$?
15 rm gedcom.enc
16 rm new.ged
17 rm ANSI_Z39.47.so
18 rm gconv-modules
19
20 echo "Result is $result (expected: $expected_result)" >> $logfile
21 if [ "$result" -ne "$expected_result" ]
22 then
23   echo "Not the expected return value!" >> $logfile
24   exit 1
25 else
26   if [ -r core ]
27   then
28     echo "Core file generated!" >> $logfile
29     exit 1
30   else
31     if diff $outfile $reffile >/dev/null 2>>$logfile
32     then
33       echo "Output agrees with reference output" >> $logfile
34       rm $outfile
35       if [ "$gedcom_out" ]
36       then
37         if diff $gedfile $gedreffile >/dev/null 2>>$logfile
38         then
39           echo "Gedcom output agrees with reference output" >> $logfile
40           rm $gedfile
41           exit 0
42         else
43           echo "Differences with reference gedcom output detected!" >> $logfile
44           exit 1
45         fi
46       fi
47       exit 0
48     else
49       echo "Differences with reference output detected!" >> $logfile
50       exit 1
51     fi
52   fi
53 fi