Revision: 5800 Author: jlaba...@google.com Date: Sun Jul 26 17:35:05 2009 Log: Rolling back r5798-5799 because they are causing tests to fail.
Patch by: jlabanca Review by: jgw (TBR) http://code.google.com/p/google-web-toolkit/source/detail?r=5800 Modified: /trunk/build-tools/ant-gwt/build.xml /trunk/build.xml /trunk/common.ant.xml /trunk/dev/core/build.xml /trunk/tools/api-checker/build.xml /trunk/user/build.xml ======================================= --- /trunk/build-tools/ant-gwt/build.xml Sun Jul 26 16:55:29 2009 +++ /trunk/build-tools/ant-gwt/build.xml Sun Jul 26 17:35:05 2009 @@ -3,10 +3,6 @@ <property name="project.tail" value="build-tools/ant-gwt" /> <import file="${gwt.root}/common.ant.xml" /> - <fileset id="default.tests" dir="${javac.junit.out}"> - <include name="**/*Test.class" /> - </fileset> - <target name="compile" description="Compiles this project"> <mkdir dir="${javac.out}" /> <gwt.javac> @@ -16,7 +12,7 @@ </gwt.javac> </target> - <target name="compile.tests" depends="build, compile.emma" description="Compiles the test code for this project"> + <target name="compile.tests" depends="build" description="Compiles the test code for this project"> <mkdir dir="${javac.junit.out}" /> <gwt.javac srcdir="test" destdir="${javac.junit.out}"> <classpath> @@ -37,7 +33,32 @@ </target> <target name="test" depends="build, compile.tests" description="Run unit tests for this project."> - <gwt.junit test.out="${junit.out}" test.cases="default.tests" /> + <!-- TODO: refactor gwt.junit so it can be reused here --> + <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> + <classpath> + <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> + <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" /> + </classpath> + </taskdef> + + <echo message="Writing test results to ${junit.out}/reports for ${test.cases}" /> + <mkdir dir="${junit.out}/reports" /> + + <echo message="${javac.out} ${javac.junit.out}" /> + <junit dir="${junit.out}" fork="yes" printsummary="yes" haltonfailure="true"> + <classpath> + <pathelement location="${javac.junit.out}" /> + <pathelement location="${javac.out}" /> + <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> + </classpath> + + <formatter type="plain" /> + <formatter type="xml" /> + + <batchtest todir="${junit.out}/reports"> + <fileset dir="${javac.junit.out}" includes="**/*Test.class" /> + </batchtest> + </junit> </target> <target name="checkstyle" description="Static analysis of source"> ======================================= --- /trunk/build.xml Sun Jul 26 14:05:25 2009 +++ /trunk/build.xml Sun Jul 26 17:35:05 2009 @@ -5,7 +5,6 @@ <!-- "build" is the default when subprojects are directly targetted --> <property name="target" value="build" /> - <property name="emma.merged.out" value="${project.build}/emma-coverage" /> <!-- Convenience for the lateral calls we make. Use gwt.ant to @@ -128,39 +127,6 @@ <call-subproject subproject="tools" subtarget="test" /> </target> - <path id="emma.classpath.src"> - <pathelement location="${gwt.root}/user/src" /> - <pathelement location="${gwt.root}/dev/**/src/com/google" /> - <pathelement location="${gwt.root}/build-tools/**/src/com/google" /> - <pathelement location="${gwt.root}/tools/**/src/com/google" /> - </path> - - <target name="emma.merge" description="Merges coverage data for all projects" if="emma.enabled"> - <delete dir="${emma.merged.out}" /> - <mkdir dir="${emma.merged.out}" /> - <emma> - <merge outfile="${emma.merged.out}/merged.emma" > - <fileset dir="${project.build}" > - <include name="**/*.emma" /> - <exclude name="**/merged.emma" /> - </fileset> - </merge> - </emma> - <emma enabled="${emma.enabled}"> - <report sourcepath="${emma.classpath.src}"> - <fileset dir="${project.build}"> - <patternset> - <include name="**/metadata.emma"/> - </patternset> - </fileset> - <fileset file="${emma.merged.out}/merged.emma" /> - <txt outfile="${emma.merged.out}/coverage.txt" /> - <html outfile="${emma.merged.out}/coverage.html" /> - <xml outfile="${emma.merged.out}/coverage.xml" /> - </report> - </emma> - </target> - <target name="clean" description="[action] Cleans the entire GWT build"> <delete dir="${gwt.build}" /> </target> ======================================= --- /trunk/common.ant.xml Sun Jul 26 14:05:25 2009 +++ /trunk/common.ant.xml Sun Jul 26 17:35:05 2009 @@ -49,7 +49,6 @@ <property name="project.jni" location="${gwt.build}/${project.tail}" /> <property name="javac.out" location="${project.build}/bin" /> <property name="javac.junit.out" location="${project.build}/bin-test" /> - <property name="javac.emma.out" location="${project.build}/bin-emma" /> <property name="javac.debug" value="true" /> <property name="javac.debuglevel" value="lines,vars,source" /> <property name="javac.encoding" value="utf-8" /> @@ -57,8 +56,6 @@ <property name="javac.target" value="1.5" /> <property name="javac.nowarn" value="true" /> <property name="junit.out" location="${project.build}/test" /> - <property name="emma.dir" value="${gwt.tools.redist}/emma" /> - <property name="emma.filter.exclude" value="" /> <!-- Sanity check --> <available file="${gwt.tools}" type="dir" property="gwt.tools.exists" /> @@ -122,14 +119,6 @@ </not> </condition> - <!-- Shared class paths --> - <path id="project.classpath.class"> - <pathelement location="${javac.out}" /> - </path> - <path id="project.classpath.src"> - <pathelement location="${gwt.root}/${project.tail}/src" /> - </path> - <!-- Pulls in tasks defined in ant-contrib, i.e. foreach --> <taskdef resource="net/sf/antcontrib/antlib.xml"> <classpath> @@ -144,7 +133,6 @@ <propertyref name="gwt.version" /> <propertyref name="gwt.junit.port" /> <propertyref name="gwt.remote.browsers" /> - <propertyref name="emma.enabled" /> </propertyset> </ant> </presetdef> @@ -175,7 +163,6 @@ <attribute name="test.args" default="" /> <attribute name="test.out" default="" /> <attribute name="test.reports" default="@{test.out}/reports" /> - <attribute name="test.emma.coverage" default="@{test.out}/emma-coverage" /> <attribute name="test.cases" default="" /> <element name="extraclasspaths" optional="true" /> <sequential> @@ -190,28 +177,20 @@ <echo message="Writing test results to @{test.reports} for @{test.cases}" /> <mkdir dir="@{test.reports}" /> - <antcall target="-create.emma.coverage"> - <param name="test.emma.coverage" value="@{test.emma.coverage}"/> - </antcall> - <echo message="${javac.out} ${javac.junit.out}" /> <junit dir="@{test.out}" fork="yes" printsummary="yes" failureproperty="junit.failure" tempdir="@{test.out}" > <jvmarg line="${junit.platform.args}" /> <jvmarg line="-Xmx768m" /> - <jvmarg value="-demma.coverage.out.fi...@{test.emma.coverage}/coverage.emma" /> - <jvmarg value="-Demma.coverage.out.merge=true" /> <sysproperty key="gwt.args" value="${junit.notheadless.arg} @{test.args}" /> <sysproperty key="java.awt.headless" value="${junit.headless}" /> <sysproperty key="gwt.devjar" value="${gwt.dev.staging.jar}" /> <classpath> - <path refid="project.classpath.src" /> + <pathelement location="${gwt.root}/${project.tail}/src" /> <pathelement location="${gwt.root}/${project.tail}/super" /> <pathelement location="${gwt.root}/${project.tail}/test" /> <pathelement location="${javac.junit.out}" /> - <pathelement location="${javac.emma.out}" /> - <path refid="project.classpath.class" /> - <path refid="emma.lib" /> + <pathelement location="${javac.out}" /> <pathelement location="${gwt.dev.staging.jar}" /> <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> <pathelement location="${gwt.tools.lib}/selenium/selenium-java-client-driver.jar" /> @@ -227,19 +206,6 @@ <fileset refid="@{test.cases}" /> </batchtest> </junit> - - <emma enabled="${emma.enabled}"> - <report sourcepath="${project.classpath.src}"> - <fileset file="${javac.emma.out}/metadata.emma" /> - <fileset dir="@{test.emma.coverage}"> - <include name="*.emma" /> - </fileset> - <txt outfile="@{test.emma.coverage}/coverage.txt" /> - <html outfile="@{test.emma.coverage}/coverage.html" /> - <xml outfile="@{test.emma.coverage}/coverage.xml" /> - </report> - </emma> - <fail message="One or more junit tests failed" if="junit.failure" /> </sequential> </macrodef> @@ -337,43 +303,6 @@ </sequential> </macrodef> - <!-- Targets for emma support. To run tests with emma enabled, use - ant emma <test-target>. --> - <path id="emma.lib"> - <pathelement location="${emma.dir}/emma-2.0.5312-patched.jar" /> - <pathelement location="${emma.dir}/emma_ant-2.0.5312.jar" /> - </path> - - <taskdef resource="emma_ant.properties" classpathref="emma.lib" /> - - <target name="emma" description="Enables on EMMA instrumentation/reporting" > - <property name="emma.enabled" value="true" /> - </target> - - <target name="compile.emma" description="Instruments emma classes" unless="emma.compiled"> - <delete dir="${javac.emma.out}" /> - <property name="emma.compiled" value="true" /> - <antcall target="-compile.emma.if.enabled" /> - </target> - - <target name="-compile.emma.if.enabled" description="Instruments emma classes" if="emma.enabled"> - <mkdir dir="${javac.emma.out}" /> - <path id="emma.classpath"> - <pathelement location="${javac.out}" /> - </path> - <emma enabled="${emma.enabled}" > - <instr instrpathref="emma.classpath" destdir="${javac.emma.out}" metadatafile="${javac.emma.out}/metadata.emma" merge="false"> - <filter includes="com.google.*" /> - <filter excludes="${emma.filter.exclude}" /> - </instr> - </emma> - </target> - - <target name="-create.emma.coverage" description="Create the emma coverage directory" if="emma.enabled"> - <delete dir="${test.emma.coverage}" /> - <mkdir dir="${test.emma.coverage}" /> - </target> - <!-- Default implementations of the required targets; projects should override the ones that matter --> <target name="all" depends="verify" /> ======================================= --- /trunk/dev/core/build.xml Sun Jul 26 14:05:25 2009 +++ /trunk/dev/core/build.xml Sun Jul 26 17:35:05 2009 @@ -9,7 +9,7 @@ <include name="**/com/google/**/*Test.class" /> </fileset> - <target name="compile.tests" depends="build, compile.emma" description="Compiles the test code for this project"> + <target name="compile.tests" depends="build" description="Compiles the test code for this project"> <mkdir dir="${javac.junit.out}" /> <gwt.javac srcdir="test" destdir="${javac.junit.out}"> <classpath> @@ -166,14 +166,38 @@ </target> <target name="test" depends="build, compile.tests" description="Run unit tests for this project."> - <gwt.junit test.out="${junit.out}" test.cases="default.tests" > - <extraclasspaths> + <!-- TODO: refactor gwt.junit so it can be reused here --> + <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> + <classpath> + <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> + <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" /> + </classpath> + </taskdef> + + <echo message="Writing test results to ${junit.out}/reports for ${test.cases}" /> + <mkdir dir="${junit.out}/reports" /> + + <echo message="${javac.out} ${javac.junit.out}" /> + <junit dir="${junit.out}" fork="yes" printsummary="yes" haltonfailure="true"> + <classpath> + <pathelement location="test" /> + <pathelement location="${javac.junit.out}" /> + <pathelement location="${javac.out}" /> <pathelement location="${alldeps.jar}" /> + <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> <!-- Pull in gwt-dev and gwt-user sources for .gwt.xml files --> <pathelement location="${gwt.root}/user/src/" /> <pathelement location="${gwt.root}/user/super/" /> - </extraclasspaths> - </gwt.junit> + <pathelement location="${gwt.root}/dev/core/super" /> + </classpath> + + <formatter type="plain" /> + <formatter type="xml" /> + + <batchtest todir="${junit.out}/reports"> + <fileset refid="default.tests" /> + </batchtest> + </junit> </target> <target name="clean" description="Cleans this project's intermediate and output files"> ======================================= --- /trunk/tools/api-checker/build.xml Sun Jul 26 14:05:25 2009 +++ /trunk/tools/api-checker/build.xml Sun Jul 26 17:35:05 2009 @@ -10,10 +10,6 @@ <property.ensure name="gwt.dev.jar" location="${gwt.build.lib}/gwt-dev-${build.host.platform}.jar" /> <property.ensure name="gwt.user.jar" location="${gwt.build.lib}/gwt-user.jar" /> - <fileset id="default.tests" dir="${javac.junit.out}"> - <include name="**/*Test.class" /> - </fileset> - <target name="compile" description="Compile all class files"> <mkdir dir="${javac.out}" /> <gwt.javac> @@ -24,7 +20,7 @@ </gwt.javac> </target> - <target name="compile.tests" depends="compile.emma" description="Compiles the test code for this project"> + <target name="compile.tests" description="Compiles the test code for this project"> <mkdir dir="${javac.junit.out}" /> <gwt.javac srcdir="test" destdir="${javac.junit.out}"> <classpath> @@ -46,12 +42,33 @@ </target> <target name="test" depends="build, compile.tests" description="Run unit tests for this project."> - <gwt.junit test.out="${junit.out}" test.cases="default.tests" > - <extraclasspaths> + <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"> + <classpath> + <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> + <pathelement location="${gwt.tools.antlib}/ant-junit-1.6.5.jar" /> + </classpath> + </taskdef> + + <echo message="Writing test results to ${junit.out}/reports" /> + <mkdir dir="${junit.out}/reports" /> + + <junit dir="${junit.out}" fork="yes" printsummary="yes" haltonfailure="true"> + <sysproperty key="gwt.devjar" value="${gwt.dev.staging.jar}" /> + <classpath> + <pathelement location="test" /> + <pathelement location="${javac.junit.out}" /> <pathelement location="${gwt.build.out}/tools/api-checker/bin"/> <pathelement location="${gwt.dev.jar}" /> - </extraclasspaths> - </gwt.junit> + <pathelement location="${gwt.tools.lib}/junit/junit-3.8.1.jar" /> + </classpath> + + <formatter type="plain" /> + <formatter type="xml" /> + <batchtest todir="${junit.out}/reports"> + <fileset dir="${javac.junit.out}" + includes="**/*Test.class"/> + </batchtest> + </junit> </target> <target name="checkstyle" description="Static analysis of source"> ======================================= --- /trunk/user/build.xml Sun Jul 26 14:05:25 2009 +++ /trunk/user/build.xml Sun Jul 26 17:35:05 2009 @@ -3,14 +3,10 @@ <property name="project.tail" value="user" /> <property name="test.args" value="" /> - <!-- BrowserManagerServer_Stub compiled using rmic, which doesn't generate full source code --> - <property name="emma.filter.exclude" value="*BrowserManagerServer_Stub*" /> - <import file="${gwt.root}/common.ant.xml" /> <property name="gwt.junit.emmatestcase.includes" value="**/*Suite.class,com/google/gwt/dev/jjs/test/*Test.class"/> <property name="test.timeout" value="3" /> - <property name="emma.merged.out" value="${junit.out}/emma-coverage" /> <!-- Whether I18NSuite should test e.g. Foo$InnerMsgs_fr.properties (if the @@ -79,7 +75,7 @@ <gwt.ant dir="../dev/core" target="compile.tests" /> </target> - <target name="compile.tests" depends="compile.dev.core.tests, compile.emma" description="Compiles the test code for this project"> + <target name="compile.tests" depends="compile.dev.core.tests" description="Compiles the test code for this project"> <mkdir dir="${javac.junit.out}" /> <gwt.javac srcdir="test" excludes="com/google/gwt/langtest/**" destdir="${javac.junit.out}"> <classpath> @@ -190,7 +186,6 @@ <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 @@ -212,28 +207,6 @@ </limit> </target> - <target name="emma.merge" description="Merges coverage data for the entire project" if="emma.enabled"> - <delete dir="${emma.merged.out}" /> - <mkdir dir="${emma.merged.out}" /> - <emma> - <merge outfile="${emma.merged.out}/merged.emma" > - <fileset dir="${junit.out}" > - <include name="**/*.emma" /> - <exclude name="${emma.merged.out}/merged.emma" /> - </fileset> - </merge> - </emma> - <emma enabled="${emma.enabled}"> - <report sourcepath="${project.classpath.src}"> - <fileset file="${javac.emma.out}/metadata.emma" /> - <fileset file="${emma.merged.out}/merged.emma" /> - <txt outfile="${emma.merged.out}/coverage.txt" /> - <html outfile="${emma.merged.out}/coverage.html" /> - <xml outfile="${emma.merged.out}/coverage.xml" /> - </report> - </emma> - </target> - <target name="clean" description="Cleans this project's intermediate and output files"> <delete dir="${project.build}" /> <delete file="${project.lib}" /> --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---