[Po4a-commits] po4a/testsuite check,1.6,1.7
Nicolas FRAN??OIS
po4a-devel@lists.alioth.debian.org
Sat, 26 Feb 2005 21:19:45 +0000
Update of /cvsroot/po4a/po4a/testsuite
In directory haydn:/tmp/cvs-serv17818/testsuite
Modified Files:
check
Log Message:
Revert back from die to warn, but use a non-0 status code.
Change the testsuite's check script accordingly.
Also add a -f option to the check script. This option permits to specify a
list of man pages. Useful to check the previous failing pages:
./check -f previous/LISTE.WDIFF
Index: check
===================================================================
RCS file: /cvsroot/po4a/po4a/testsuite/check,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- check 6 Nov 2004 15:43:18 -0000 1.6
+++ check 26 Feb 2005 21:19:43 -0000 1.7
@@ -12,6 +12,9 @@
Check all man pages found in /usr/share/man/man[1-8]
$0 <space separated list of man pages>
Check the specified man pages.
+ $0 -f <file>
+ Check the man pages specified in <file> (one page per line).
+Man pages can be gzipped.
$0 erases all LISTE.* files in the current directory and creates
the following files:
LISTE.TOTAL List of all the checked man pages
@@ -36,17 +39,24 @@
rm -f LISTE.*
touch LISTE.{TOTAL,OK,OK2,WDIFF,PBS,IGN,WOK1,WOK2,WOK3}
-if [ $# != 0 ] ; then
- echo $@ > LISTE.TOTAL
+if [ $# = 2 ] && [ $1 = "-f" ] ; then
+ cat $2 > LISTE.TOTAL
+elif [ $# != 0 ] ; then
+ echo $@ > LISTE.TOTAL
+else
+ if [ "$module" = "man" ] ; then
+ find /usr/share/man/man[1-8] -type f | sort > LISTE.TOTAL
+ elif [ "$module" = "pod" ] ; then
+ locate pod|egrep '\.pod$' | sort > LISTE.TOTAL
+ fi
fi
+
tmp=/tmp/po4a-check-$module-$$
mkdir -p $tmp
if [ "$module" = "man" ] ; then
- [ $# = 0 ] && find /usr/share/man/man[1-8] -type f | sort > LISTE.TOTAL
cmdtotxt="mantotxt"
elif [ "$module" = "pod" ] ; then
- [ $# = 0 ] && locate pod|egrep '\.pod$' | sort > LISTE.TOTAL
- cmdtotxt="podtotxt"
+ cmdtotxt="podtotxt"
fi
@@ -81,7 +91,6 @@
echo "####### $fich";
rm -f po4a-normalize.*
if PERLLIB=../lib ../po4a-normalize -f $module -M iso-8859-1 $tmp/$newfich 2>&1 ; then
- if [ -e po4a-normalize.output ] ; then
mv po4a-normalize.output $tmp/po4a-normalize.output
$cmdtotxt $tmp/po4a-normalize.output $tmp/$newfich;
$cmdtotxt $tmp/$newfich $tmp/$newfich;
@@ -173,13 +182,14 @@
fi
fi
fi
- else
+ else
+ if [ $? = 254 ]; then
echo ">ign"
echo $fich >> LISTE.IGN
+ else
+ echo ">pbs"
+ echo $fich >> LISTE.PBS
fi
- else
- echo ">pbs"
- echo $fich >> LISTE.PBS
fi
rm -f $tmp/$newfich* $tmp/po4a-normalize.*
echo '-------------------'