[gtk-doc] tests: expand the snapshot feature to cover xml
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] tests: expand the snapshot feature to cover xml
- Date: Sun, 17 May 2015 08:27:25 +0000 (UTC)
commit b2bfb0be277348329be9895006e64a4d709a139f
Author: Stefan Sauer <ensonic users sf net>
Date: Sun May 17 10:26:48 2015 +0200
tests: expand the snapshot feature to cover xml
Mention it in HACKING.
HACKING | 7 +++++++
tests/.gitignore | 3 ++-
tests/Makefile.am | 6 +++++-
tests/sanity.sh | 9 ++++++++-
4 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/HACKING b/HACKING
index 7512718..4094594 100644
--- a/HACKING
+++ b/HACKING
@@ -6,6 +6,13 @@ grep "gtkdoc-* line" build.log
jhbuild buildone --no-net glib
+Since 1.23 we do have a snapshot feature to check the stability of the generated
+xml/html. Simply run "make snapshot" under tests. Then make changes and run
+"make check". The tests/sanity.sh will check for delta. If you want to inspect
+what delta a change created, you can git checkout a revision before the change,
+"make snapshot", go back to head and "make check", the sanity.sh test will now
+fail and show the delta.
+
Releasing
=========
diff --git a/tests/.gitignore b/tests/.gitignore
index e702de3..a154fe2 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -20,4 +20,5 @@
/so_locations
/tags
/tools.sh
-*/docs/html.ref/
+/*/docs/html.ref/
+/*/docs/xtml.ref/
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 496ddd2..dc7cacd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -25,10 +25,14 @@ EXTRA_DIST = gtkdoctest.sh tools.sh sanity.sh \
snapshot:
@for dir in $(SUBDIRS); do \
+ rm -rf $$dir/docs/html.ref; \
if test -d $$dir/docs/html; then \
- rm -rf $$dir/docs/html.ref; \
cp -r $$dir/docs/html $$dir/docs/html.ref; \
fi; \
+ rm -rf $$dir/docs/xml.ref; \
+ if test -d $$dir/docs/xml; then \
+ cp -r $$dir/docs/xml $$dir/docs/xml.ref; \
+ fi; \
done
.PHONY: snapshot
diff --git a/tests/sanity.sh b/tests/sanity.sh
index faa2aa8..3b3a92a 100755
--- a/tests/sanity.sh
+++ b/tests/sanity.sh
@@ -90,9 +90,16 @@ if test $nok -gt 0 ; then failed=`expr $failed + 1`; fi
tested=`expr $tested + 1`
-# check stability of generated html
+# check stability of generated xml/html
nok=0
for path in $dir/*/docs*; do
+ if test -d $path/xml.ref; then
+ diff -u $path/xml.ref $path/xml
+ if test $? = 1 ; then
+ echo 1>&2 "difference in generated xml for $path"
+ nok=`expr $nok + 1`;
+ fi
+ fi
if test -d $path/html.ref; then
diff -u $path/html.ref $path/html
if test $? = 1 ; then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]