This patch expands Gwt's ability to successfully create classMappings, necessary when running Emma. The following types of classes
can now be handled correctly:
(a) A top level class that is not the main type in a java file (e.g., Test$1Foo produced from Bar.java)
(b) A class that is nested multiple-levels deep (e.g., Test$Foo$1Bar)
(c) An anonmyous class that extends a named local class (e.g., Test$1Foo)
Also adds a test target to enable running all hosted mode tests in Emma mode. All tests pass except CoverageTest.java that fails
because of a bug in javac in both OpenJDK and Sun's Java6.
Patch by: amitmanjhi
Review by: jat (desk review)
git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/1.6@4627 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/build.xml b/user/build.xml
index dcd2c99..67c8337 100755
--- a/user/build.xml
+++ b/user/build.xml
@@ -12,6 +12,11 @@
<fileset id="default.emma.tests" dir="${javac.junit.out}"
includes="**/EmmaClassLoadingTest.class" />
+
+ <fileset id="default.hosted.emma.tests" dir="${javac.junit.out}"
+ excludes="**/*jjs.test.CoverageTest.class" includes="**/*Test.class" />
+ <!-- everything succeeds except CoverageTest.java. It fails due to a javac bug in sun/OpenJDK's Java. See the file contents for details -->
+
<!--
Default web mode test cases
-->
@@ -96,6 +101,15 @@
</gwt.junit>
</target>
+ <target name="test.hosted.emma" depends="compile, compile.tests" description="Run all hosted-mode tests in emma mode.">
+ <gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.emma.tests" >
+ <extraclasspaths>
+ <pathelement location="${gwt.build}/out/dev/core/bin-test" />
+ <pathelement location="${gwt.tools.redist}/emma/emma.jar" />
+ </extraclasspaths>
+ </gwt.junit>
+ </target>
+
<target name="test.hosted" depends="compile, compile.tests" description="Run only hosted-mode tests for this project.">
<gwt.junit test.args="${test.args}" test.out="${junit.out}/${build.host.platform}-hosted-mode" test.cases="default.hosted.tests" >
<extraclasspaths>
@@ -107,7 +121,7 @@
<pathelement location="${gwt.build}/out/dev/core/bin-test" />
<pathelement location="${gwt.tools.redist}/emma/emma.jar" />
</extraclasspaths>
- </gwt.junit>
+ </gwt.junit>
</target>
<target name="test.web" depends="compile, compile.tests" description="Run only web-mode tests for this project.">