The following patch allows a user to specify which GWTTestCases under trunk/user/test should be executed by "ant test". The user can specify a comma delimited list of filters via the gwt.junit.testcase.includes property. If this property is not specified the default of "**/*Test.class" is used. For example, to only run com.google.gwt.dev.jjs.test.CompilerTest, you would execute:
ant test -Dgwt.junit.testcase.includes="com/google/gwt/dev/jjs/test/CompilerTest.class"
Patch by: mmendez
Review by: jat
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@673 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/common.ant.xml b/common.ant.xml
index 5c56c39..81ab687 100755
--- a/common.ant.xml
+++ b/common.ant.xml
@@ -48,7 +48,7 @@
<property name="javac.source" value="1.4" />
<property name="javac.nowarn" value="true" />
<property name="junit.out" location="${project.build}/test" />
-
+
<!-- Sanity check -->
<available file="${gwt.tools}" type="dir" property="gwt.tools.exists" />
<fail unless="gwt.tools.exists" message="Cannot find '${gwt.tools}' tools directory; perhaps you should define the GWT_TOOLS environment variable" />
@@ -91,7 +91,8 @@
<!-- JUnit support -->
<property name="gwt.dev.staging.jar" location="${gwt.build.staging}/gwt-${build.host.platform}-${gwt.version}/gwt-dev-${build.host.platform}.jar" />
<property name="gwt.junit.port" value="8888" />
-
+ <property name="gwt.junit.testcase.includes" value="**/*Test.class"/>
+
<!--
Comma delimited list of host and path components on which to run remote browser testing.
-->
diff --git a/user/build.xml b/user/build.xml
index 0a54c10..75d92cd 100755
--- a/user/build.xml
+++ b/user/build.xml
@@ -6,7 +6,8 @@
<!--
Default hosted mode test cases
-->
- <fileset id="default.hosted.tests" dir="${javac.junit.out}">
+ <fileset id="default.hosted.tests" dir="${javac.junit.out}"
+ includes="${gwt.junit.testcase.includes}">
<!--
Causes a security dialog to popup and subsequently blocks testing
-->
@@ -16,14 +17,13 @@
Need to confirm with JGW if this should still be disabled
-->
<exclude name="com/google/gwt/user/client/ui/HistoryTest.class" />
-
- <include name="**/*Test.class" />
</fileset>
<!--
Default web mode test cases
-->
- <fileset id="default.web.tests" dir="${javac.junit.out}">
+ <fileset id="default.web.tests" dir="${javac.junit.out}"
+ includes="${gwt.junit.testcase.includes}">
<!--
Causes a security dialog to popup and subsequently blocks testing
-->
@@ -66,8 +66,6 @@
com.google.gwt.core.client.JavaScriptException: JavaScript RangeError exception: Maximum call stack size exceeded.
-->
<exclude name="com/google/gwt/dev/jjs/test/MiscellaneousTest.class" />
-
- <include name="**/*Test.class" />
</fileset>
<!-- Platform shouldn't matter here, just picking one -->