File:  [Public] / XML / RunTests
Revision 1.14: download - view: text, annotated - select for diffs
Sun May 14 15:32:31 2000 UTC (25 years, 7 months ago) by daniel
Branches: MAIN
CVS tags: LIBXML_2_2_8, LIBXML_2_2_6, LIBXML_2_2_1, LIBXML_2_1_1, LIBXML_2_1_0, HEAD
Serious speed improvement for lements of large size, Daniel

#!/bin/sh
HTMLLOG="result/conf/log.html"
HTMLSUM="result/conf/result.html"
mkdir -p result/conf/oasis >& /dev/null
touch .memdump

echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"' > $HTMLLOG
echo '    "http://www.w3.org/TR/REC-html40/loose.dtd">' >> $HTMLLOG
echo '<html><head><title>OASIS test full log</title></head>' >> $HTMLLOG
echo '<body bgcolor="#ffffff"><h1 align="center">OASIS test full log</h1>' >> $HTMLLOG
echo '<h3><a href="result.html">Sumary</a></h3>' >> $HTMLLOG

echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"' > $HTMLSUM
echo '    "http://www.w3.org/TR/REC-html40/loose.dtd">' >> $HTMLSUM
echo '<html><head><title>OASIS test sumary</title></head>' >> $HTMLSUM
echo '<body bgcolor="#ffffff"><h1 align="center">OASIS test sumary</h1>' >> $HTMLSUM
echo '<h3><a href="log.html">Complete output (long!)</a></h3>' >> $HTMLSUM
tfailed="0"
total="0"

failed="0"
tests="0"
echo Oasis positive tests
echo '<h3>Oasis positive tests</h2>' >> $HTMLLOG
echo '<h3>Oasis positive tests</h2>' >> $HTMLSUM
for i in conf/oasis/*pass*.xml
do 
   name=`basename $i .xml`
   # I was told "it's not part of the tests", it's utterly broken anyway
   if [ "$name" = "p02pass1" ]
   then
       continue
   fi
   ./xmllint --nowarning --nowarning --noout $i 2> result/conf/oasis/$name.err > /dev/null
   if [ -s result/conf/oasis/$name.err ]
   then
      echo "<h3><a href='log.html#op$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='op$name'></a>$i test failed</h3>" >> $HTMLLOG
      failed=`expr $failed +  1`
      ./xmllint --nowarning --htmlout --nowrap --nowarning --noout $i 2>> $HTMLLOG
   else
      rm -f result/conf/oasis/$name.err
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#op$name'>./xmllint --nowarning $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='op$name'></a>./xmllint --nowarning $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       echo saved to result/conf/oasis/$name.leak
       cp .memdump result/conf/oasis/$name.leak
   else
       rm -f result/conf/oasis/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

failed="0"
tests="0"
echo Japanese encoding tests
echo '<h3>Japanese encoding tests</h2>' >> $HTMLLOG
echo '<h3>Japanese encoding tests</h2>' >> $HTMLSUM
mkdir -p result/conf/japanese >& /dev/null
for i in conf/japanese/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --noout $i 2> result/conf/japanese/$name.err > /dev/null
   if [ -s result/conf/japanese/$name.err ]
   then
      echo "<h3><a href='log.html#op$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='op$name'></a>$i test failed</h3>" >> $HTMLLOG
      failed=`expr $failed +  1`
      ./xmllint --nowarning --htmlout --nowrap --nowarning --noout $i 2>> $HTMLLOG
   else
      rm -f result/conf/japanese/$name.err
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#op$name'>./xmllint --nowarning $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='op$name'></a>./xmllint --nowarning $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       echo saved to result/conf/japanese/$name.leak
       cp .memdump result/conf/japanese/$name.leak
   else
       rm -f result/conf/japanese/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

failed="0"
tests="0"
newtests="0"
echo Oasis negative tests
echo '<h3>Oasis negative tests</h2>' >> $HTMLLOG
echo '<h3>Oasis negative tests</h2>' >> $HTMLSUM
for i in conf/oasis/*fail*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning $i > $name.out 2> $name.err
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#on$name'>./xmllint --nowarning $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='on$name'></a>./xmllint --nowarning $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/oasis/$name.leak
   else
       rm -f result/conf/oasis/$name.leak
   fi
   if [ ! -s $name.err ]
   then
       ./xmllint --nowarning --valid $i > $name.out 2> $name.err
       leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
       if [ "$leak" != "" ]
       then
	   echo "<p><a href='log.html#on$name'>./xmllint --nowarning --valid $i leaks</a></p>" >> $HTMLSUM
	   echo "<p><a name='on$name'></a>./xmllint --nowarning --valid $i leaks</p>" >> $HTMLLOG
	   echo "<pre>" >> $HTMLLOG
	   cat .memdump >> $HTMLLOG
	   echo "</pre>" >> $HTMLLOG
	   cp .memdump result/conf/oasis/$name.leak
       else
	   rm -f result/conf/oasis/$name.leak
       fi
       if [ ! -s $name.err ]
       then
	   failed=`expr $failed +  1`
	   echo "<h3><a href='log.html#on$name'>$i test failed</a></h3>" >> $HTMLSUM
	   echo "<h3><a name='on$name'></a>$i test failed</h3>" >> $HTMLLOG
       else
	   echo "<p>$i test WF but not valid</p>" >> $HTMLSUM
	   echo "<p>$i test WF but not valid</p>" >> $HTMLLOG
	   ./xmllint --nowarning --htmlout --nowrap --nowarning --valid --noout $i 2>> $HTMLLOG
       fi	  
   else
       echo "<p>$i test not WF</p>" >> $HTMLLOG
       ./xmllint --nowarning --htmlout --nowrap --nowarning --noout $i 2>> $HTMLLOG
   fi
   if [ ! -f result/conf/oasis/$name.out ]
   then
       newtests=`expr $newtests + 1`
       cp $name.out result/conf/oasis/$name.out
       cp $name.err result/conf/oasis/$name.err
   fi	  
   rm -f $name.err $name.out
   tests=`expr $tests + 1`
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
if [ "$newtests" != "0" ]
then
    echo $failed of $tests tests failed, $newtests new tests
else
    echo $failed of $tests tests failed
fi
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark not WF standalone tests
echo '<h2>James Clark not WF standalone tests</h2>' >> $HTMLLOG
echo '<h2>James Clark not WF standalone tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/not-wf/sa >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/not-wf/sa/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning $i > result/conf/xmltest/not-wf/sa/$name.out 2> result/conf/xmltest/not-wf/sa/$name.err
   if [ -s result/conf/xmltest/not-wf/sa/$name.out ]
   then
      failed=`expr $failed +  1`
      echo "<h3><a href='log.html#nwfs$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='nwfs$name'></a>$i test failed</h3>" >> $HTMLLOG
   else
      echo "<p>$i not WF</p>" >> $HTMLLOG
      ./xmllint --nowarning --htmlout --nowrap --noout $i 2>> $HTMLLOG
      rm -f result/conf/xmltest/not-wf/sa/$name.err
      rm -f result/conf/xmltest/not-wf/sa/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#nwfs$name'>./xmllint --nowarning $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='nwfs$name'></a>./xmllint --nowarning $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/not-wf/sa/$name.leak
   else
       rm -f result/conf/xmltest/not-wf/sa/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark not WF standalone with general entities tests
echo '<h2>James Clark not WF standalone with general entities tests</h2>' >> $HTMLLOG
echo '<h2>James Clark not WF standalone with general entities tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/not-wf/ext-sa >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/not-wf/ext-sa/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --noent $i > result/conf/xmltest/not-wf/ext-sa/$name.out 2> result/conf/xmltest/not-wf/ext-sa/$name.err
   if [ -s result/conf/xmltest/not-wf/ext-sa/$name.out ]
   then
      echo "<h3><a href='log.html#nwfe$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='nwfe$name'></a>$i test failed</h3>" >> $HTMLLOG
      failed=`expr $failed +  1`
   else
      echo "<p>$i not WF</p>" >> $HTMLLOG
      ./xmllint --nowarning  --noent --htmlout --nowrap --noout $i 2>> $HTMLLOG
      rm -f result/conf/xmltest/not-wf/ext-sa/$name.err
      rm -f result/conf/xmltest/not-wf/ext-sa/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#nwfe$name'>./xmllint --nowarning $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='nwfe$name'></a>./xmllint --nowarning $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/not-wf/ext-sa/$name.leak
   else
       rm -f result/conf/xmltest/not-wf/ext-sa/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark not WF not standalone tests
echo '<h2>James Clark not WF not standalone tests</h2>' >> $HTMLLOG
echo '<h2>James Clark not WF not standalone tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/not-wf/not-sa >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/not-wf/not-sa/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --valid --noent $i > result/conf/xmltest/not-wf/not-sa/$name.out 2> result/conf/xmltest/not-wf/not-sa/$name.err 
   if [ ! -s result/conf/xmltest/not-wf/not-sa/$name.err ]
   then
      echo "<h3><a href='log.html#nwfn$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='nwfn$name'></a>$i test failed</h3>" >> $HTMLLOG
      failed=`expr $failed +  1`
   else
      echo "<p>$i not WF</p>" >> $HTMLLOG
      ./xmllint --nowarning --valid --htmlout --nowrap --noent --noout $i 2>> $HTMLLOG
      rm -f result/conf/xmltest/not-wf/not-sa/$name.err
      rm -f result/conf/xmltest/not-wf/not-sa/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#nwfn$name'>./xmllint --nowarning --noent $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='nwfn$name'></a>./xmllint --nowarning --noent $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/not-wf/not-sa/$name.leak
   else
       rm -f result/conf/xmltest/not-wf/not-sa/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark valid standalone tests
echo '<h2>James Clark valid standalone tests</h2>' >> $HTMLLOG
echo '<h2>James Clark valid standalone tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/valid/sa >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/valid/sa/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --valid $i > result/conf/xmltest/valid/sa/$name.out 2> result/conf/xmltest/valid/sa/$name.err
   if [ -s result/conf/xmltest/valid/sa/$name.err ]
   then
      echo "<h3><a href='log.html#vs$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='vs$name'></a>$i test failed</h3>" >> $HTMLLOG
      ./xmllint --nowarning --noout --htmlout --nowrap --valid $i 2>> $HTMLLOG
      failed=`expr $failed +  1`
   else
      rm -f result/conf/xmltest/valid/sa/$name.err
      rm -f result/conf/xmltest/valid/sa/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#vs$name'>./xmllint --nowarning --valid $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='vs$name'></a>./xmllint --nowarning --valid $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/valid/sa/$name.leak
   else
       rm -f result/conf/xmltest/valid/sa/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark valid standalone with general entities tests
echo '<h2>James Clark valid standalone with general entities tests</h2>' >> $HTMLLOG
echo '<h2>James Clark valid standalone with general entities tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/valid/ext-sa >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/valid/ext-sa/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --valid $i > result/conf/xmltest/valid/ext-sa/$name.out 2> result/conf/xmltest/valid/ext-sa/$name.err
   if [ -s result/conf/xmltest/valid/ext-sa/$name.err ]
   then
      echo "<h3><a href='log.html#ve$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='ve$name'></a>$i test failed</h3>" >> $HTMLLOG
      ./xmllint --nowarning --noout --htmlout --nowrap --valid $i 2>> $HTMLLOG
      failed=`expr $failed +  1`
   else
      rm -f result/conf/xmltest/valid/ext-sa/$name.err
      rm -f result/conf/xmltest/valid/ext-sa/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#ve$name'>./xmllint --nowarning --valid $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='ve$name'></a>./xmllint --nowarning --valid $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/valid/ext-sa/$name.leak
   else
       rm -f result/conf/xmltest/valid/ext-sa/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark valid not standalone tests
echo '<h2>James Clark valid not standalone tests</h2>' >> $HTMLLOG
echo '<h2>James Clark valid not standalone tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/valid/not-sa >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/valid/not-sa/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --valid --noent $i > result/conf/xmltest/valid/not-sa/$name.out 2> result/conf/xmltest/valid/not-sa/$name.err 
   if [ -s result/conf/xmltest/valid/not-sa/$name.err ]
   then
      echo "<h3><a href='log.html#vn$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='vn$name'></a>$i test failed</h3>" >> $HTMLLOG
      ./xmllint --nowarning --noout --htmlout --nowrap --valid $i 2>> $HTMLLOG
      failed=`expr $failed +  1`
   else
      rm -f result/conf/xmltest/valid/not-sa/$name.err
      rm -f result/conf/xmltest/valid/not-sa/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#vn$name'>./xmllint --nowarning --valid $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='vn$name'></a>./xmllint --nowarning --valid $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/valid/not-sa/$name.leak
   else
       rm -f result/conf/xmltest/valid/not-sa/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo James Clark invalid tests
echo '<h2>James Clark invalid tests</h2>' >> $HTMLLOG
echo '<h2>James Clark invalid tests</h2>' >> $HTMLSUM
mkdir -p result/conf/xmltest/invalid >& /dev/null
failed="0"
tests="0"
for i in conf/xmltest/invalid/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --valid --noent $i > result/conf/xmltest/invalid/$name.out 2> result/conf/xmltest/invalid/$name.err 
   if [ ! -s result/conf/xmltest/invalid/$name.err ]
   then
      echo "<h3><a href='log.html#jci$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='jci$name'></a>$i test failed</h3>" >> $HTMLLOG
      failed=`expr $failed +  1`
   else
      echo "<p>$i not valid</p>" >> $HTMLLOG
      ./xmllint --nowarning --noout --htmlout --nowrap --valid --noout $i 2>> $HTMLLOG
      rm -f result/conf/xmltest/invalid/$name.err
      rm -f result/conf/xmltest/invalid/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#jci$name'>./xmllint --nowarning --valid --noent $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='jci$name'></a>./xmllint --nowarning --valid --noent $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/xmltest/invalid/$name.leak
   else
       rm -f result/conf/xmltest/invalid/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo Sun not WF tests
echo '<h2>Sun not WF tests</h2>' >> $HTMLLOG
echo '<h2>Sun not WF tests</h2>' >> $HTMLSUM
mkdir -p result/conf/sun/not-wf >& /dev/null
failed="0"
tests="0"
for i in conf/sun/not-wf/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning $i > result/conf/sun/not-wf/$name.out 2> result/conf/sun/not-wf/$name.err
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#sun$name'>./xmllint --nowarning $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='sun$name'></a>./xmllint --nowarning $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/sun/not-wf/$name.leak
   else
       rm -f result/conf/sun/not-wf/$name.leak
   fi
   if [ ! -s result/conf/sun/not-wf/$name.err ]
   then
       ./xmllint --nowarning --valid $i > result/conf/sun/not-wf/$name.out 2> result/conf/sun/not-wf/$name.err
       leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
       if [ "$leak" != "" ]
       then
	   echo "<p><a href='log.html#sun$name'>./xmllint --nowarning --valid $i leaks</a></p>" >> $HTMLSUM
	   echo "<p><a name='sun$name'></a>./xmllint --nowarning --valid $i leaks</p>" >> $HTMLLOG
	   echo "<pre>" >> $HTMLLOG
	   cat .memdump >> $HTMLLOG
	   echo "</pre>" >> $HTMLLOG
	   cp .memdump result/conf/sun/not-wf/$name.leak
       else
	   rm -f result/conf/sun/not-wf/$name.leak
       fi
       if [ ! -s result/conf/sun/not-wf/$name.err ]
       then
	   failed=`expr $failed +  1`
	   echo "<h3><a href='log.html#on$name'>$i test failed</a></h3>" >> $HTMLSUM
	   echo "<h3><a name='on$name'></a>$i test failed</h3>" >> $HTMLLOG
       else
	   echo "<p>$i test WF but not valid</p>" >> $HTMLSUM
	   echo "<p>$i test WF but not valid</p>" >> $HTMLLOG
	   ./xmllint --nowarning --htmlout --nowrap --nowarning --valid --noout $i 2>> $HTMLLOG
       fi	  
   else
       echo "<p>$i test not WF</p>" >> $HTMLLOG
       ./xmllint --nowarning --htmlout --nowrap --nowarning --noout $i 2>> $HTMLLOG
   fi
   tests=`expr $tests + 1`
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo Sun valid tests
echo '<h2>Sun valid tests</h2>' >> $HTMLLOG
echo '<h2>Sun valid tests</h2>' >> $HTMLSUM
mkdir -p result/conf/sun/valid >& /dev/null
failed="0"
tests="0"
for i in conf/sun/valid/*.xml
do 
   name=`basename $i .xml`
   if [ "$name" = "sun-valid" ]
   then
       continue;
   fi
   ./xmllint --nowarning --valid --noent $i > result/conf/sun/valid/$name.out 2> result/conf/sun/valid/$name.err 
   if [ -s result/conf/sun/valid/$name.err ]
   then
      echo "<h3><a href='log.html#sv$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='sv$name'></a>$i test failed</h3>" >> $HTMLLOG
      ./xmllint --nowarning --noout --htmlout --nowrap --valid $i 2>> $HTMLLOG
      failed=`expr $failed +  1`
   else
      rm -f result/conf/sun/valid/$name.err
      rm -f result/conf/sun/valid/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#sv$name'>./xmllint --nowarning --valid $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='sv$name'></a>./xmllint --nowarning --valid $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/sun/valid/$name.leak
   else
       rm -f result/conf/sun/valid/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

echo Sun invalid tests
echo '<h2>Sun invalid tests</h2>' >> $HTMLLOG
echo '<h2>Sun invalid tests</h2>' >> $HTMLSUM
mkdir -p result/conf/sun/invalid >& /dev/null
failed="0"
tests="0"
for i in conf/sun/invalid/*.xml
do 
   name=`basename $i .xml`
   ./xmllint --nowarning --valid --noent $i > result/conf/sun/invalid/$name.out 2> result/conf/sun/invalid/$name.err 
   if [ ! -s result/conf/sun/invalid/$name.err ]
   then
      echo "<h3><a href='log.html#siv$name'>$i test failed</a></h3>" >> $HTMLSUM
      echo "<h3><a name='siv$name'></a>$i test failed</h3>" >> $HTMLLOG
      failed=`expr $failed +  1`
   else
      echo "<p>$i not valid</p>" >> $HTMLLOG
      ./xmllint --nowarning --noout --htmlout --nowrap --valid --noout $i 2>> $HTMLLOG
      rm -f result/conf/sun/invalid/$name.err
      rm -f result/conf/sun/invalid/$name.out
   fi
   tests=`expr $tests + 1`
   leak=`grep "MORY ALLO" .memdump  | grep -v "MEMORY ALLOCATED : 0"`
   if [ "$leak" != "" ]
   then
       echo "<p><a href='log.html#siv$name'>./xmllint --nowarning --valid --noent $i leaks</a></p>" >> $HTMLSUM
       echo "<p><a name='siv$name'></a>./xmllint --nowarning --valid --noent $i leaks</p>" >> $HTMLLOG
       echo "<pre>" >> $HTMLLOG
       cat .memdump >> $HTMLLOG
       echo "</pre>" >> $HTMLLOG
       cp .memdump result/conf/sun/invalid/$name.leak
   else
       rm -f result/conf/sun/invalid/$name.leak
   fi
done

tfailed=`expr $tfailed + $failed`
total=`expr $total + $tests`
echo $failed of $tests tests failed
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLLOG
echo "<h3>$failed of $tests tests failed</h3>" >> $HTMLSUM

#
# To tal results
#
echo
echo Total: $tfailed of $total tests failed
echo Sumary in $HTMLSUM
echo

echo "<h2 align='center'>Total: $tfailed of $total tests failed</h2>" >> $HTMLLOG
echo "<h2 align='center'>Total: $tfailed of $total tests failed</h2>" >> $HTMLSUM
echo '</body></html>' >> $HTMLLOG
echo '</body></html>' >> $HTMLSUM


Webmaster