Revision: 8058
Author: [email protected]
Date: Wed May  5 17:02:07 2010
Log: Re-enable user ant tests for HtmlUnit.

This patch makes the follow sorts of ant rules do tests with HtmlUnit:

ant -f user/build.xml test.web
ant -f user/build.xml test.dev

http://gwt-code-reviews.appspot.com/475801/show
Review by: jlabanca, amitmanjhi, fabbott

http://code.google.com/p/google-web-toolkit/source/detail?r=8058

Modified:
 /branches/2.1/user/build.xml

=======================================
--- /branches/2.1/user/build.xml        Fri Apr 23 06:39:33 2010
+++ /branches/2.1/user/build.xml        Wed May  5 17:02:07 2010
@@ -35,12 +35,22 @@
   <property name="test.args.web.remote" value="${test.args}" />
   <property name="test.args.web.selenium" value="${test.args}" />

+  <!--
+ Only IFrameLinker actually supports -noserver mode; run the other linker
+    tests if and when they are supported
+  -->
+ <property name="gwt.junit.testcase.noserver.includes" value="**/IFrameLinkerTest.class" />
+  <property name="gwt.junit.testcase.noserver.excludes" value="" />
+
   <!--
     Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the
     value is "dollar") or Foo_Inner_fr.properties (for "bar")
    -->
   <property name="gwt.i18n.test.InnerClassChar" value="dollar"/>

+  <!-- Platform shouldn't matter here, just picking one -->
+ <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
+
   <!--
     Classpaths added for test cases
   -->
@@ -52,11 +62,9 @@
     <pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/>
<pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/>
     <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
+    <pathelement location="${gwt.dev.jar}" />
   </path>

-  <!-- Platform shouldn't matter here, just picking one -->
- <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev.jar" />
-
   <target name="compile" description="Compile all class files"
       unless="compile.complete">
     <mkdir dir="${javac.out}" />
@@ -97,15 +105,9 @@
         destdir="${javac.junit.out}">
       <classpath>
         <pathelement location="${javac.out}" />
-        <pathelement location="${gwt.build}/out/dev/bin-test" />
- <pathelement location="${gwt.tools.lib}/tomcat/servlet-api-2.5.jar" />
         <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" />
<pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" />
-       <pathelement location="${gwt.tools.lib}/cglib/cglib-2.2.jar"/>
-       <pathelement location="${gwt.tools.lib}/easymock/easymock.jar"/>
- <pathelement location="${gwt.tools.lib}/easymock/easymockclassextension.jar"/>
-       <pathelement location="${gwt.tools.lib}/objectweb/asm-3.1.jar"/>
-        <pathelement location="${gwt.dev.jar}" />
+        <path refid="test.extraclasspath" />
       </classpath>
     </gwt.javac>
   </target>
@@ -387,6 +389,22 @@
     <echo message="DEPRECATED: test.hosted has been renamed test.dev"/>
   </target>

+  <target name="test.noserver"
+      depends="compile, compile.tests"
+      description="Run noserver tests for this project."
+      unless="test.noserver.disable">
+    <fileset id="test.noserver.tests" dir="${javac.junit.out}"
+        includes="${gwt.junit.testcase.noserver.includes}"
+        excludes="${gwt.junit.testcase.noserver.excludes}" />
+    <gwt.junit test.name="test.noserver"
+        test.args="${test.args} -prod -standardsMode -noserver"
+        test.out="${junit.out}/noserver" test.cases="test.noserver.tests">
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
   <target name="test.web.htmlunit"
       depends="compile, compile.tests"
       description="Run web-mode tests with HtmlUnit."
@@ -466,6 +484,7 @@
       <antcall target="test.web.selenium"/>
       <antcall target="test.draft.selenium"/>
       <antcall target="test.nometa.selenium"/>
+      <antcall target="test.noserver"/>
       <antcall target="test.dev.htmlunit"/>
       <antcall target="test.emma.htmlunit"/>
       <antcall target="test.web.htmlunit"/>
@@ -492,6 +511,7 @@
       <antcall target="test.web.htmlunit"/>
       <antcall target="test.draft.htmlunit"/>
       <antcall target="test.nometa.htmlunit"/>
+      <antcall target="test.noserver"/>
     </parallel>
     </limit>
   </target>
@@ -506,9 +526,7 @@
     <limit failonerror="true" hours="${test.timeout}">
     <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
         threadCount="${gwt.threadCount}">
-      <!-- disable HtmlUnit until it is reliable
       <antcall target="test.dev.htmlunit"/>
-      -->
       <!-- no-op unless gwt.hosts.dev.remote is defined -->
       <antcall target="test.dev.remote"/>
       <!-- no-op unless gwt.hosts.dev.selenium is defined -->
@@ -527,9 +545,7 @@
     <limit failonerror="true" hours="${test.timeout}">
     <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
         threadCount="${gwt.threadCount}">
-      <!-- disable HtmlUnit until it is reliable
       <antcall target="test.web.htmlunit"/>
-      -->
       <!-- no-op unless gwt.hosts.web.remote is defined -->
       <antcall target="test.web.remote"/>
       <!-- no-op unless gwt.hosts.web.selenium is defined -->
@@ -548,9 +564,7 @@
     <limit failonerror="true" hours="${test.timeout}">
     <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
         threadCount="${gwt.threadCount}">
-      <!-- disable HtmlUnit until it is reliable
       <antcall target="test.emma.htmlunit"/>
-      -->
       <!-- no-op unless gwt.hosts.dev.remote is defined -->
       <antcall target="test.emma.remote"/>
       <!-- no-op unless gwt.hosts.dev.selenium is defined -->
@@ -569,9 +583,7 @@
     <limit failonerror="true" hours="${test.timeout}">
     <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
         threadCount="${gwt.threadCount}">
-      <!-- disable HtmlUnit until it is reliable
       <antcall target="test.draft.htmlunit"/>
-      -->
       <!-- no-op unless gwt.hosts.web.remote is defined -->
       <antcall target="test.draft.remote"/>
       <!-- no-op unless gwt.hosts.web.selenium is defined -->
@@ -590,9 +602,7 @@
     <limit failonerror="true" hours="${test.timeout}">
     <parallel threadsPerProcessor="${gwt.threadsPerProcessor}"
         threadCount="${gwt.threadCount}">
-      <!-- disable HtmlUnit until it is reliable
       <antcall target="test.web.htmlunit"/>
-      -->
       <!-- no-op unless gwt.hosts.web.remote is defined -->
       <antcall target="test.nometa.remote"/>
       <!-- no-op unless gwt.hosts.web.selenium is defined -->

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to