[gtk-doc] tests: unity output and extend sanity checks
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] tests: unity output and extend sanity checks
- Date: Wed, 2 Jun 2010 09:25:09 +0000 (UTC)
commit f112b8d3abf8efe395e6cd0fc5ea7b3497153b1d
Author: Stefan Kost <ensonic users sf net>
Date: Wed Jun 2 12:24:37 2010 +0300
tests: unity output and extend sanity checks
tests/sanity.sh | 15 +++++++++++++++
tests/tools.sh.in | 23 ++++++++---------------
2 files changed, 23 insertions(+), 15 deletions(-)
---
diff --git a/tests/sanity.sh b/tests/sanity.sh
index 02d6cb1..0187489 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -1,10 +1,13 @@
#!/bin/bash
dir=`dirname $0`
+suite="sanity"
failed=0
tested=0
+echo "Running suite(s): gtk-doc-$suite";
+
# check the presence and non-emptyness of certain files
nok=0
for path in $dir/*/docs*/html; do
@@ -28,6 +31,18 @@ if test $nok -gt 0 ; then failed=$(($failed + 1)); fi
tested=$(($tested + 1))
+# check validity of generated xml files
+nok=0
+for file in $dir/*/docs*/xml/*.xml; do
+ xmllint --noout --noent $file
+ if test $? != 0 ; then
+ nok=$(($nok + 1));
+ fi
+done
+if test $nok -gt 0 ; then failed=$(($failed + 1)); fi
+tested=$(($tested + 1))
+
+
# summary
rate=$((100*($tested - $failed)/$tested));
echo "$rate %: Checks $tested, Failures: $failed"
diff --git a/tests/tools.sh.in b/tests/tools.sh.in
index 763c58c..c7cf613 100644
--- a/tests/tools.sh.in
+++ b/tests/tools.sh.in
@@ -1,14 +1,15 @@
#!/bin/bash
+suite="tools"
+
failed=0
tested=0
-echo "Running suite(s): gtk-doc-tools";
+echo "Running suite(s): gtk-doc-$suite";
# we can use which here as we override the path in TEST_ENVIRONMENT
# test perl scripts
-
for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj gtkdoc-scanobj ; do
@PERL@ -cwT `which $file`
if test $? = 1 ; then failed=$(($failed + 1)); fi
@@ -17,27 +18,17 @@ done
# test shell scripts
-
for file in gtkdoc-mkhtml gtkdoc-mkman gtkdoc-mkpdf gtkdocize; do
sh -n `which $file`
- if test $? != 0 ; then
- failed=$(($failed + 1));
- else
- echo `which $file`" syntax OK";
- fi
+ if test $? != 0 ; then failed=$(($failed + 1)); fi
tested=$(($tested + 1))
done
# test xsl files
-
for file in $ABS_TOP_SRCDIR/*.xsl; do
xmllint --noout --noent $file
- if test $? != 0 ; then
- failed=$(($failed + 1));
- else
- echo "$file syntax OK";
- fi
+ if test $? != 0 ; then failed=$(($failed + 1)); fi
tested=$(($tested + 1))
done
@@ -45,4 +36,6 @@ done
rate=$((100*($tested - $failed)/$tested));
echo "$rate %: Checks $tested, Failures: $failed"
-exit `test $failed = 0`;
+
+test $failed = 0
+exit $?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]