2003-01-12 20:24:01 +00:00
|
|
|
<!-- @author David Chandler, dchandler@users.sourceforge.net
|
|
|
|
|
|
|
|
We have a document,
|
|
|
|
http://thdltools.sourceforge.net/BuildSystems.html, that you
|
|
|
|
probably should read.
|
|
|
|
-->
|
|
|
|
|
2003-02-01 06:43:13 +00:00
|
|
|
<project name="THDLTools-junit" default="fail-nicely" basedir=".">
|
2003-01-12 20:24:01 +00:00
|
|
|
|
|
|
|
<description>
|
|
|
|
This Jakarta Ant buildfile is used to do the low-level work of
|
|
|
|
unit testing our system. This is separate from build.xml because
|
|
|
|
to use this build file, you must have installed JUnit and the
|
|
|
|
JUnit Ant tasks (i.e., $ANT_HOME/lib/junit.jar and
|
|
|
|
$ANT_HOME/lib/optional.jar). Thus, this buildfile contains only
|
|
|
|
targets that must interact with JUnit.
|
|
|
|
|
|
|
|
Read the comments of this buildfile to learn more, or see
|
|
|
|
'http://thdltools.sourceforge.net/BuildSystems.html'.
|
|
|
|
</description>
|
|
|
|
|
|
|
|
<taskdef name="junit"
|
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
|
|
|
|
|
You may no longer put xml-apis.jar, xercesImpl.jar, or xalan.jar in
Jskad/extensions. If you're lazy, you can move them to
extensions/drop-ins, but the correct thing to do is to move x*.jar to
$ANT_HOME/lib [next to vamp.jar, if you're already set up for Java Web
Start builds]. This is a side effect of improving the nightly builds.
Nightly builds now feature an HTML summary of the JUnit test results,
a datestamp, and full API docs in two flavors.
If you use a patched vamp.jar [e-mail me] that can run when an X11
display is not available (there is not an analogous problem for
Windows servers, I suspect), all you have to do to put up a nightly
builds site is to set up CVS access so that no password is requires
using SSH public-key crypto (sf.net documents how to do so well) and
then use the following daily cron job on your Unix box:
#! /bin/sh
renice +19 -p $$ >/dev/null 2>&1
su -l joe-user /bin/sh -c /var/www/thdl/nightly/doTheBuild.sh
where joe-user is an unprivileged user who has installed Ant properly
(see the updated BuildSystems.html on the developer's site off of
thdltools.sf.net) and set himself up a Jskad sandbox with a Fonts
sandbox underneath it in, e.g., /var/www/thdl/nightly/Jskad. Here's
doTheBuild.sh:
#! /bin/sh
JSKAD=/var/www/thdl/nightly/Jskad
DEST=/var/www/thdl/nightly/builds
HISTORY=/var/www/thdl/nightly/history
DATE=`date`
if test ! -d $DEST; then \
echo "$DEST does not exist ($DATE)." >> history; exit 1; fi
(cd $JSKAD && ant dc-nightly-build \
&& rm -fr ${DEST}/* \
&& cp dist/nightlyBuild.zip $DEST \
&& cd $DEST \
&& unzip nightlyBuild.zip)
if test $? != 0; then echo "NIGHTLY BUILDS FAILED on $DATE" >> $HISTORY; exit 2; fi
DDDATE=`date`
echo "Success on start=$DATE end=$DDDATE" >> $HISTORY
exit 0
2003-02-10 04:22:38 +00:00
|
|
|
<taskdef name="junitreport"
|
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator"/>
|
|
|
|
|
2003-01-12 20:24:01 +00:00
|
|
|
<target name="fail-nicely"
|
|
|
|
description="Tells the user to use build.xml, not this subbuildfile.">
|
2003-02-03 08:21:37 +00:00
|
|
|
<fail message="Do not use this file directly; use build.xml instead, which then uses this file."/>
|
2003-01-12 20:24:01 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- This creates output files TEST* in the Jskad/ directory. -->
|
2003-07-14 12:26:26 +00:00
|
|
|
<target name="run-headed-junit-tests"
|
2003-01-12 20:24:01 +00:00
|
|
|
description="Assuming that compilation of appropriate classes has been done, this target runs all the JUnit tests in the project.">
|
2003-07-14 12:26:26 +00:00
|
|
|
<junit fork="no" printsummary="yes" haltonfailure="yes" haltonerror="no">
|
|
|
|
<!-- we don't halt on error because you get an error when you run
|
|
|
|
on a headless display -->
|
2003-01-12 20:24:01 +00:00
|
|
|
<classpath>
|
|
|
|
<pathelement location="${junitbin}"/>
|
|
|
|
<path refid="entire.class.path"/>
|
|
|
|
</classpath>
|
You may no longer put xml-apis.jar, xercesImpl.jar, or xalan.jar in
Jskad/extensions. If you're lazy, you can move them to
extensions/drop-ins, but the correct thing to do is to move x*.jar to
$ANT_HOME/lib [next to vamp.jar, if you're already set up for Java Web
Start builds]. This is a side effect of improving the nightly builds.
Nightly builds now feature an HTML summary of the JUnit test results,
a datestamp, and full API docs in two flavors.
If you use a patched vamp.jar [e-mail me] that can run when an X11
display is not available (there is not an analogous problem for
Windows servers, I suspect), all you have to do to put up a nightly
builds site is to set up CVS access so that no password is requires
using SSH public-key crypto (sf.net documents how to do so well) and
then use the following daily cron job on your Unix box:
#! /bin/sh
renice +19 -p $$ >/dev/null 2>&1
su -l joe-user /bin/sh -c /var/www/thdl/nightly/doTheBuild.sh
where joe-user is an unprivileged user who has installed Ant properly
(see the updated BuildSystems.html on the developer's site off of
thdltools.sf.net) and set himself up a Jskad sandbox with a Fonts
sandbox underneath it in, e.g., /var/www/thdl/nightly/Jskad. Here's
doTheBuild.sh:
#! /bin/sh
JSKAD=/var/www/thdl/nightly/Jskad
DEST=/var/www/thdl/nightly/builds
HISTORY=/var/www/thdl/nightly/history
DATE=`date`
if test ! -d $DEST; then \
echo "$DEST does not exist ($DATE)." >> history; exit 1; fi
(cd $JSKAD && ant dc-nightly-build \
&& rm -fr ${DEST}/* \
&& cp dist/nightlyBuild.zip $DEST \
&& cd $DEST \
&& unzip nightlyBuild.zip)
if test $? != 0; then echo "NIGHTLY BUILDS FAILED on $DATE" >> $HISTORY; exit 2; fi
DDDATE=`date`
echo "Success on start=$DATE end=$DDDATE" >> $HISTORY
exit 0
2003-02-10 04:22:38 +00:00
|
|
|
<formatter type="xml"/><!-- If not XML, then 'ant -buildfile
|
|
|
|
build.xml check-report' will fail. -->
|
2003-04-14 05:22:27 +00:00
|
|
|
<test name="org.thdl.tib.input.DuffPaneTest"/>
|
2003-07-14 12:26:26 +00:00
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
<target name="run-headless-junit-tests"
|
|
|
|
description="Assuming that compilation of appropriate classes has been done, this target runs all the JUnit tests in the project.">
|
|
|
|
<junit fork="no" printsummary="yes" haltonfailure="yes" haltonerror="yes">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${junitbin}"/>
|
|
|
|
<path refid="entire.class.path"/>
|
|
|
|
</classpath>
|
|
|
|
<formatter type="xml"/><!-- If not XML, then 'ant -buildfile
|
|
|
|
build.xml check-report' will fail. -->
|
|
|
|
<sysproperty key="java.awt.headless" value="true"/>
|
|
|
|
<test name="org.thdl.util.RTFFixerInputStreamTest"/>
|
2003-01-12 20:24:01 +00:00
|
|
|
<test name="org.thdl.util.ThdlLazyExceptionTest"/>
|
|
|
|
<test name="org.thdl.util.TrieTest"/>
|
2003-05-18 17:17:52 +00:00
|
|
|
<test name="org.thdl.tib.input.TMW_RTF_TO_THDL_WYLIETest"/>
|
2003-03-22 03:24:56 +00:00
|
|
|
<test name="org.thdl.tib.text.tshegbar.UnicodeUtilsTest"/>
|
2003-03-22 03:46:32 +00:00
|
|
|
<test name="org.thdl.tib.text.tshegbar.LegalTshegBarTest"/>
|
2003-03-22 03:55:39 +00:00
|
|
|
<test name="org.thdl.tib.text.tshegbar.UnicodeGraphemeClusterTest"/>
|
2003-03-22 04:55:17 +00:00
|
|
|
<test name="org.thdl.tib.text.tshegbar.UnicodeCodepointToThdlWylieTest"/>
|
2003-01-12 20:24:01 +00:00
|
|
|
</junit>
|
|
|
|
</target>
|
You may no longer put xml-apis.jar, xercesImpl.jar, or xalan.jar in
Jskad/extensions. If you're lazy, you can move them to
extensions/drop-ins, but the correct thing to do is to move x*.jar to
$ANT_HOME/lib [next to vamp.jar, if you're already set up for Java Web
Start builds]. This is a side effect of improving the nightly builds.
Nightly builds now feature an HTML summary of the JUnit test results,
a datestamp, and full API docs in two flavors.
If you use a patched vamp.jar [e-mail me] that can run when an X11
display is not available (there is not an analogous problem for
Windows servers, I suspect), all you have to do to put up a nightly
builds site is to set up CVS access so that no password is requires
using SSH public-key crypto (sf.net documents how to do so well) and
then use the following daily cron job on your Unix box:
#! /bin/sh
renice +19 -p $$ >/dev/null 2>&1
su -l joe-user /bin/sh -c /var/www/thdl/nightly/doTheBuild.sh
where joe-user is an unprivileged user who has installed Ant properly
(see the updated BuildSystems.html on the developer's site off of
thdltools.sf.net) and set himself up a Jskad sandbox with a Fonts
sandbox underneath it in, e.g., /var/www/thdl/nightly/Jskad. Here's
doTheBuild.sh:
#! /bin/sh
JSKAD=/var/www/thdl/nightly/Jskad
DEST=/var/www/thdl/nightly/builds
HISTORY=/var/www/thdl/nightly/history
DATE=`date`
if test ! -d $DEST; then \
echo "$DEST does not exist ($DATE)." >> history; exit 1; fi
(cd $JSKAD && ant dc-nightly-build \
&& rm -fr ${DEST}/* \
&& cp dist/nightlyBuild.zip $DEST \
&& cd $DEST \
&& unzip nightlyBuild.zip)
if test $? != 0; then echo "NIGHTLY BUILDS FAILED on $DATE" >> $HISTORY; exit 2; fi
DDDATE=`date`
echo "Success on start=$DATE end=$DDDATE" >> $HISTORY
exit 0
2003-02-10 04:22:38 +00:00
|
|
|
|
|
|
|
<!-- Note the odd dependencies. -->
|
|
|
|
<target name="make-nightly-report"
|
2003-07-14 12:26:26 +00:00
|
|
|
description="Creates an HTML report about the status of the tests; is dependent (via build.xml) on targets that execute JUnit Ant tasks.">
|
You may no longer put xml-apis.jar, xercesImpl.jar, or xalan.jar in
Jskad/extensions. If you're lazy, you can move them to
extensions/drop-ins, but the correct thing to do is to move x*.jar to
$ANT_HOME/lib [next to vamp.jar, if you're already set up for Java Web
Start builds]. This is a side effect of improving the nightly builds.
Nightly builds now feature an HTML summary of the JUnit test results,
a datestamp, and full API docs in two flavors.
If you use a patched vamp.jar [e-mail me] that can run when an X11
display is not available (there is not an analogous problem for
Windows servers, I suspect), all you have to do to put up a nightly
builds site is to set up CVS access so that no password is requires
using SSH public-key crypto (sf.net documents how to do so well) and
then use the following daily cron job on your Unix box:
#! /bin/sh
renice +19 -p $$ >/dev/null 2>&1
su -l joe-user /bin/sh -c /var/www/thdl/nightly/doTheBuild.sh
where joe-user is an unprivileged user who has installed Ant properly
(see the updated BuildSystems.html on the developer's site off of
thdltools.sf.net) and set himself up a Jskad sandbox with a Fonts
sandbox underneath it in, e.g., /var/www/thdl/nightly/Jskad. Here's
doTheBuild.sh:
#! /bin/sh
JSKAD=/var/www/thdl/nightly/Jskad
DEST=/var/www/thdl/nightly/builds
HISTORY=/var/www/thdl/nightly/history
DATE=`date`
if test ! -d $DEST; then \
echo "$DEST does not exist ($DATE)." >> history; exit 1; fi
(cd $JSKAD && ant dc-nightly-build \
&& rm -fr ${DEST}/* \
&& cp dist/nightlyBuild.zip $DEST \
&& cd $DEST \
&& unzip nightlyBuild.zip)
if test $? != 0; then echo "NIGHTLY BUILDS FAILED on $DATE" >> $HISTORY; exit 2; fi
DDDATE=`date`
echo "Success on start=$DATE end=$DDDATE" >> $HISTORY
exit 0
2003-02-10 04:22:38 +00:00
|
|
|
<junitreport todir="${dist}">
|
|
|
|
<fileset dir=".">
|
|
|
|
<include name="TEST-*.xml"/>
|
|
|
|
</fileset>
|
|
|
|
<report format="noframes" todir="${dist}"/>
|
|
|
|
</junitreport>
|
|
|
|
<delete file="${dist}/TESTS-TestSuites.xml"/>
|
|
|
|
</target>
|
2003-01-12 20:24:01 +00:00
|
|
|
</project>
|