Revision: 6369
Author: j...@google.com
Date: Tue Oct 13 23:49:20 2009
Log: Rearrange ant test targets.

The continuous build systems need to have gwt.hosts.dev.remote and
gwt.hosts.dev.selenium set to those hosts which have the devmode plugin
installed for devmode tests to be run at all, until HtmlUnit is made  
reliable
enough to enable by default.

Patch by: jat
Review by: amitmanjhi, jlabanca (TBR)

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

Modified:
  /changes/jat/noswt-merge6200/user/build.xml

=======================================
--- /changes/jat/noswt-merge6200/user/build.xml Tue Sep 29 11:05:28 2009
+++ /changes/jat/noswt-merge6200/user/build.xml Tue Oct 13 23:49:20 2009
@@ -3,6 +3,14 @@
    <property name="project.tail" value="user" />
    <property name="test.args" value="" />

+  <!-- support old variables names -->
+  <condition property="gwt.hosts.web.remote"  
value="${gwt.remote.browsers}">
+    <isset property="gwt.remote.browsers" />
+  </condition>
+  <condition property="gwt.hosts.web.selenium"  
value="${gwt.selenium.hosts}">
+    <isset property="gwt.selenium.hosts" />
+  </condition>
+
    <!-- BrowserManagerServer_Stub compiled using rmic, which doesn't  
generate full source code -->
    <property name="emma.filter.exclude" value="*BrowserManagerServer_Stub*"  
/>

@@ -100,39 +108,137 @@
      </gwt.checkstyle>
    </target>

-  <target name="remoteweb-test" depends="test.remoteweb">
-    <echo message="DEPRECATED: remoteweb-test has been renamed  
test.remoteweb"/>
+  <target name="remoteweb-test" depends="test.web.remote">
+    <echo message="DEPRECATED: remoteweb-test has been renamed  
test.web.remote"/>
    </target>

-  <target name="test.remoteweb" description="Run a remoteweb test at the  
given host and path" if="gwt.remote.browsers">
-    <echo message="Performing remote browser testing at  
${gwt.remote.browsers}" />
-    <property name="test.remoteweb.args" value="${test.args}" />
-    <fileset id="test.remoteweb.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
-    <gwt.junit test.args="${test.args} -out www -runStyle  
RemoteWeb:${gwt.remote.browsers} -batch module -precompile parallel"  
test.out="${junit.out}/remoteweb" test.cases="test.remoteweb.tests" >
+  <target name="test.remoteweb" depends="test.web.remote">
+    <echo message="DEPRECATED: test.remoteweb has been renamed  
test.web.remote"/>
+  </target>
+
+  <target name="test.web.remote" description="Run a remoteweb test at the  
given host and path" if="gwt.hosts.web.remote">
+    <echo message="Performing web remote testing at  
${gwt.hosts.web.remote}" />
+    <property name="test.web.remote.args" value="${test.args}" />
+    <fileset id="test.web.remote.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -web -out www -runStyle  
RemoteWeb:${gwt.hosts.web.remote} -batch module -precompile parallel"  
test.out="${junit.out}/web-remote" test.cases="test.web.remote.tests" >
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
      </gwt.junit>
    </target>

-  <target name="selenium-test" depends="test.selenium">
+  <target name="test.dev.remote" description="Run a remoteweb test at the  
given host and path" if="gwt.hosts.dev.remote">
+    <echo message="Performing dev-mode remote testing at  
${gwt.remote.browsers}" />
+    <property name="test.dev.remote.args" value="${test.args}" />
+    <fileset id="test.dev.remote.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.includes}"  
excludes="${gwt.junit.testcase.hosted.excludes}" />
+    <gwt.junit test.args="${test.args} -out www -runStyle  
RemoteWeb:${gwt.hosts.dev.remote} -batch module -precompile parallel"  
test.out="${junit.out}/dev-remote" test.cases="test.dev.remote.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.emma.remote" description="Run a remoteweb test at the  
given host and path" if="gwt.hosts.dev.remote">
+    <echo message="Performing emma remote testing at  
${gwt.hosts.dev.remote}" />
+    <property name="test.emma.remote.args" value="${test.args}" />
+    <fileset id="test.emma.remote.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.emma.includes}"  
excludes="${gwt.junit.testcase.hosted.emma.excludes}" />
+    <gwt.junit test.args="${test.args} -out www -runStyle  
RemoteWeb:${gwt.hosts.dev.remote} -batch module -precompile parallel"  
test.out="${junit.out}/emma-remote" test.cases="test.emma.remote.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+        <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.emma.selenium" description="Run a remoteweb test at  
the given host and path" if="gwt.hosts.dev.selenium">
+    <echo message="Performing emma selenium testing at  
${gwt.hosts.dev.selenium}" />
+    <property name="test.emma.remote.args" value="${test.args}" />
+    <fileset id="test.emma.selenium.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.emma.includes}"  
excludes="${gwt.junit.testcase.hosted.emma.excludes}" />
+    <gwt.junit test.args="${test.args} -out www -runStyle  
Selenium:${gwt.hosts.dev.selenium} -batch module -precompile parallel"  
test.out="${junit.out}/emma-selenium" test.cases="test.emma.selenium.tests"  
>
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+        <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.draft.remote" description="Run a remoteweb test at  
the given host and path" if="gwt.hosts.web.remote">
+    <echo message="Performing draft remote testing at  
${gwt.hosts.web.remote}" />
+    <property name="test.draft.remote.args" value="${test.args}" />
+    <fileset id="test.draft.remote.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -draft -web -out www -runStyle  
RemoteWeb:${gwt.hosts.web.remote} -batch module -precompile parallel"  
test.out="${junit.out}/draft-remote" test.cases="test.draft.remote.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.nometa.remote" description="Run a remoteweb test at  
the given host and path" if="gwt.hosts.web.remote">
+    <echo message="Performing nometa remote testing at  
${gwt.hosts.web.remote}" />
+    <property name="test.nometa.remote.args" value="${test.args}" />
+    <fileset id="test.web.remote.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -XdisableClassMetadata -out www  
-runStyle RemoteWeb:${gwt.hosts.web.remote} -batch module -precompile  
parallel" test.out="${junit.out}/nometa-remote"  
test.cases="test.remoteweb.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="selenium-test" depends="test.web.selenium">
      <echo message="DEPRECATED: selenium-test has been renamed  
test.selenium"/>
    </target>

-  <target name="test.selenium" description="Run a remote test using  
Selenium RC test at the given host and path" if="gwt.selenium.hosts">
-    <echo message="Performing remote browser testing using Selenium RC at  
${gwt.selenium.hosts}" />
+  <target name="test.selenium" depends="test.web.selenium">
+    <echo message="DEPRECATED: test.selenium has been renamed  
test.web.selenium"/>
+  </target>
+
+  <target name="test.web.selenium" description="Run a remote test using  
Selenium RC test at the given host and path" if="gwt.hosts.web.selenium">
+    <echo message="Performing web testing using Selenium RC at  
${gwt.hosts.web.selenium}" />
      <property name="test.selenium.args" value="${test.args}" />
-    <fileset id="test.selenium.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
-    <gwt.junit test.args="${test.args} -out www -runStyle  
Selenium:${gwt.selenium.hosts} -batch module -precompile parallel"  
test.out="${junit.out}/selenium" test.cases="test.selenium.tests" >
+    <fileset id="test.web.selenium.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -web -out www -runStyle  
Selenium:${gwt.hosts.web.selenium} -batch module -precompile parallel"  
test.out="${junit.out}/web-selenium" test.cases="test.web.selenium.tests" >
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
      </gwt.junit>
    </target>

-  <target name="test.hosted.emma" depends="compile, compile.tests"  
description="Run all hosted-mode tests in emma mode.">
-    <fileset id="test.hosted.emma.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.emma.includes}"  
excludes="${gwt.junit.testcase.hosted.emma.excludes}" />
-    <gwt.junit test.args="${test.args}"  
test.out="${junit.out}/${build.host.platform}-hosted-mode-emma"  
test.cases="test.hosted.emma.tests" >
+  <target name="test.dev.selenium" description="Run a remote test using  
Selenium RC test at the given host and path" if="gwt.hosts.dev.selenium">
+    <echo message="Performing dev-mode testing using Selenium RC at  
${gwt.hosts.dev.selenium}" />
+    <property name="test.selenium.args" value="${test.args}" />
+    <fileset id="test.dev.selenium.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.includes}"  
excludes="${gwt.junit.testcase.hosted.excludes}" />
+    <gwt.junit test.args="${test.args} -out www -runStyle  
Selenium:${gwt.hosts.dev.selenium} -batch module -precompile parallel"  
test.out="${junit.out}/dev-selenium" test.cases="test.selenium.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.nometa.selenium" description="Run a remote test using  
Selenium RC test at the given host and path" if="gwt.hosts.web.selenium">
+    <echo message="Performing nometa testing using Selenium RC at  
${gwt.hosts.web.selenium}" />
+    <property name="test.selenium.args" value="${test.args}" />
+    <fileset id="test.nometa.selenium.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -XdisableClassMetadata -web -out  
www -runStyle Selenium:${gwt.hosts.web.selenium} -batch module -precompile  
parallel" test.out="${junit.out}/nometa-selenium"  
test.cases="test.nometa.selenium.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.draft.selenium" description="Run a remote test using  
Selenium RC test at the given host and path" if="gwt.hosts.web.selenium">
+    <echo message="Performing draft testing using Selenium RC at  
${gwt.hosts.web.selenium}" />
+    <property name="test.selenium.args" value="${test.args}" />
+    <fileset id="test.draft.selenium.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -draft -web -out www -runStyle  
Selenium:${gwt.hosts.web.selenium} -batch module -precompile parallel"  
test.out="${junit.out}/draft-selenium"  
test.cases="test.draft.selenium.tests" >
+      <extraclasspaths>
+        <path refid="test.extraclasspath" />
+      </extraclasspaths>
+    </gwt.junit>
+  </target>
+
+  <target name="test.emma.htmlunit" depends="compile, compile.tests"  
description="Run all hosted-mode tests in emma mode.">
+    <fileset id="test.emma.htmlunit.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.emma.includes}"  
excludes="${gwt.junit.testcase.hosted.emma.excludes}" />
+    <gwt.junit test.args="${test.args}"  
test.out="${junit.out}/emma-htmlunit" test.cases="test.emma.htmlunit.tests"  
>
        <extraclasspaths>
          <path refid="test.extraclasspath" />
          <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
@@ -140,11 +246,11 @@
      </gwt.junit>
    </target>

-  <target name="test.hosted" depends="compile, compile.tests,  
-test.hosted.includes" description="Run only hosted-mode tests for this  
project.">
+  <target name="test.dev.htmlunit" depends="compile, compile.tests,  
-test.hosted.includes" description="Run only hosted-mode tests for this  
project.">
      <property name="gwt.junit.testcase.hosted.includes"  
value="${gwt.junit.testcase.includes}" />
      <property name="gwt.junit.testcase.hosted.excludes"  
value="${gwt.junit.testcase.excludes}" />
-    <fileset id="test.hosted.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.includes}"  
excludes="${gwt.junit.testcase.hosted.excludes}" />
-    <gwt.junit test.args="${test.args}"  
test.out="${junit.out}/${build.host.platform}-hosted-mode"  
test.cases="test.hosted.tests" >
+    <fileset id="test.dev.htmlunit.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.hosted.includes}"  
excludes="${gwt.junit.testcase.hosted.excludes}" />
+    <gwt.junit test.args="${test.args}"  
test.out="${junit.out}/dev-htmlunit" test.cases="test.dev.htmlunit.tests" >
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
@@ -158,34 +264,34 @@

    <target name="test.noserver" depends="compile, compile.tests"  
description="Run noserver hosted-mode tests for this project.">
      <fileset id="test.noserver.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.noserver.includes}"  
excludes="${gwt.junit.testcase.noserver.excludes}" />
-    <gwt.junit test.args="${test.args} -web -noserver"  
test.out="${junit.out}/${build.host.platform}-noserver-mode"  
test.cases="test.noserver.tests">
+    <gwt.junit test.args="${test.args} -web -noserver"  
test.out="${junit.out}/noserver" test.cases="test.noserver.tests">
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
      </gwt.junit>
    </target>

-  <target name="test.web" depends="compile, compile.tests"  
description="Run only web-mode tests for this project.">
-    <fileset id="test.web.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
-    <gwt.junit test.args="${test.args} -out www -web"  
test.out="${junit.out}/${build.host.platform}-web-mode"  
test.cases="test.web.tests">
+  <target name="test.web.htmlunit" depends="compile, compile.tests"  
description="Run only web-mode tests for this project.">
+    <fileset id="test.web.htmlunit.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -out www -web"  
test.out="${junit.out}/web-htmlunit" test.cases="test.web.htmlunit.tests">
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
      </gwt.junit>
    </target>

-  <target name="test.web.disableClassMetadata" depends="compile,  
compile.tests" description="Run only web-mode tests for this project.">
-    <fileset id="test.web.disableClassMetadata.tests"  
dir="${javac.junit.out}" includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
-    <gwt.junit test.args="${test.args} -XdisableClassMetadata -out www  
-web"  
test.out="${junit.out}/${build.host.platform}-web-mode-disableClassMetadata"  
test.cases="test.web.disableClassMetadata.tests" >
+  <target name="test.nometa.htmlunit" depends="compile, compile.tests"  
description="Run only web-mode tests for this project.">
+    <fileset id="test.nometa.htmlunit.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -XdisableClassMetadata -out www  
-web" test.out="${junit.out}/nometa-htmlunit"  
test.cases="test.nometa.htmlunit.tests" >
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
      </gwt.junit>
    </target>

-  <target name="test.web.draft" depends="compile, compile.tests"  
description="Run only web-mode tests for this project, not batching tests  
on purpose.">
-    <fileset id="test.web.draft.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
-    <gwt.junit test.args="${test.args} -draftCompile -out www -web"  
test.out="${junit.out}/${build.host.platform}-web-mode-draft"  
test.cases="test.web.draft.tests" >
+  <target name="test.draft.htmlunit" depends="compile, compile.tests"  
description="Run only web-mode tests for this project, not batching tests  
on purpose.">
+    <fileset id="test.draft.htmlunit.tests" dir="${javac.junit.out}"  
includes="${gwt.junit.testcase.web.includes}"  
excludes="${gwt.junit.testcase.web.excludes}" />
+    <gwt.junit test.args="${test.args} -draftCompile -out www -web"  
test.out="${junit.out}/draft-htmlunit"  
test.cases="test.draft.htmlunit.tests" >
        <extraclasspaths>
          <path refid="test.extraclasspath" />
        </extraclasspaths>
@@ -194,24 +300,84 @@

    <target name="test" depends="compile, compile.tests" description="Run  
hosted-mode, web-mode, remoteweb, and selenium tests for this project.">
      <property.ensure name="distro.built" location="${gwt.dev.staging.jar}"  
message="GWT must be built before performing any tests.  This can be fixed  
by running ant in the ${gwt.root} directory." />
-    <property name="emma.compiled" value="true" />
-
-    <!--
-      Run hosted and web mode tests for the platform on which this build
-      is executing
-    -->
      <limit failonerror="true" hours="${test.timeout}">
      <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
-      <!-- selenium-test is a no-op unless gwt.selenium.hosts is defined  
-->
-      <antcall target="test.selenium"/>
-      <!-- remoteweb-test is a no-op unless gwt.remote.browsers is defined  
-->
-      <antcall target="test.remoteweb"/>
-      <antcall target="test.hosted"/>
-      <antcall target="test.hosted.emma"/>
-      <antcall target="test.noserver"/>
+      <antcall target="test.dev"/>
+      <antcall target="test.emma"/>
        <antcall target="test.web"/>
-      <antcall target="test.web.disableClassMetadata"/>
-      <antcall target="test.web.draft"/>
+      <antcall target="test.draft"/>
+      <antcall target="test.nometa"/>
+      <antcall target="test.noserver"/>
+    </parallel>
+    </limit>
+  </target>
+
+  <target name="test.dev" depends="compile, compile.tests"  
description="Run dev-mode tests for this project.">
+    <limit failonerror="true" hours="${test.timeout}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+      <!-- 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 -->
+      <antcall target="test.dev.selenium"/>
+    </parallel>
+    </limit>
+  </target>
+
+  <target name="test.web" depends="compile, compile.tests"  
description="Run dev-mode tests for this project.">
+    <limit failonerror="true" hours="${test.timeout}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+      <!-- 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 -->
+      <antcall target="test.web.selenium"/>
+    </parallel>
+    </limit>
+  </target>
+
+  <target name="test.emma" depends="compile, compile.tests"  
description="Run dev-mode tests for this project.">
+    <limit failonerror="true" hours="${test.timeout}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+      <!-- 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 -->
+      <antcall target="test.emma.selenium"/>
+    </parallel>
+    </limit>
+  </target>
+
+  <target name="test.draft" depends="compile, compile.tests"  
description="Run dev-mode tests for this project.">
+    <limit failonerror="true" hours="${test.timeout}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+      <!-- 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 -->
+      <antcall target="test.draft.selenium"/>
+    </parallel>
+    </limit>
+  </target>
+
+  <target name="test.nometa" depends="compile, compile.tests"  
description="Run dev-mode tests for this project.">
+    <limit failonerror="true" hours="${test.timeout}">
+    <parallel threadsPerProcessor="${gwt.threadsPerProcessor}">
+      <!-- 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 -->
+      <antcall target="test.nometa.selenium"/>
      </parallel>
      </limit>
    </target>

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

Reply via email to