Add test update tool and procedure.

This commit is contained in:
Diomidis Spinellis 2008-08-16 09:02:46 +00:00
parent 5c6cb00f32
commit d8f18b8206
2 changed files with 29 additions and 2 deletions

View File

@ -58,7 +58,7 @@ $(BALL_TAR_GZ): $(JARFILE) docs Makefile
cp build.xml $(DISTDIR)
cp umlgraph.bat $(DISTDIR)/bin
$(LF) umlgraph >$(DISTDIR)/bin/umlgraph
tar cf - src testdata/{java,dot-ref} javadoc --exclude='*/RCS' | tar -C $(DISTDIR) -xvf -
tar cf - src testdata/{java,dot-ref} javadoc --exclude='*/CVS' | tar -C $(DISTDIR) -xvf -
$(LF) $(PICFILE) >$(DISTDIR)/src/$(PICFILE)
tar czf $(BALL_TAR_GZ) $(DISTDIR)
zip -r $(ZIPBALL) $(DISTDIR)
@ -73,8 +73,11 @@ $(JARFILE): $(DOCLETSRC)
test:
ant test
testupdate:
sh tools/testupdate.sh
web: $(BALL_TAR_GZ) CHECKSUM.MD5
cp $(BALL_TAR_GZ) $(ZIPBALL) CHECKSUM.MD5 oldversion.html $(WEBDIR)
cp $(BALL_TAR_GZ) $(ZIPBALL) CHECKSUM.MD5 oldversion.html umlgraph-banner.png $(WEBDIR)
cp $(JARFILE) $(WEBDIR)/jars/UmlGraph-$(VERSION).jar
tar cf - javadoc | tar -C $(WEBDIR) -xvf -
sed "s/VERSION/$(VERSION)/g" index.html >$(WEBDIR)/index.html

24
tools/testupdate.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/sh
#
# Update the reference test data to match what is actually produced
# This should only be executed after manually verifying that the
# differences are indeed intentional.
#
# Diomidis Spinellis. August 2008.
#
# $Id$
#
for i in dot umldoc
do
find testdata/$i-ref -type f |
grep -v CVS |
sed "s/\(testdata\/$i-\)ref\(.*\)/\1ref\2 \1out\2/" |
while read refname outname
do
if ! cmp -s $refname $outname
then
cp $outname $refname
fi
done
done