rice@google.com | c1da4d7 | 2010-03-16 17:24:13 +0000 | [diff] [blame] | 1 | <project name="bikeshed" default="build" basedir="."> |
amitmanjhi@google.com | a4d9144 | 2010-03-04 22:11:39 +0000 | [diff] [blame] | 2 | <property name="gwt.root" location=".." /> |
| 3 | <property name="project.tail" value="bikeshed" /> |
| 4 | <property name="test.args" value="" /> |
| 5 | |
| 6 | <import file="${gwt.root}/common.ant.xml" /> |
| 7 | |
amitmanjhi@google.com | e726ead | 2010-04-02 15:14:38 +0000 | [diff] [blame] | 8 | <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" /> |
| 9 | <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" /> |
| 10 | |
gwt.mirrorbot@gmail.com | d54a4bd | 2010-06-07 19:20:31 +0000 | [diff] [blame] | 11 | <property name="test.timeout" value="4" /> |
| 12 | <property name="emma.merged.out" value="${junit.out}/emma-coverage" /> |
| 13 | <property name="gwt.junit.testcase.web.includes" value="${gwt.junit.testcase.includes}" /> |
| 14 | <property name="gwt.junit.testcase.web.excludes" value="" /> |
| 15 | |
| 16 | <property name="gwt.junit.testcase.dev.includes" value="${gwt.junit.testcase.includes}" /> |
| 17 | <property name="gwt.junit.testcase.dev.excludes" value="" /> |
| 18 | |
| 19 | <!-- |
| 20 | Classpaths added for test cases |
| 21 | --> |
| 22 | <path id="test.extraclasspath"> |
| 23 | <pathelement location="${gwt.build}/out/dev/bin-test" /> |
| 24 | <pathelement location="test-super" /> |
| 25 | <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/> |
| 26 | <pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/> |
| 27 | <pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/> |
| 28 | <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/> |
| 29 | <pathelement location="${gwt.user.jar}" /> |
| 30 | </path> |
| 31 | |
| 32 | |
| 33 | |
amitmanjhi@google.com | a4d9144 | 2010-03-04 22:11:39 +0000 | [diff] [blame] | 34 | <target name="checkstyle" description="Static analysis of source"> |
| 35 | <gwt.checkstyle> |
| 36 | <fileset dir="src" /> |
gwt.mirrorbot@gmail.com | d54a4bd | 2010-06-07 19:20:31 +0000 | [diff] [blame] | 37 | <fileset dir="super" /> |
amitmanjhi@google.com | a4d9144 | 2010-03-04 22:11:39 +0000 | [diff] [blame] | 38 | </gwt.checkstyle> |
rice@google.com | c1da4d7 | 2010-03-16 17:24:13 +0000 | [diff] [blame] | 39 | <gwt.checkstyle.tests> |
amitmanjhi@google.com | a4d9144 | 2010-03-04 22:11:39 +0000 | [diff] [blame] | 40 | <fileset dir="test"> |
| 41 | <include name="com/google/**/*.java" /> |
| 42 | <include name="test/**" /> |
| 43 | </fileset> |
gwt.mirrorbot@gmail.com | d54a4bd | 2010-06-07 19:20:31 +0000 | [diff] [blame] | 44 | <fileset dir="test-super"> |
| 45 | <include name="com/google/**/*.java" /> |
| 46 | </fileset> |
amitmanjhi@google.com | a4d9144 | 2010-03-04 22:11:39 +0000 | [diff] [blame] | 47 | </gwt.checkstyle.tests> |
| 48 | </target> |
amitmanjhi@google.com | e726ead | 2010-04-02 15:14:38 +0000 | [diff] [blame] | 49 | |
| 50 | <target name="compile" description="Compile all class files" |
| 51 | unless="compile.complete"> |
| 52 | <mkdir dir="${javac.out}" /> |
| 53 | <gwt.javac excludes="**/sample/**"> |
| 54 | <classpath> |
| 55 | <pathelement location="${gwt.dev.jar}" /> |
| 56 | <pathelement location="${gwt.user.jar}" /> |
| 57 | </classpath> |
| 58 | </gwt.javac> |
| 59 | </target> |
| 60 | |
| 61 | <target name="build" depends="compile" |
| 62 | description="Build and package this project"> |
| 63 | <mkdir dir="${gwt.build.lib}" /> |
| 64 | <gwt.jar> |
gwt.mirrorbot@gmail.com | e20feb2 | 2010-04-19 15:27:00 +0000 | [diff] [blame] | 65 | <fileset dir="src" excludes="**/sample/** **/META-INF/**" /> |
amitmanjhi@google.com | e726ead | 2010-04-02 15:14:38 +0000 | [diff] [blame] | 66 | <fileset dir="${javac.out}" /> |
| 67 | </gwt.jar> |
| 68 | </target> |
| 69 | |
gwt.mirrorbot@gmail.com | d54a4bd | 2010-06-07 19:20:31 +0000 | [diff] [blame] | 70 | <!-- |
| 71 | Compiles the test code for this project |
| 72 | --> |
| 73 | <target name="compile.tests" |
| 74 | unless="compile.tests.complete"> |
| 75 | <mkdir dir="${javac.junit.out}" /> |
| 76 | <gwt.javac srcdir="test" destdir="${javac.junit.out}"> |
| 77 | <classpath> |
| 78 | <pathelement location="${javac.out}" /> |
| 79 | <pathelement location="${gwt.build}/out/dev/bin-test" /> |
| 80 | <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" /> |
| 81 | <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> |
| 82 | <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" /> |
| 83 | <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/> |
| 84 | <pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/> |
| 85 | <pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/> |
| 86 | <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/> |
| 87 | <pathelement location="${gwt.dev.jar}" /> |
| 88 | <pathelement location="${gwt.user.jar}" /> |
| 89 | </classpath> |
| 90 | </gwt.javac> |
| 91 | </target> |
| 92 | |
| 93 | <target name="test.remoteweb" depends="test.web.remote"> |
| 94 | <echo message="DEPRECATED: test.remoteweb has been renamed test.web.remote"/> |
| 95 | </target> |
| 96 | |
| 97 | <target name="test.web.remote" |
| 98 | description="Run web test with remote browsers" |
| 99 | if="gwt.hosts.web.remote" |
| 100 | unless="test.web.remote.disable"> |
| 101 | <echo message="Performing web remote testing at ${gwt.hosts.web.remote}" /> |
| 102 | <property name="test.web.remote.args" value="${test.args.web.remote}" /> |
| 103 | <fileset id="test.web.remote.tests" dir="${javac.junit.out}" |
| 104 | includes="${gwt.junit.testcase.web.includes}" |
| 105 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 106 | <gwt.junit test.name="test.web.remote" |
| 107 | test.args="${test.web.remote.args} -out www -prod -standardsMode -runStyle RemoteWeb:${gwt.hosts.web.remote}" |
| 108 | test.out="${junit.out}/web-remote" |
| 109 | test.cases="test.web.remote.tests" > |
| 110 | <extraclasspaths> |
| 111 | <path refid="test.extraclasspath" /> |
| 112 | </extraclasspaths> |
| 113 | </gwt.junit> |
| 114 | </target> |
| 115 | |
| 116 | <target name="test.dev.remote" |
| 117 | depends="compile, compile.tests" |
| 118 | description="Run dev-mode tests with remote browsers" |
| 119 | if="gwt.hosts.dev.remote" |
| 120 | unless="test.dev.remote.disable"> |
| 121 | <echo message="Performing dev-mode remote testing at ${gwt.remote.browsers}" /> |
| 122 | <property name="test.dev.remote.args" value="${test.args.dev.remote}" /> |
| 123 | <fileset id="test.dev.remote.tests" dir="${javac.junit.out}" |
| 124 | includes="${gwt.junit.testcase.dev.includes}" |
| 125 | excludes="${gwt.junit.testcase.dev.excludes}" /> |
| 126 | <gwt.junit test.name="test.dev.remote" |
| 127 | test.args="${test.dev.remote.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote}" |
| 128 | test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" > |
| 129 | <extraclasspaths> |
| 130 | <path refid="test.extraclasspath" /> |
| 131 | </extraclasspaths> |
| 132 | </gwt.junit> |
| 133 | </target> |
| 134 | |
| 135 | <target name="test.emma.remote" |
| 136 | depends="compile, compile.tests" |
| 137 | description="Run emma tests with remote browsers" |
| 138 | if="gwt.hosts.dev.remote" |
| 139 | unless="test.emma.remote.disable"> |
| 140 | <echo message="Performing emma remote testing at ${gwt.hosts.dev.remote}" /> |
| 141 | <property name="test.emma.remote.args" value="${test.args.dev.remote}" /> |
| 142 | <fileset id="test.emma.remote.tests" dir="${javac.junit.out}" |
| 143 | includes="${gwt.junit.testcase.dev.includes}" |
| 144 | excludes="${gwt.junit.testcase.dev.excludes}" /> |
| 145 | <gwt.junit test.name="test.emma.remote" |
| 146 | test.args="${test.emma.remote.args} -out www -standardsMode -runStyle RemoteWeb:${gwt.hosts.dev.remote}" |
| 147 | test.out="${junit.out}/emma-remote" |
| 148 | test.cases="test.emma.remote.tests" > |
| 149 | <extraclasspaths> |
| 150 | <path refid="test.extraclasspath" /> |
| 151 | <pathelement location="${gwt.tools.redist}/emma/emma.jar" /> |
| 152 | </extraclasspaths> |
| 153 | </gwt.junit> |
| 154 | </target> |
| 155 | |
| 156 | <target name="test.emma.selenium" |
| 157 | depends="compile, compile.tests" |
| 158 | description="Run emma tests with Selenium-RC servers" |
| 159 | if="gwt.hosts.dev.selenium" |
| 160 | unless="test.emma.selenium.disable"> |
| 161 | <echo message="Performing emma selenium testing at ${gwt.hosts.dev.selenium}" /> |
| 162 | <property name="test.emma.selenium.args" value="${test.args.dev.selenium}" /> |
| 163 | <fileset id="test.emma.selenium.tests" dir="${javac.junit.out}" |
| 164 | includes="${gwt.junit.testcase.dev.includes}" |
| 165 | excludes="${gwt.junit.testcase.dev.excludes}" /> |
| 166 | <gwt.junit test.name="test.emma.selenium" |
| 167 | test.args='${test.emma.selenium.args} -out www -standardsMode -runStyle "Selenium:${gwt.hosts.dev.selenium}"' |
| 168 | test.out="${junit.out}/emma-selenium" |
| 169 | test.cases="test.emma.selenium.tests" > |
| 170 | <extraclasspaths> |
| 171 | <path refid="test.extraclasspath" /> |
| 172 | <pathelement location="${gwt.tools.redist}/emma/emma.jar" /> |
| 173 | </extraclasspaths> |
| 174 | </gwt.junit> |
| 175 | </target> |
| 176 | |
| 177 | <target name="test.draft.remote" |
| 178 | depends="compile, compile.tests" |
| 179 | description="Run draft compiled tests with remote browsers" |
| 180 | if="gwt.hosts.web.remote" |
| 181 | unless="test.draft.remote.disable"> |
| 182 | <echo message="Performing draft remote testing at ${gwt.hosts.web.remote}" /> |
| 183 | <property name="test.draft.remote.args" value="${test.args.web.remote}" /> |
| 184 | <fileset id="test.draft.remote.tests" dir="${javac.junit.out}" |
| 185 | includes="${gwt.junit.testcase.web.includes}" |
| 186 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 187 | <gwt.junit test.name="test.draft.remote" |
| 188 | test.args="${test.draft.remote.args} -draftCompile -prod -standardsMode -out www -runStyle RemoteWeb:${gwt.hosts.web.remote}" |
| 189 | test.out="${junit.out}/draft-remote" |
| 190 | test.cases="test.draft.remote.tests" > |
| 191 | <extraclasspaths> |
| 192 | <path refid="test.extraclasspath" /> |
| 193 | </extraclasspaths> |
| 194 | </gwt.junit> |
| 195 | </target> |
| 196 | |
| 197 | <target name="test.nometa.remote" |
| 198 | description="Run -XdisableClassMetadata tests with remote browsers" |
| 199 | if="gwt.hosts.web.remote" |
| 200 | unless="test.nometa.remote.disable"> |
| 201 | <echo message="Performing nometa remote testing at ${gwt.hosts.web.remote}" /> |
| 202 | <property name="test.nometa.remote.args" value="${test.args.web.remote}" /> |
| 203 | <fileset id="test.nometa.remote.tests" dir="${javac.junit.out}" |
| 204 | includes="${gwt.junit.testcase.web.includes}" |
| 205 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 206 | <gwt.junit test.name="test.nometa.remote" |
| 207 | test.args="${test.nometa.remote.args} -XdisableClassMetadata -prod -standardsMode -out www -runStyle RemoteWeb:${gwt.hosts.web.remote}" |
| 208 | test.out="${junit.out}/nometa-remote" |
| 209 | test.cases="test.nometa.remote.tests" > |
| 210 | <extraclasspaths> |
| 211 | <path refid="test.extraclasspath" /> |
| 212 | </extraclasspaths> |
| 213 | </gwt.junit> |
| 214 | </target> |
| 215 | |
| 216 | <target name="test.selenium" depends="test.web.selenium"> |
| 217 | <echo message="DEPRECATED: test.selenium has been renamed test.web.selenium"/> |
| 218 | </target> |
| 219 | |
| 220 | <target name="test.web.selenium" |
| 221 | depends="compile, compile.tests" |
| 222 | description="Run web tests using Selenium RC" |
| 223 | if="gwt.hosts.web.selenium" |
| 224 | unless="test.web.selenium.disable"> |
| 225 | <echo message="Performing web testing using Selenium RC at ${gwt.hosts.web.selenium}" /> |
| 226 | <property name="test.web.selenium.args" value="${test.args.web.selenium}" /> |
| 227 | <fileset id="test.web.selenium.tests" dir="${javac.junit.out}" |
| 228 | includes="${gwt.junit.testcase.web.includes}" |
| 229 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 230 | <gwt.junit test.name="test.web.selenium" |
| 231 | test.args='${test.web.selenium.args} -prod -out www -standardsMode -runStyle "Selenium:${gwt.hosts.web.selenium}"' |
| 232 | test.out="${junit.out}/web-selenium" |
| 233 | test.cases="test.web.selenium.tests" > |
| 234 | <extraclasspaths> |
| 235 | <path refid="test.extraclasspath" /> |
| 236 | </extraclasspaths> |
| 237 | </gwt.junit> |
| 238 | </target> |
| 239 | |
| 240 | <target name="test.dev.selenium" |
| 241 | depends="compile, compile.tests" |
| 242 | description="Run dev-mode tests using Selenium RC servers" |
| 243 | if="gwt.hosts.dev.selenium" |
| 244 | unless="test.dev.selenium.disable"> |
| 245 | <echo message="Performing dev-mode testing using Selenium RC at ${gwt.hosts.dev.selenium}" /> |
| 246 | <property name="test.dev.selenium.args" value="${test.args.dev.selenium}" /> |
| 247 | <fileset id="test.dev.selenium.tests" dir="${javac.junit.out}" |
| 248 | includes="${gwt.junit.testcase.dev.includes}" |
| 249 | excludes="${gwt.junit.testcase.dev.excludes}" /> |
| 250 | <gwt.junit test.name="test.dev.selenium" |
| 251 | test.args='${test.dev.selenium.args} -out www -standardsMode -runStyle "Selenium:${gwt.hosts.dev.selenium}"' |
| 252 | test.out="${junit.out}/dev-selenium" |
| 253 | test.cases="test.dev.selenium.tests" > |
| 254 | <extraclasspaths> |
| 255 | <path refid="test.extraclasspath" /> |
| 256 | </extraclasspaths> |
| 257 | </gwt.junit> |
| 258 | </target> |
| 259 | |
| 260 | <target name="test.nometa.selenium" |
| 261 | description="Run nometa tests using Selenium RC" |
| 262 | if="gwt.hosts.web.selenium" |
| 263 | unless="test.nometa.selenium.disable"> |
| 264 | <echo message="Performing nometa testing using Selenium RC at ${gwt.hosts.web.selenium}" /> |
| 265 | <property name="test.nometa.selenium.args" |
| 266 | value="${test.args.web.selenium}" /> |
| 267 | <fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}" |
| 268 | includes="${gwt.junit.testcase.web.includes}" |
| 269 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 270 | <gwt.junit test.name="test.nometa.selenium" |
| 271 | test.args='${test.nometa.selenium.args} -XdisableClassMetadata -prod -standardsMode -out www -runStyle "Selenium:${gwt.hosts.web.selenium}"' |
| 272 | test.out="${junit.out}/nometa-selenium" |
| 273 | test.cases="test.nometa.selenium.tests" > |
| 274 | <extraclasspaths> |
| 275 | <path refid="test.extraclasspath" /> |
| 276 | </extraclasspaths> |
| 277 | </gwt.junit> |
| 278 | </target> |
| 279 | |
| 280 | <target name="test.draft.selenium" |
| 281 | description="Run draft compiled tests using Selenium RC" |
| 282 | if="gwt.hosts.web.selenium" |
| 283 | unless="test.draft.selenium.disable"> |
| 284 | <echo message="Performing draft testing using Selenium RC at ${gwt.hosts.web.selenium}" /> |
| 285 | <property name="test.draft.selenium.args" |
| 286 | value="${test.args.web.selenium}" /> |
| 287 | <fileset id="test.draft.selenium.tests" dir="${javac.junit.out}" |
| 288 | includes="${gwt.junit.testcase.web.includes}" |
| 289 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 290 | <gwt.junit test.name="test.draft.selenium" |
| 291 | test.args='${test.draft.selenium.args} -draftCompile -prod -out www -standardsMode -runStyle "Selenium:${gwt.hosts.web.selenium}"' |
| 292 | test.out="${junit.out}/draft-selenium" |
| 293 | test.cases="test.draft.selenium.tests" > |
| 294 | <extraclasspaths> |
| 295 | <path refid="test.extraclasspath" /> |
| 296 | </extraclasspaths> |
| 297 | </gwt.junit> |
| 298 | </target> |
| 299 | |
| 300 | <target name="test.emma.htmlunit" |
| 301 | depends="compile, compile.tests" |
| 302 | description="Run emma tests with HtmlUnit" |
| 303 | unless="test.emma.htmlunit.disable"> |
| 304 | <fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}" |
| 305 | includes="${gwt.junit.testcase.dev.includes}" |
| 306 | excludes="${gwt.junit.testcase.dev.excludes}" /> |
| 307 | <gwt.junit test.name="test.emma.htmlunit" |
| 308 | test.args="${test.args} -standardsMode " |
| 309 | test.out="${junit.out}/emma-htmlunit" |
| 310 | test.cases="test.emma.htmlunit.tests" > |
| 311 | <extraclasspaths> |
| 312 | <path refid="test.extraclasspath" /> |
| 313 | <pathelement location="${gwt.tools.redist}/emma/emma.jar" /> |
| 314 | </extraclasspaths> |
| 315 | </gwt.junit> |
| 316 | </target> |
| 317 | |
| 318 | <target name="test.dev.htmlunit" |
| 319 | depends="compile, compile.tests" |
| 320 | description="Run dev-mode tests with HtmlUnit." |
| 321 | unless="test.dev.htmlunit.disable"> |
| 322 | <fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}" |
| 323 | includes="${gwt.junit.testcase.dev.includes}" |
| 324 | excludes="${gwt.junit.testcase.dev.excludes}" /> |
| 325 | <gwt.junit test.name="test.dev.htmlunit" |
| 326 | test.args="${test.args} -standardsMode " |
| 327 | test.out="${junit.out}/dev-htmlunit" |
| 328 | test.cases="test.dev.htmlunit.tests" > |
| 329 | <extraclasspaths> |
| 330 | <path refid="test.extraclasspath" /> |
| 331 | </extraclasspaths> |
| 332 | </gwt.junit> |
| 333 | </target> |
| 334 | |
| 335 | <target name="test.hosted.emma" depends="test.emma"> |
| 336 | <echo message="DEPRECATED: test.hosted.emma has been renamed test.emma"/> |
| 337 | </target> |
| 338 | |
| 339 | <target name="test.hosted" depends="test.dev"> |
| 340 | <echo message="DEPRECATED: test.hosted has been renamed test.dev"/> |
| 341 | </target> |
| 342 | |
| 343 | <target name="test.noserver" |
| 344 | depends="compile, compile.tests" |
| 345 | description="Run noserver tests for this project." |
| 346 | unless="test.noserver.disable"> |
| 347 | <fileset id="test.noserver.tests" dir="${javac.junit.out}" |
| 348 | includes="${gwt.junit.testcase.noserver.includes}" |
| 349 | excludes="${gwt.junit.testcase.noserver.excludes}" /> |
| 350 | <gwt.junit test.name="test.noserver" |
| 351 | test.args="${test.args} -prod -standardsMode -noserver" |
| 352 | test.out="${junit.out}/noserver" test.cases="test.noserver.tests"> |
| 353 | <extraclasspaths> |
| 354 | <path refid="test.extraclasspath" /> |
| 355 | </extraclasspaths> |
| 356 | </gwt.junit> |
| 357 | </target> |
| 358 | |
| 359 | <target name="test.web.htmlunit" |
| 360 | depends="compile, compile.tests" |
| 361 | description="Run web-mode tests with HtmlUnit." |
| 362 | unless="test.web.htmlunit.disable"> |
| 363 | <fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}" |
| 364 | includes="${gwt.junit.testcase.web.includes}" |
| 365 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 366 | <gwt.junit test.name="test.web.htmlunit" |
| 367 | test.args="${test.args} -out www -prod -standardsMode" |
| 368 | test.out="${junit.out}/web-htmlunit" |
| 369 | test.cases="test.web.htmlunit.tests"> |
| 370 | <extraclasspaths> |
| 371 | <path refid="test.extraclasspath" /> |
| 372 | </extraclasspaths> |
| 373 | </gwt.junit> |
| 374 | </target> |
| 375 | |
| 376 | <target name="test.nometa.htmlunit" |
| 377 | depends="compile, compile.tests" |
| 378 | description="Run -XdisableClassMetadata tests with HtmlUnit." |
| 379 | unless="test.nometa.htmlunit.disable"> |
| 380 | <fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}" |
| 381 | includes="${gwt.junit.testcase.web.includes}" |
| 382 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 383 | <gwt.junit test.name="test.nometa.htmlunit" |
| 384 | test.args="${test.args} -XdisableClassMetadata -out www -prod -standardsMode" |
| 385 | test.out="${junit.out}/nometa-htmlunit" |
| 386 | test.cases="test.nometa.htmlunit.tests" > |
| 387 | <extraclasspaths> |
| 388 | <path refid="test.extraclasspath" /> |
| 389 | </extraclasspaths> |
| 390 | </gwt.junit> |
| 391 | </target> |
| 392 | |
| 393 | <target name="test.draft.htmlunit" |
| 394 | depends="compile, compile.tests" |
| 395 | description="Run draft compiled HtmlUnit tests (no batching on purpose)" |
| 396 | unless="test.draft.htmlunit.disable"> |
| 397 | <fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}" |
| 398 | includes="${gwt.junit.testcase.web.includes}" |
| 399 | excludes="${gwt.junit.testcase.web.excludes}" /> |
| 400 | <gwt.junit test.name="test.draft.htmlunit" |
| 401 | test.args="${test.args} -draftCompile -out www -prod -standardsMode" |
| 402 | test.out="${junit.out}/draft-htmlunit" |
| 403 | test.cases="test.draft.htmlunit.tests" > |
| 404 | <extraclasspaths> |
| 405 | <path refid="test.extraclasspath" /> |
| 406 | </extraclasspaths> |
| 407 | </gwt.junit> |
| 408 | </target> |
| 409 | |
| 410 | <target name="test" |
| 411 | depends="compile, compile.tests" |
| 412 | description="Run all tests for this project."> |
| 413 | <!-- Prevent compilation for every target. --> |
| 414 | <property name="compile.complete" value="true"/> |
| 415 | <property name="compile.tests.complete" value="true"/> |
| 416 | |
| 417 | <property.ensure name="distro.built" location="${gwt.dev.staging.jar}" |
| 418 | message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." /> |
| 419 | <limit failonerror="true" hours="${test.timeout}"> |
| 420 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 421 | threadCount="${gwt.threadCount}"> |
| 422 | <!-- |
| 423 | The remote targets must be run sequentially or BrowserManager will queue |
| 424 | requests, which will cause some tests to timeout while waiting. |
| 425 | --> |
| 426 | <sequential> |
| 427 | <antcall target="test.dev.remote"/> |
| 428 | <antcall target="test.emma.remote"/> |
| 429 | <antcall target="test.web.remote"/> |
| 430 | <antcall target="test.draft.remote"/> |
| 431 | <antcall target="test.nometa.remote"/> |
| 432 | </sequential> |
| 433 | <antcall target="test.dev.selenium"/> |
| 434 | <antcall target="test.emma.selenium"/> |
| 435 | <antcall target="test.web.selenium"/> |
| 436 | <antcall target="test.draft.selenium"/> |
| 437 | <antcall target="test.nometa.selenium"/> |
| 438 | <antcall target="test.noserver"/> |
| 439 | <antcall target="test.dev.htmlunit"/> |
| 440 | <antcall target="test.emma.htmlunit"/> |
| 441 | <antcall target="test.web.htmlunit"/> |
| 442 | <antcall target="test.draft.htmlunit"/> |
| 443 | <antcall target="test.nometa.htmlunit"/> |
| 444 | </parallel> |
| 445 | </limit> |
| 446 | </target> |
| 447 | |
| 448 | <target name="test.htmlunit" |
| 449 | depends="compile, compile.tests" |
| 450 | description="Run all HtmlUnit tests"> |
| 451 | <!-- Prevent compilation for every target. --> |
| 452 | <property name="compile.complete" value="true"/> |
| 453 | <property name="compile.tests.complete" value="true"/> |
| 454 | |
| 455 | <property.ensure name="distro.built" location="${gwt.dev.staging.jar}" |
| 456 | message="GWT must be built before performing any tests. This can be fixed by running ant in the ${gwt.root} directory." /> |
| 457 | <limit failonerror="true" hours="${test.timeout}"> |
| 458 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 459 | threadCount="${gwt.threadCount}"> |
| 460 | <antcall target="test.dev.htmlunit"/> |
| 461 | <antcall target="test.emma.htmlunit"/> |
| 462 | <antcall target="test.web.htmlunit"/> |
| 463 | <antcall target="test.draft.htmlunit"/> |
| 464 | <antcall target="test.nometa.htmlunit"/> |
| 465 | <antcall target="test.noserver"/> |
| 466 | </parallel> |
| 467 | </limit> |
| 468 | </target> |
| 469 | |
| 470 | <target name="test.dev" |
| 471 | depends="compile, compile.tests" |
| 472 | description="Run dev-mode tests for this project."> |
| 473 | <!-- Prevent compilation for every target. --> |
| 474 | <property name="compile.complete" value="true"/> |
| 475 | <property name="compile.tests.complete" value="true"/> |
| 476 | |
| 477 | <limit failonerror="true" hours="${test.timeout}"> |
| 478 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 479 | threadCount="${gwt.threadCount}"> |
| 480 | <antcall target="test.dev.htmlunit"/> |
| 481 | <!-- no-op unless gwt.hosts.dev.remote is defined --> |
| 482 | <antcall target="test.dev.remote"/> |
| 483 | <!-- no-op unless gwt.hosts.dev.selenium is defined --> |
| 484 | <antcall target="test.dev.selenium"/> |
| 485 | </parallel> |
| 486 | </limit> |
| 487 | </target> |
| 488 | |
| 489 | <target name="test.web" |
| 490 | depends="compile, compile.tests" |
| 491 | description="Run web-mode tests for this project."> |
| 492 | <!-- Prevent compilation for every target. --> |
| 493 | <property name="compile.complete" value="true"/> |
| 494 | <property name="compile.tests.complete" value="true"/> |
| 495 | |
| 496 | <limit failonerror="true" hours="${test.timeout}"> |
| 497 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 498 | threadCount="${gwt.threadCount}"> |
| 499 | <antcall target="test.web.htmlunit"/> |
| 500 | <!-- no-op unless gwt.hosts.web.remote is defined --> |
| 501 | <antcall target="test.web.remote"/> |
| 502 | <!-- no-op unless gwt.hosts.web.selenium is defined --> |
| 503 | <antcall target="test.web.selenium"/> |
| 504 | </parallel> |
| 505 | </limit> |
| 506 | </target> |
| 507 | |
| 508 | <target name="test.emma" |
| 509 | depends="compile, compile.tests" |
| 510 | description="Run emma tests for this project."> |
| 511 | <!-- Prevent compilation for every target. --> |
| 512 | <property name="compile.complete" value="true"/> |
| 513 | <property name="compile.tests.complete" value="true"/> |
| 514 | |
| 515 | <limit failonerror="true" hours="${test.timeout}"> |
| 516 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 517 | threadCount="${gwt.threadCount}"> |
| 518 | <antcall target="test.emma.htmlunit"/> |
| 519 | <!-- no-op unless gwt.hosts.dev.remote is defined --> |
| 520 | <antcall target="test.emma.remote"/> |
| 521 | <!-- no-op unless gwt.hosts.dev.selenium is defined --> |
| 522 | <antcall target="test.emma.selenium"/> |
| 523 | </parallel> |
| 524 | </limit> |
| 525 | </target> |
| 526 | |
| 527 | <target name="test.draft" |
| 528 | depends="compile, compile.tests" |
| 529 | description="Run draft compiled tests for this project."> |
| 530 | <!-- Prevent compilation for every target. --> |
| 531 | <property name="compile.complete" value="true"/> |
| 532 | <property name="compile.tests.complete" value="true"/> |
| 533 | |
| 534 | <limit failonerror="true" hours="${test.timeout}"> |
| 535 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 536 | threadCount="${gwt.threadCount}"> |
| 537 | <antcall target="test.draft.htmlunit"/> |
| 538 | <!-- no-op unless gwt.hosts.web.remote is defined --> |
| 539 | <antcall target="test.draft.remote"/> |
| 540 | <!-- no-op unless gwt.hosts.web.selenium is defined --> |
| 541 | <antcall target="test.draft.selenium"/> |
| 542 | </parallel> |
| 543 | </limit> |
| 544 | </target> |
| 545 | |
| 546 | <target name="test.nometa" |
| 547 | depends="compile, compile.tests" |
| 548 | description="Run -XdisableClassMetadata tests for this project."> |
| 549 | <!-- Prevent compilation for every target. --> |
| 550 | <property name="compile.complete" value="true"/> |
| 551 | <property name="compile.tests.complete" value="true"/> |
| 552 | |
| 553 | <limit failonerror="true" hours="${test.timeout}"> |
| 554 | <parallel threadsPerProcessor="${gwt.threadsPerProcessor}" |
| 555 | threadCount="${gwt.threadCount}"> |
| 556 | <antcall target="test.web.htmlunit"/> |
| 557 | <!-- no-op unless gwt.hosts.web.remote is defined --> |
| 558 | <antcall target="test.nometa.remote"/> |
| 559 | <!-- no-op unless gwt.hosts.web.selenium is defined --> |
| 560 | <antcall target="test.nometa.selenium"/> |
| 561 | </parallel> |
| 562 | </limit> |
| 563 | </target> |
| 564 | |
| 565 | <!-- |
| 566 | Merges coverage data for the entire project |
| 567 | --> |
| 568 | <target name="emma.merge"> |
| 569 | <delete dir="${emma.merged.out}" /> |
| 570 | <mkdir dir="${emma.merged.out}" /> |
| 571 | <emma> |
| 572 | <merge outfile="${emma.merged.out}/merged.emma" > |
| 573 | <fileset dir="${junit.out}" > |
| 574 | <include name="**/*.emma" /> |
| 575 | <exclude name="${emma.merged.out}/merged.emma" /> |
| 576 | </fileset> |
| 577 | </merge> |
| 578 | </emma> |
| 579 | <emma> |
| 580 | <report sourcepath="${project.classpath.src}"> |
| 581 | <fileset file="${javac.emma.out}/metadata.emma" /> |
| 582 | <fileset file="${emma.merged.out}/merged.emma" /> |
| 583 | <txt outfile="${emma.merged.out}/coverage.txt" /> |
| 584 | <html outfile="${emma.merged.out}/coverage.html" /> |
| 585 | <xml outfile="${emma.merged.out}/coverage.xml" /> |
| 586 | </report> |
| 587 | </emma> |
| 588 | </target> |
| 589 | |
| 590 | <target name="clean" |
| 591 | description="Cleans this project's intermediate and output files"> |
| 592 | <delete dir="${project.build}" /> |
| 593 | <delete file="${project.lib}" /> |
| 594 | </target> |
| 595 | |
| 596 | <target name="presubmit" depends="test, checkstyle" |
| 597 | description="runs the gwt api checker, user checkstyle, and user tests"> |
| 598 | <gwt.ant dir=".." target="apicheck-nobuild"/> |
| 599 | </target> |
| 600 | |
amitmanjhi@google.com | a4d9144 | 2010-03-04 22:11:39 +0000 | [diff] [blame] | 601 | </project> |