1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314
|
<?xml version="1.0"?>
<!--
Ant script for running a batch test that uses "testCases"
-->
<project default="">
<!-- import the global configuration file -->
<property file="../shared/ant.config"/>
<!-- test directory where you put your files like "relaxNNN.rlx" -->
<property name="testRoot" value="../testCases" />
<!-- test configuration -->
<path id="commonTestDir">
<pathelement path="${testRoot}/suites/JepaX"/>
<pathelement path="${testRoot}/suites/NITF"/>
<pathelement path="${testRoot}/suites/errorRELAXGrammar/lrgErrRatio"/>
<pathelement path="${testRoot}/suites/errorRELAXGrammar/smlErrRatio" />
</path>
<path id="RELAXBatchTestDir">
<path refid="commonTestDir"/>
<pathelement path="${testRoot}/relax"/>
</path>
<property name="RELAXBatchTestDir" refid="RELAXBatchTestDir"/>
<path id="RELAXNGBatchTestDir">
<path refid="commonTestDir"/>
<pathelement path="${testRoot}/relaxng"/>
<!-- '@' instructs the recursive subdirectory processing -->
<pathelement path="${testRoot}/relaxng/jamesClark@"/>
</path>
<property name="RELAXNGBatchTestDir" refid="RELAXNGBatchTestDir"/>
<path id="TREXBatchTestDir">
<path refid="commonTestDir"/>
<pathelement path="${testRoot}/trex"/>
</path>
<property name="TREXBatchTestDir" refid="TREXBatchTestDir"/>
<path id="DTDBatchTestDir">
<path refid="commonTestDir"/>
<pathelement path="${testRoot}/dtd/XHTMLm12n/examples"/>
<pathelement path="${testRoot}/dtd/XHTML1.0"/>
</path>
<property name="DTDBatchTestDir" refid="DTDBatchTestDir"/>
<path id="XSDBatchTestDir">
<path refid="commonTestDir"/>
<pathelement path="${testRoot}/xmlschema"/>
<pathelement path="${testRoot}/xmlschema/contrib"/>
<pathelement path="${testRoot}/xmlschema/tutorialExamples"/>
<pathelement path="${testRoot}/xmlschema/identity" />
</path>
<property name="XSDBatchTestDir" refid="XSDBatchTestDir"/>
<!--
PatternSets for the partial test
========================================================================
This pattern specifies which test codes should be executed.
The same pattern is used to test both the working copy and the release package.
-->
<!-- all -->
<patternset id="tps.all">
<include name="**/*Test.class"/>
<include name="**/*TestG.class"/>
</patternset>
<!-- XSDLib -->
<patternset id="tps.xsdlib">
<include name="com/sun/msv/datatype/**/*Test.class" />
</patternset>
<!-- MSV core -->
<patternset id="tps.msv">
<include name="batch/verifier/**/*Test.class" />
<include name="com/sun/msv/util/*Test.class" />
</patternset>
<!-- generator -->
<patternset id="tps.generator">
<include name="**/generator/**/*TestG.class" />
</patternset>
<!-- RELAX converter -->
<patternset id="tps.rngconv">
<include name="batch/writer/relaxng/**/*Test.class"/>
</patternset>
<!-- TREX converter -->
<patternset id="tps.trexconv">
<include name="batch/writer/trex/**/*Test.class"/>
</patternset>
<!--
run the current batch tests against
the working directory.
./bin/**/*Test.class is executed
-->
<target name="test">
<mkdir dir="./testLog" />
<!--
please remove jaxp.jar from ant directory,
because it uses an old one, and this test needs the latest one
-->
<junit haltonfailure="no" printsummary="yes" fork="yes"
haltonerror="no" failureProperty="hadError">
<sysproperty key="RELAXBatchTestDir" value="${RELAXBatchTestDir}"/>
<sysproperty key="TREXBatchTestDir" value="${TREXBatchTestDir}"/>
<sysproperty key="DTDBatchTestDir" value="${DTDBatchTestDir}"/>
<sysproperty key="XSDBatchTestDir" value="${XSDBatchTestDir}"/>
<sysproperty key="RELAXNGBatchTestDir" value="${RELAXNGBatchTestDir}"/>
<!-- perform strict check on schema.
do not define MSV_STRICT_CHECK to turn off the check -->
<sysproperty key="MSV_STRICT_CHECK" value="yes"/>
<formatter type="plain" />
<formatter type="xml" />
<classpath>
<pathelement location="bin" />
<pathelement location="src" />
<pathelement location="test" />
<pathelement location="../xsdlib/bin/" />
<pathelement location="../xsdlib/src/" />
<pathelement location="../msv/bin/" />
<pathelement location="../msv/src/" />
<pathelement location="../testharness/bin/" />
<pathelement location="${relaxngDatatype.jar}" />
<pathelement location="${isorelax.jar}" />
<pathelement location="${resolver.jar}" />
<pathelement path="${java.class.path}" />
<!--include CatalogManager.properties into the class path -->
<pathelement path="${testRoot}"/>
</classpath>
<batchtest todir="./testLog">
<fileset dir="bin">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
</target>
<!--
run the batch tests
against the release package.
./bin/**/*Test.class are executed against ${testJar} file.
-->
<target name="test_release">
<!-- create temporary directory -->
<mkdir dir="./temp"/>
<!-- extract the contents of the jar file to be tested -->
<unjar src="${testJar}" dest="temp" />
<!--
compile test harnesses into it.
It is ok to rely on the working copy at this stage.
-->
<javac
srcdir="./test"
destdir="./temp"
debug="on"
optimize="off"
classpath="temp:bind"
/>
<!-- run JUnit -->
<mkdir dir="./testLog" />
<junit haltonfailure="yes" printsummary="yes" fork="yes"
haltonerror="yes">
<sysproperty key="RELAXBatchTestDir" value="${RELAXBatchTestDir}"/>
<sysproperty key="TREXBatchTestDir" value="${TREXBatchTestDir}"/>
<sysproperty key="DTDBatchTestDir" value="${DTDBatchTestDir}"/>
<sysproperty key="XSDBatchTestDir" value="${XSDBatchTestDir}"/>
<sysproperty key="RELAXNGBatchTestDir" value="${RELAXNGBatchTestDir}"/>
<formatter type="plain" />
<classpath>
<!-- do not refer to the working copy -->
<pathelement location="./test" />
<pathelement location="./temp" />
<pathelement location="${junit.jar}"/>
<pathelement location="${ant.jar}"/>
<pathelement location="${relaxngDatatype.jar}"/>
<!-- do not let whatever binaries in your classpath interfer with it. -->
<!-- DO NOT: <pathelement path="${java.class.path}" />-->
</classpath>
<batchtest todir="./testLog">
<fileset dir="temp">
<include name="**/*Test.class"/>
</fileset>
</batchtest>
</junit>
<delete dir="./temp"/>
</target>
<!-- run xsdlib test -->
<!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<target name="test_xsdlib">
<antcall target="doTest">
<param name="testPattern" value="tps.xsdlib"/>
</antcall>
</target>
<target name="test_xsdlib_package">
<antcall target="doReleaseTest">
<param name="testPattern" value="tps.xsdlib" />
<param name="testJar" value="./package/xsdlib.jar"/>
</antcall>
</target>
<!-- run core msv test -->
<!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<target name="test_msv">
<antcall target="doTest">
<param name="testPattern" value="tps.msv"/>
</antcall>
</target>
<target name="test_msv_package">
<antcall target="doReleaseTest">
<param name="testPattern" value="tps.msv" />
<param name="testJar" value="./package/msv.jar"/>
</antcall>
</target>
<!-- run generator test -->
<!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<target name="test_xmlgen">
<antcall target="doTest">
<param name="testPattern" value="tps.generator" />
</antcall>
</target>
<target name="test_xmlgen_package">
<antcall target="doReleaseTest">
<param name="testPattern" value="tps.generator" />
<param name="testJar" value="./package/xmlgen.jar"/>
</antcall>
</target>
<!-- run RELAX NG converter test -->
<!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<target name="test_rngconv">
<antcall target="doTest">
<param name="testPattern" value="tps.rngconv" />
</antcall>
</target>
<target name="test_rngconv_package">
<antcall target="doReleaseTest">
<param name="testPattern" value="tps.rngconv" />
<param name="testJar" value="./package/rngconv.jar"/>
</antcall>
</target>
<!-- run TREX converter test -->
<!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
<target name="test_trexconv">
<antcall target="doTest">
<param name="testPattern" value="tps.trexconv" />
</antcall>
</target>
<target name="test_trexconv_package">
<antcall target="doReleaseTest">
<param name="testPattern" value="tps.trexconv" />
<param name="testJar" value="./package/trexconv.jar"/>
</antcall>
</target>
</project>
|