You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Alexey Varlamov <al...@gmail.com> on 2006/11/20 12:48:25 UTC

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Folks,

I've just did a little step in improving pre-commit testing for DRLVM;
most important change is a move from "perTest" forking mode to "once"
(aka sameVM mode).
This reduces testing time drastically (~50%), but may introduce some
extra instability (like new intermittent failures or timeouts).
Nevertheless I believe we are ready to accept this challenge and it is
important to take it earlier.
Other enhancements, are described below; hopefully will make us more
productive. Have fun!


2006/11/20, varlax@apache.org <va...@apache.org>:
> Author: varlax
> Date: Mon Nov 20 03:27:39 2006
> New Revision: 477149
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
> Log:
> Refactored kernel.test.xml, made it more "ant-minded" and added some features:
> [+] "kernel.test.forkmode" support, "once" by default;
> [+] single "test.case" support;
> [+] "kernel.test.failfast" behaviour support;
> [!] Improved results reporting;
> [+] easy customization via property file;
>
> Some intermittent failures appeared on Win32 due to forking only "once", but we must meet them sooner or later - why not now...
>
> Added:
>    harmony/enhanced/drlvm/trunk/build/make/test.properties
> Modified:
>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>
> Modified: harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
> ==============================================================================
> --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml (original)
> +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml Mon Nov 20 03:27:39 2006
> @@ -1,17 +1,18 @@
>  <!--
> -    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
> -
> -    Licensed under the Apache License, Version 2.0 (the "License");
> -    you may not use this file except in compliance with the License.
> -    You may obtain a copy of the License at
> -
> -       http://www.apache.org/licenses/LICENSE-2.0
> -
> -    Unless required by applicable law or agreed to in writing, software
> -    distributed under the License is distributed on an "AS IS" BASIS,
> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> -    See the License for the specific language governing permissions and
> -    limitations under the License.
> +     Licensed to the Apache Software Foundation (ASF) under one or more
> +     contributor license agreements.  See the NOTICE file distributed with
> +     this work for additional information regarding copyright ownership.
> +     The ASF licenses this file to You under the Apache License, Version 2.0
> +     (the "License"); you may not use this file except in compliance with
> +     the License.  You may obtain a copy of the License at
> +
> +         http://www.apache.org/licenses/LICENSE-2.0
> +
> +     Unless required by applicable law or agreed to in writing, software
> +     distributed under the License is distributed on an "AS IS" BASIS,
> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> +     See the License for the specific language governing permissions and
> +     limitations under the License.
>  -->
>
>  <project name="KERNEL TESTS">
> @@ -20,7 +21,9 @@
>     <property name="kernel.test.dir" location="${build.semi.dir}/kernel.tests"/>
>     <property name="test.resource.path" location="${kernel.test.dir}/resources"/>
>     <property name="test.class.path" location="${kernel.test.dir}/classes"/>
> -
> +
> +    <property name="test.jvm.exe" value="${build.deploy.dir}/bin/java"/>
> +    <property file="test.properties"/>
>
>     <patternset id="kernel.test.java.pattern">
>         <include name="org/apache/harmony/**/*Test.java" />
> @@ -36,68 +39,58 @@
>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
> -
> -       <!-- This test fails -->
> -       <!--exclude name="java/lang/ThreadTest.java" /-->
>     </patternset>
> -
> -    <property name="vm.use_verifier" value="1" />
> -    <property name="kernel.test.timeout" value="360000" />
>
> -    <target name="kernel.test" depends="-pre-kernel-test">
> -        <property name="test.mode" value="jet+opt+int" />
> -        <if>
> -            <contains string="${test.mode}" substring="batch" />
> -            <then>
> -                <antcallback target="-run-kernel-test-batch"
> -                    return="batch.status">
> -                </antcallback>
> -            </then>
> -        </if>
> -        <if>
> -            <contains string="${test.mode}" substring="jet" />
> -            <then>
> -                <antcallback target="-run-kernel-test"
> -                    return="jit.jet.status">
> -                    <param name="jit.or.interpreter" value="jitrino.jet" />
> -                    <param name="int.or.jit.arg" value="-Dem.properties=jet" />
> -                </antcallback>
> -            </then>
> -        </if>
> -        <if>
> -            <contains string="${test.mode}" substring="opt" />
> -            <then>
> -                <antcallback target="-run-kernel-test"
> -                    return="jit.opt.status">
> -                    <param name="jit.or.interpreter" value="jitrino.opt" />
> -                    <param name="int.or.jit.arg" value="-Dem.properties=opt" />
> -                </antcallback>
> -            </then>
> -        </if>
> -        <if>
> -            <contains string="${test.mode}" substring="int" />
> -            <then>
> -                <antcallback target="-run-kernel-test"
> -                    return="interpreter.status">
> -                    <param name="jit.or.interpreter" value="interpreter" />
> -                    <param name="int.or.jit.arg" value="-Xint" />
> -                </antcallback>
> -            </then>
> -        </if>
> -        <if>
> -            <or>
> -                <contains string="${jit.jet.status}" substring="FAILED" />
> -                <contains string="${jit.opt.status}" substring="FAILED" />
> -                <contains string="${interpreter.status}" substring="FAILED" />
> -                <contains string="${batch.status}" substring="FAILED" />
> -            </or>
> -            <then>
> -                <fail message="Kernel tests FAILED" />
> -            </then>
> -        </if>
> -    </target>
> +    <target name="kernel.test"
> +        depends="compile-kernel-test, run-kernel-test, report-kernel-test, check-kernel-test"/>
>
> -    <target name="compile-kernel-tests" depends="">
> +    <target name="run-kernel-test" depends="-prepare-kernel-test">
> +        <condition property="kernel.test.continue" value="true" else="false">
> +            <isfalse value="${kernel.test.failfast}"/>
> +        </condition>
> +        <for list="${kernel.test.mode}" param="mode"
> +            trim="true" keepgoing="${kernel.test.continue}">
> +            <sequential>
> +                <antcall target="-run-kernel-test-batch">
> +                    <param name="kernel.mode" value="@{mode}" />
> +                </antcall>
> +            </sequential>
> +        </for>
> +    </target>
> +
> +    <target name="report-kernel-test">
> +        <for list="${kernel.test.mode}" param="mode"
> +            trim="true" keepgoing="true">
> +            <sequential>
> +                <junitreport todir="${kernel.test.dir}/reports/@{mode}.mode">
> +                    <fileset dir="${kernel.test.dir}/reports/@{mode}.mode">
> +                        <include name="*.xml" />
> +                    </fileset>
> +                    <report format="frames"
> +                        todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
> +                </junitreport>
> +            </sequential>
> +        </for>
> +    </target>
> +
> +    <target name="check-kernel-test">
> +        <loadfile property="kernel.test.summary"
> +            srcFile="${kernel.test.dir}/reports/summary"/>
> +        <echo message="  ***************************${line.separator}"/>
> +        <echo message="  *** Kernel tests status ***${line.separator}"/>
> +        <echo message="  ***************************${line.separator}"/>
> +        <echo message="${line.separator}"/>
> +        <echo message="${kernel.test.summary}"/>
> +        <echo message="${line.separator}"/>
> +        <echo>Please find detailed results under ${kernel.test.dir}/reports directory.</echo>
> +
> +        <condition property="kernel.failures">
> +            <contains string="${kernel.test.summary}" substring="FAILED" />
> +        </condition>
> +        <fail if="kernel.failures" message="There were test failures." />
> +    </target>
> +
> +    <target name="compile-kernel-test">
>         <mkdir dir="${test.resource.path}" />
>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
>             destdir="${test.resource.path}"
> @@ -111,177 +104,61 @@
>         <delete quiet="true" dir="${test.class.path}/notfound" />
>     </target>
>
> -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
> +    <target name="-prepare-kernel-test">
> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> +        <mkdir dir="${kernel.test.dir}/reports" />
> +
>         <condition property="junit.jar" value="${junit.home}/junit.jar">
>             <isset property="junit.home" />
>         </condition>
> -        <property name="junit.jar" location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
> -        <if>
> -            <not>
> -                <available file="${junit.jar}"/>
> -            </not>
> -            <then>
> -                <echo>
> +        <property name="junit.jar"
> +            location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
> +        <available file="${junit.jar}" property="junit.found"/>
> +        <fail unless="junit.found">
>                 ==============================================
>                 Please set the classpath of junit as follows:
>                 build.bat -Djunit.jar=%JUNIT_HOME% test
>                 ==============================================
> -                </echo>
> -                <fail message="Kernel tests misconfigured" />
> -            </then>
> -        </if>
> -
> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> -        <delete quiet="true" dir="${kernel.test.dir}/ref-reports" />
> -        <mkdir dir="${kernel.test.dir}/reports" />
> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
> -
> +        </fail>
>     </target>
>
>     <target name="-run-kernel-test-batch">
> +        <propertycopy property="kernel.mode.name" from="${kernel.mode}.name" override="on"/>
> +        <propertycopy property="kernel.mode.switch" from="${kernel.mode}.switch" override="on"/>
> +        <echo>
> +        ==================================
> +        Run kernel tests using ${kernel.mode.name}
> +        ==================================
> +        </echo>
>         <property name="report.dir"
> -            location="${kernel.test.dir}/reports/batch.mode"/>
> +            location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
>         <mkdir dir="${report.dir}" />
>
> -        <junit fork="yes" forkmode="once" timeout="${kernel.test.timeout}"
> -            haltonfailure="no" failureproperty="batch.failed"
> -            filtertrace="no" printsummary="on"
> -            jvm="${build.deploy.dir}/bin/java">
> -
> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> +        <junit fork="yes" failureproperty="kernel.failed"
> +            filtertrace="no" printsummary="on" showoutput="off"
> +            haltonfailure="${kernel.test.failfast}"
> +            forkmode="${kernel.test.forkmode}"
> +            timeout="${kernel.test.timeout}"
> +            jvm="${test.jvm.exe}">
>
> -            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
>             <jvmarg value="-Dvm.assert_dialog=0" />
> +            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> +            <jvmarg value="${kernel.mode.switch}" />
>             <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
> -            <formatter type="brief"/>
> -            <batchtest todir="${report.dir}">
> +            <formatter type="xml"/>
> +            <batchtest todir="${report.dir}" unless="test.case">
>                 <fileset dir="${kernel.test.javasrc}">
>                     <patternset refid="kernel.test.java.pattern"/>
>                 </fileset>
>             </batchtest>
> +            <test name="${test.case}" todir="${report.dir}" if="test.case" />
>         </junit>
>
> -        <condition property="batch.status" value="FAILED" else="PASSED">
> -            <isset property="batch.failed" />
> +        <condition property="kernel.status" value="FAILED" else="PASSED">
> +            <isset property="kernel.failed" />
>         </condition>
> -    </target>
> -
> -
> -    <target name="-run-kernel-test">
> -        <echo>
> -               ==================================
> -               Run kernel tests using ${jit.or.interpreter}
> -               ==================================
> -               </echo>
> -
> -        <property name="report.dir"
> -            location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
> -        <mkdir dir="${report.dir}" />
> -
> -        <for param="test">
> -            <fileset dir="${kernel.test.javasrc}">
> -                <patternset refid="kernel.test.java.pattern" />
> -            </fileset>
> -            <sequential>
> -
> -                <basename property="last.dir" file="${kernel.test.javasrc}" />
> -                <propertyregex property="class.name" override="true" input="@{test}" regexp="(.)+${last.dir}\${file.separator}" replace="" defaultValue="@{test}" />
> -                <propertyregex property="class.name" override="true" input="${class.name}" regexp="\.java" replace="" defaultValue="${class.name}" />
> -                <propertyregex property="class.name" override="true" input="${class.name}" regexp="\${file.separator}" replace="." global="true" defaultValue="${class.name}" />
> -                <echo message="RUNNING : ${class.name}" />
> -
> -                <junit fork="yes" failureproperty="@{test}.failed"
> -                    timeout="${kernel.test.timeout}" newenvironment="yes" filtertrace="no"
> -                    jvm="${build.deploy.dir}/bin/java">
> -
> -                    <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> -
> -                    <!--env key="LD_LIBRARY_PATH" value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
> -                    <env key="SYSTEMDRIVE" value="${env.SystemDrive}" />
> -                    <env key="HOME" value="${env.HOME}" />
> -                    <env key="PATH" value="${env.PATH}" />
> -                    <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> -                    <jvmarg value="-Demma.coverage.out.file=${emma.coverage.out}" />
> -                    <jvmarg value="-Demma.coverage.out.merge=true" />
> -                    <jvmarg value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${emma.jar}" />
> -                    <jvmarg value="-Dvm.use_verifier=${vm.use_verifier}" />
> -                    <jvmarg value="-Dvm.assert_dialog=0" />
> -                    <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
> -                    <jvmarg value="${int.or.jit.arg}" />
> -                    <jvmarg value="-ea:java.lang.reflect..." />
> -                    <formatter type="brief"/>
> -                    <formatter type="xml" />
> -                    <test name="${class.name}" todir="${report.dir}"/>
> -                </junit>
> -                <condition property="${jit.or.interpreter}.status" value="FAILED">
> -                    <isset property="@{test}.failed" />
> -                </condition>
> -
> -                <!--
> -                Gregory
> -                It appears that some kernel unit tests for drlvm classes are
> -                implementation specific and may fail on RI. So it makes no
> -                sense to check tests on RI. Also running test on RI
> -                right after it failed on drlvm creates wrong test run report.
> -
> -                I am commenting this block for now in case someone wants it
> -                back, possibly under some condition. My POV is that this
> -                block should be removed eventually.
> -                <if>
> -                    <or>
> -                        <isset property="@{test}.failed" />
> -                        <isset property="kernel.test.reference" />
> -                    </or>
> -                    <then>
> -                        <junit fork="yes" failureproperty="@{test}.ref.failed"
> -                            timeout="${kernel.test.timeout}"
> -                            newenvironment="yes" filtertrace="no">
> -
> -
> -                            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> -
> -                            <!- -env key="LD_LIBRARY_PATH" value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
> -                            <env key="SYSTEMDRIVE" value="${env.SystemDrive}" />
> -                            <env key="HOME" value="${env.HOME}" />
> -                            <env key="PATH" value="${env.PATH}" />
> -                            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> -                            <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
> -                            <formatter type="brief"/>
> -                            <formatter type="xml" />
> -                            <test name="${class.name}" todir="${kernel.test.dir}/ref-reports"/>
> -                        </junit>
> -
> -                        <if>
> -                            <isset property="@{test}.ref.failed" />
> -                            <then>
> -                                <echo message="   **** FAILED on reference JRE ****" />
> -                            </then>
> -                        </if>
> -                    </then>
> -                </if>
> -                /-->
> -            </sequential>
> -        </for>
> -
> -        <junitreport todir="${report.dir}">
> -            <fileset dir="${report.dir}">
> -                <include name="TEST-*.xml" />
> -            </fileset>
> -            <report format="frames" todir="${report.dir}/html" />
> -        </junitreport>
> -        <junitreport todir="${kernel.test.dir}/ref-reports">
> -            <fileset dir="${kernel.test.dir}/ref-reports">
> -                <include name="TEST-*.xml" />
> -            </fileset>
> -            <report format="frames" todir="${kernel.test.dir}/ref-reports/html" />
> -        </junitreport>
> -        <property name="${jit.or.interpreter}.status" value="PASSED"/>
> -        <propertycopy name="status" from="${jit.or.interpreter}.status"/>
> -        <echo message="" />
> -        <echo message="==============================================" />
> -        <echo message="Kernel tests ${status} using ${jit.or.interpreter}. Please find the detailed results here:" />
> -        <echo message="${report.dir}${file.separator}html${file.separator}index.html" />
> -        <echo message="==============================================" />
>
> +        <concat append="on" destfile="${kernel.test.dir}/reports/summary"
> +            >      ${kernel.mode.name} ${kernel.status}${line.separator}</concat>
>     </target>
>  </project>
>
> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
> URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
> ==============================================================================
> --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov 20 03:27:39 2006
> @@ -0,0 +1,19 @@
> +kernel.test.mode=jet,opt,int
> +kernel.test.failfast=off
> +kernel.test.forkmode=once
> +kernel.test.timeout=360000
> +
> +
> +jit.name=Client mode JIT (default)
> +jit.switch=-Dbogus
> +
> +jet.name=jitrino.JET
> +jet.switch=-Xem:jet
> +
> +opt.name=jitrino.OPT
> +opt.switch=-Xem:opt
> +
> +int.name=interpreter
> +int.switch=-Xint
> +
> +
>
>
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Alexey Varlamov wrote:
 > 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
 >>
 >>
 >> Alexey Varlamov wrote:
 >> > Folks,
 >> >
 >> > I've just did a little step in improving pre-commit testing for DRLVM;
 >> > most important change is a move from "perTest" forking mode to "once"
 >> > (aka sameVM mode).
 >> > This reduces testing time drastically (~50%), but may introduce some
 >> > extra instability (like new intermittent failures or timeouts).
 >>
 >> Plus the inability to figure out what's screwing things up.
 >>
 >> I can't decide if I like this.  On one hand, I like it because it's
 >> actually better to find side-effects - some test can pass, but still
 >> leave the VM in a broken state that another test will show.
 >>
 >> OTOH, it does remove the clarity of each test being a single, separate
 >> test.  It conceptually mixes integration testing with unit testing.
 >
 > Well, initially purpose for the kernel tests *is* unit testing and
 > AFAIU they were written with this in mind (with some exceptions
 > maybe). For conceptual purity we should re-group tests in the first
 > place - drop some trivial smoke tests (or move to kernel if
 > appropriate) and extract some complex cases from kernel (e.g. from
 > RuntimeTest or SystemExtensionTest).
 > So, I see no point to soothe ourselves with successful "perTest" runs
 > if we know the same simple tests may fail in sameVM mode.

I don't _know_ that.  What I'm pointing out is that we simply need a way 
to switch between modes, because it's useful to help figure out what's 
causing the problem.


 >
 >>
 >> Can you please just add a switch?  That way in the event of a failure,
 >> we can re-run with forking on, and therefore can tell if the crash is
 >> specifically due to the test that is crashing, or a side effect caused
 >> by something that came before.
 >
 > There is the switch: kernel.test.forkmode=[once|perTest].
 > I just assumed the keys are easily dediced from contents of the
 > test.properties, but probably should have announced them explicitly.
 > OK, here they are with current defaults:
 >
 > kernel.test.mode=jet,opt,int     // list of EEs to run, as configured
 > in the test.properties
 > kernel.test.failfast=off              // allows to abort testing
 > immediately after the first failure
 > kernel.test.forkmode=once     // [once|perTest]
 > kernel.test.timeout=360000

Great stuff - is this documented anywhere (besides here) ?

geir

 >
 >> geir
 >>
 >>
 >>
 >> > Nevertheless I believe we are ready to accept this challenge and it is
 >> > important to take it earlier.
 >> > Other enhancements, are described below; hopefully will make us more
 >> > productive. Have fun!
 >> >
 >> >
 >> > 2006/11/20, varlax@apache.org <va...@apache.org>:
 >> >> Author: varlax
 >> >> Date: Mon Nov 20 03:27:39 2006
 >> >> New Revision: 477149
 >> >>
 >> >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
 >> >> Log:
 >> >> Refactored kernel.test.xml, made it more "ant-minded" and added some
 >> >> features:
 >> >> [+] "kernel.test.forkmode" support, "once" by default;
 >> >> [+] single "test.case" support;
 >> >> [+] "kernel.test.failfast" behaviour support;
 >> >> [!] Improved results reporting;
 >> >> [+] easy customization via property file;
 >> >>
 >> >> Some intermittent failures appeared on Win32 due to forking only
 >> >> "once", but we must meet them sooner or later - why not now...
 >> >>
 >> >> Added:
 >> >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
 >> >> Modified:
 >> >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
 >> >>
 >> >> Modified: 
harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
 >> >> URL:
 >> >> 
http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
 >> >>
 >> >> 
==============================================================================
 >> >>
 >> >> --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
 >> >> (original)
 >> >> +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
 >> >> Mon Nov 20 03:27:39 2006
 >> >> @@ -1,17 +1,18 @@
 >> >>  <!--
 >> >> -    Copyright 2006 The Apache Software Foundation or its licensors,
 >> >> as applicable.
 >> >> -
 >> >> -    Licensed under the Apache License, Version 2.0 (the "License");
 >> >> -    you may not use this file except in compliance with the License.
 >> >> -    You may obtain a copy of the License at
 >> >> -
 >> >> -       http://www.apache.org/licenses/LICENSE-2.0
 >> >> -
 >> >> -    Unless required by applicable law or agreed to in writing, 
software
 >> >> -    distributed under the License is distributed on an "AS IS" 
BASIS,
 >> >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 >> >> implied.
 >> >> -    See the License for the specific language governing 
permissions and
 >> >> -    limitations under the License.
 >> >> +     Licensed to the Apache Software Foundation (ASF) under one 
or more
 >> >> +     contributor license agreements.  See the NOTICE file 
distributed
 >> >> with
 >> >> +     this work for additional information regarding copyright 
ownership.
 >> >> +     The ASF licenses this file to You under the Apache License,
 >> >> Version 2.0
 >> >> +     (the "License"); you may not use this file except in compliance
 >> >> with
 >> >> +     the License.  You may obtain a copy of the License at
 >> >> +
 >> >> +         http://www.apache.org/licenses/LICENSE-2.0
 >> >> +
 >> >> +     Unless required by applicable law or agreed to in writing, 
software
 >> >> +     distributed under the License is distributed on an "AS IS" 
BASIS,
 >> >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 >> >> implied.
 >> >> +     See the License for the specific language governing 
permissions and
 >> >> +     limitations under the License.
 >> >>  -->
 >> >>
 >> >>  <project name="KERNEL TESTS">
 >> >> @@ -20,7 +21,9 @@
 >> >>     <property name="kernel.test.dir"
 >> >> location="${build.semi.dir}/kernel.tests"/>
 >> >>     <property name="test.resource.path"
 >> >> location="${kernel.test.dir}/resources"/>
 >> >>     <property name="test.class.path"
 >> >> location="${kernel.test.dir}/classes"/>
 >> >> -
 >> >> +
 >> >> +    <property name="test.jvm.exe" 
value="${build.deploy.dir}/bin/java"/>
 >> >> +    <property file="test.properties"/>
 >> >>
 >> >>     <patternset id="kernel.test.java.pattern">
 >> >>         <include name="org/apache/harmony/**/*Test.java" />
 >> >> @@ -36,68 +39,58 @@
 >> >>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
 >> >>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
 >> >>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
 >> >> -
 >> >> -       <!-- This test fails -->
 >> >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
 >> >>     </patternset>
 >> >> -
 >> >> -    <property name="vm.use_verifier" value="1" />
 >> >> -    <property name="kernel.test.timeout" value="360000" />
 >> >>
 >> >> -    <target name="kernel.test" depends="-pre-kernel-test">
 >> >> -        <property name="test.mode" value="jet+opt+int" />
 >> >> -        <if>
 >> >> -            <contains string="${test.mode}" substring="batch" />
 >> >> -            <then>
 >> >> -                <antcallback target="-run-kernel-test-batch"
 >> >> -                    return="batch.status">
 >> >> -                </antcallback>
 >> >> -            </then>
 >> >> -        </if>
 >> >> -        <if>
 >> >> -            <contains string="${test.mode}" substring="jet" />
 >> >> -            <then>
 >> >> -                <antcallback target="-run-kernel-test"
 >> >> -                    return="jit.jet.status">
 >> >> -                    <param name="jit.or.interpreter"
 >> >> value="jitrino.jet" />
 >> >> -                    <param name="int.or.jit.arg"
 >> >> value="-Dem.properties=jet" />
 >> >> -                </antcallback>
 >> >> -            </then>
 >> >> -        </if>
 >> >> -        <if>
 >> >> -            <contains string="${test.mode}" substring="opt" />
 >> >> -            <then>
 >> >> -                <antcallback target="-run-kernel-test"
 >> >> -                    return="jit.opt.status">
 >> >> -                    <param name="jit.or.interpreter"
 >> >> value="jitrino.opt" />
 >> >> -                    <param name="int.or.jit.arg"
 >> >> value="-Dem.properties=opt" />
 >> >> -                </antcallback>
 >> >> -            </then>
 >> >> -        </if>
 >> >> -        <if>
 >> >> -            <contains string="${test.mode}" substring="int" />
 >> >> -            <then>
 >> >> -                <antcallback target="-run-kernel-test"
 >> >> -                    return="interpreter.status">
 >> >> -                    <param name="jit.or.interpreter"
 >> >> value="interpreter" />
 >> >> -                    <param name="int.or.jit.arg" value="-Xint" />
 >> >> -                </antcallback>
 >> >> -            </then>
 >> >> -        </if>
 >> >> -        <if>
 >> >> -            <or>
 >> >> -                <contains string="${jit.jet.status}"
 >> >> substring="FAILED" />
 >> >> -                <contains string="${jit.opt.status}"
 >> >> substring="FAILED" />
 >> >> -                <contains string="${interpreter.status}"
 >> >> substring="FAILED" />
 >> >> -                <contains string="${batch.status}" 
substring="FAILED" />
 >> >> -            </or>
 >> >> -            <then>
 >> >> -                <fail message="Kernel tests FAILED" />
 >> >> -            </then>
 >> >> -        </if>
 >> >> -    </target>
 >> >> +    <target name="kernel.test"
 >> >> +        depends="compile-kernel-test, run-kernel-test,
 >> >> report-kernel-test, check-kernel-test"/>
 >> >>
 >> >> -    <target name="compile-kernel-tests" depends="">
 >> >> +    <target name="run-kernel-test" depends="-prepare-kernel-test">
 >> >> +        <condition property="kernel.test.continue" value="true"
 >> >> else="false">
 >> >> +            <isfalse value="${kernel.test.failfast}"/>
 >> >> +        </condition>
 >> >> +        <for list="${kernel.test.mode}" param="mode"
 >> >> +            trim="true" keepgoing="${kernel.test.continue}">
 >> >> +            <sequential>
 >> >> +                <antcall target="-run-kernel-test-batch">
 >> >> +                    <param name="kernel.mode" value="@{mode}" />
 >> >> +                </antcall>
 >> >> +            </sequential>
 >> >> +        </for>
 >> >> +    </target>
 >> >> +
 >> >> +    <target name="report-kernel-test">
 >> >> +        <for list="${kernel.test.mode}" param="mode"
 >> >> +            trim="true" keepgoing="true">
 >> >> +            <sequential>
 >> >> +                <junitreport
 >> >> todir="${kernel.test.dir}/reports/@{mode}.mode">
 >> >> +                    <fileset
 >> >> dir="${kernel.test.dir}/reports/@{mode}.mode">
 >> >> +                        <include name="*.xml" />
 >> >> +                    </fileset>
 >> >> +                    <report format="frames"
 >> >> +
 >> >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
 >> >> +                </junitreport>
 >> >> +            </sequential>
 >> >> +        </for>
 >> >> +    </target>
 >> >> +
 >> >> +    <target name="check-kernel-test">
 >> >> +        <loadfile property="kernel.test.summary"
 >> >> +            srcFile="${kernel.test.dir}/reports/summary"/>
 >> >> +        <echo message=" 
***************************${line.separator}"/>
 >> >> +        <echo message="  *** Kernel tests status 
***${line.separator}"/>
 >> >> +        <echo message=" 
***************************${line.separator}"/>
 >> >> +        <echo message="${line.separator}"/>
 >> >> +        <echo message="${kernel.test.summary}"/>
 >> >> +        <echo message="${line.separator}"/>
 >> >> +        <echo>Please find detailed results under
 >> >> ${kernel.test.dir}/reports directory.</echo>
 >> >> +
 >> >> +        <condition property="kernel.failures">
 >> >> +            <contains string="${kernel.test.summary}"
 >> >> substring="FAILED" />
 >> >> +        </condition>
 >> >> +        <fail if="kernel.failures" message="There were test
 >> >> failures." />
 >> >> +    </target>
 >> >> +
 >> >> +    <target name="compile-kernel-test">
 >> >>         <mkdir dir="${test.resource.path}" />
 >> >>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
 >> >>             destdir="${test.resource.path}"
 >> >> @@ -111,177 +104,61 @@
 >> >>         <delete quiet="true" dir="${test.class.path}/notfound" />
 >> >>     </target>
 >> >>
 >> >> -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
 >> >> +    <target name="-prepare-kernel-test">
 >> >> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
 >> >> +        <mkdir dir="${kernel.test.dir}/reports" />
 >> >> +
 >> >>         <condition property="junit.jar" 
value="${junit.home}/junit.jar">
 >> >>             <isset property="junit.home" />
 >> >>         </condition>
 >> >> -        <property name="junit.jar"
 >> >> 
location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
 >> >> -        <if>
 >> >> -            <not>
 >> >> -                <available file="${junit.jar}"/>
 >> >> -            </not>
 >> >> -            <then>
 >> >> -                <echo>
 >> >> +        <property name="junit.jar"
 >> >> +
 >> >> 
location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
 >> >> +        <available file="${junit.jar}" property="junit.found"/>
 >> >> +        <fail unless="junit.found">
 >> >>                 ==============================================
 >> >>                 Please set the classpath of junit as follows:
 >> >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
 >> >>                 ==============================================
 >> >> -                </echo>
 >> >> -                <fail message="Kernel tests misconfigured" />
 >> >> -            </then>
 >> >> -        </if>
 >> >> -
 >> >> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
 >> >> -        <delete quiet="true" dir="${kernel.test.dir}/ref-reports" />
 >> >> -        <mkdir dir="${kernel.test.dir}/reports" />
 >> >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
 >> >> -
 >> >> +        </fail>
 >> >>     </target>
 >> >>
 >> >>     <target name="-run-kernel-test-batch">
 >> >> +        <propertycopy property="kernel.mode.name"
 >> >> from="${kernel.mode}.name" override="on"/>
 >> >> +        <propertycopy property="kernel.mode.switch"
 >> >> from="${kernel.mode}.switch" override="on"/>
 >> >> +        <echo>
 >> >> +        ==================================
 >> >> +        Run kernel tests using ${kernel.mode.name}
 >> >> +        ==================================
 >> >> +        </echo>
 >> >>         <property name="report.dir"
 >> >> -            location="${kernel.test.dir}/reports/batch.mode"/>
 >> >> + 
location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
 >> >>         <mkdir dir="${report.dir}" />
 >> >>
 >> >> -        <junit fork="yes" forkmode="once"
 >> >> timeout="${kernel.test.timeout}"
 >> >> -            haltonfailure="no" failureproperty="batch.failed"
 >> >> -            filtertrace="no" printsummary="on"
 >> >> -            jvm="${build.deploy.dir}/bin/java">
 >> >> -
 >> >> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
 >> >> +        <junit fork="yes" failureproperty="kernel.failed"
 >> >> +            filtertrace="no" printsummary="on" showoutput="off"
 >> >> +            haltonfailure="${kernel.test.failfast}"
 >> >> +            forkmode="${kernel.test.forkmode}"
 >> >> +            timeout="${kernel.test.timeout}"
 >> >> +            jvm="${test.jvm.exe}">
 >> >>
 >> >> -            <jvmarg 
value="-Dtest.resource.path=${test.resource.path}"/>
 >> >>             <jvmarg value="-Dvm.assert_dialog=0" />
 >> >> +            <jvmarg 
value="-Dtest.resource.path=${test.resource.path}"/>
 >> >> +            <jvmarg value="${kernel.mode.switch}" />
 >> >>             <jvmarg
 >> >> 
value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}"
 >> >> />
 >> >> -            <formatter type="brief"/>
 >> >> -            <batchtest todir="${report.dir}">
 >> >> +            <formatter type="xml"/>
 >> >> +            <batchtest todir="${report.dir}" unless="test.case">
 >> >>                 <fileset dir="${kernel.test.javasrc}">
 >> >>                     <patternset refid="kernel.test.java.pattern"/>
 >> >>                 </fileset>
 >> >>             </batchtest>
 >> >> +            <test name="${test.case}" todir="${report.dir}"
 >> >> if="test.case" />
 >> >>         </junit>
 >> >>
 >> >> -        <condition property="batch.status" value="FAILED" 
else="PASSED">
 >> >> -            <isset property="batch.failed" />
 >> >> +        <condition property="kernel.status" value="FAILED"
 >> >> else="PASSED">
 >> >> +            <isset property="kernel.failed" />
 >> >>         </condition>
 >> >> -    </target>
 >> >> -
 >> >> -
 >> >> -    <target name="-run-kernel-test">
 >> >> -        <echo>
 >> >> -               ==================================
 >> >> -               Run kernel tests using ${jit.or.interpreter}
 >> >> -               ==================================
 >> >> -               </echo>
 >> >> -
 >> >> -        <property name="report.dir"
 >> >> -
 >> >> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
 >> >> -        <mkdir dir="${report.dir}" />
 >> >> -
 >> >> -        <for param="test">
 >> >> -            <fileset dir="${kernel.test.javasrc}">
 >> >> -                <patternset refid="kernel.test.java.pattern" />
 >> >> -            </fileset>
 >> >> -            <sequential>
 >> >> -
 >> >> -                <basename property="last.dir"
 >> >> file="${kernel.test.javasrc}" />
 >> >> -                <propertyregex property="class.name" override="true"
 >> >> input="@{test}" regexp="(.)+${last.dir}\${file.separator}" replace=""
 >> >> defaultValue="@{test}" />
 >> >> -                <propertyregex property="class.name" override="true"
 >> >> input="${class.name}" regexp="\.java" replace=""
 >> >> defaultValue="${class.name}" />
 >> >> -                <propertyregex property="class.name" override="true"
 >> >> input="${class.name}" regexp="\${file.separator}" replace="."
 >> >> global="true" defaultValue="${class.name}" />
 >> >> -                <echo message="RUNNING : ${class.name}" />
 >> >> -
 >> >> -                <junit fork="yes" failureproperty="@{test}.failed"
 >> >> -                    timeout="${kernel.test.timeout}"
 >> >> newenvironment="yes" filtertrace="no"
 >> >> -                    jvm="${build.deploy.dir}/bin/java">
 >> >> -
 >> >> -                    <env key="JAVA_HOME" 
value="${build.deploy.dir}"/>
 >> >> -
 >> >> -                    <!--env key="LD_LIBRARY_PATH"
 >> >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
 >> >> -                    <env key="SYSTEMDRIVE" 
value="${env.SystemDrive}" />
 >> >> -                    <env key="HOME" value="${env.HOME}" />
 >> >> -                    <env key="PATH" value="${env.PATH}" />
 >> >> -                    <jvmarg
 >> >> value="-Dtest.resource.path=${test.resource.path}"/>
 >> >> -                    <jvmarg
 >> >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
 >> >> -                    <jvmarg 
value="-Demma.coverage.out.merge=true" />
 >> >> -                    <jvmarg
 >> >> 
value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${emma.jar}"
 >> >> />
 >> >> -                    <jvmarg
 >> >> value="-Dvm.use_verifier=${vm.use_verifier}" />
 >> >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
 >> >> -                    <jvmarg
 >> >> 
value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}"
 >> >> />
 >> >> -                    <jvmarg value="${int.or.jit.arg}" />
 >> >> -                    <jvmarg value="-ea:java.lang.reflect..." />
 >> >> -                    <formatter type="brief"/>
 >> >> -                    <formatter type="xml" />
 >> >> -                    <test name="${class.name}" 
todir="${report.dir}"/>
 >> >> -                </junit>
 >> >> -                <condition property="${jit.or.interpreter}.status"
 >> >> value="FAILED">
 >> >> -                    <isset property="@{test}.failed" />
 >> >> -                </condition>
 >> >> -
 >> >> -                <!--
 >> >> -                Gregory
 >> >> -                It appears that some kernel unit tests for drlvm
 >> >> classes are
 >> >> -                implementation specific and may fail on RI. So it
 >> >> makes no
 >> >> -                sense to check tests on RI. Also running test on RI
 >> >> -                right after it failed on drlvm creates wrong 
test run
 >> >> report.
 >> >> -
 >> >> -                I am commenting this block for now in case someone
 >> >> wants it
 >> >> -                back, possibly under some condition. My POV is 
that this
 >> >> -                block should be removed eventually.
 >> >> -                <if>
 >> >> -                    <or>
 >> >> -                        <isset property="@{test}.failed" />
 >> >> -                        <isset property="kernel.test.reference" />
 >> >> -                    </or>
 >> >> -                    <then>
 >> >> -                        <junit fork="yes"
 >> >> failureproperty="@{test}.ref.failed"
 >> >> -                            timeout="${kernel.test.timeout}"
 >> >> -                            newenvironment="yes" filtertrace="no">
 >> >> -
 >> >> -
 >> >> -                            <env key="JAVA_HOME"
 >> >> value="${build.deploy.dir}"/>
 >> >> -
 >> >> -                            <!- -env key="LD_LIBRARY_PATH"
 >> >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
 >> >> -                            <env key="SYSTEMDRIVE"
 >> >> value="${env.SystemDrive}" />
 >> >> -                            <env key="HOME" value="${env.HOME}" />
 >> >> -                            <env key="PATH" value="${env.PATH}" />
 >> >> -                            <jvmarg
 >> >> value="-Dtest.resource.path=${test.resource.path}"/>
 >> >> -                            <jvmarg
 >> >> 
value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}"
 >> >> />
 >> >> -                            <formatter type="brief"/>
 >> >> -                            <formatter type="xml" />
 >> >> -                            <test name="${class.name}"
 >> >> todir="${kernel.test.dir}/ref-reports"/>
 >> >> -                        </junit>
 >> >> -
 >> >> -                        <if>
 >> >> -                            <isset property="@{test}.ref.failed" />
 >> >> -                            <then>
 >> >> -                                <echo message="   **** FAILED on
 >> >> reference JRE ****" />
 >> >> -                            </then>
 >> >> -                        </if>
 >> >> -                    </then>
 >> >> -                </if>
 >> >> -                /-->
 >> >> -            </sequential>
 >> >> -        </for>
 >> >> -
 >> >> -        <junitreport todir="${report.dir}">
 >> >> -            <fileset dir="${report.dir}">
 >> >> -                <include name="TEST-*.xml" />
 >> >> -            </fileset>
 >> >> -            <report format="frames" todir="${report.dir}/html" />
 >> >> -        </junitreport>
 >> >> -        <junitreport todir="${kernel.test.dir}/ref-reports">
 >> >> -            <fileset dir="${kernel.test.dir}/ref-reports">
 >> >> -                <include name="TEST-*.xml" />
 >> >> -            </fileset>
 >> >> -            <report format="frames"
 >> >> todir="${kernel.test.dir}/ref-reports/html" />
 >> >> -        </junitreport>
 >> >> -        <property name="${jit.or.interpreter}.status" 
value="PASSED"/>
 >> >> -        <propertycopy name="status"
 >> >> from="${jit.or.interpreter}.status"/>
 >> >> -        <echo message="" />
 >> >> -        <echo
 >> >> message="==============================================" />
 >> >> -        <echo message="Kernel tests ${status} using
 >> >> ${jit.or.interpreter}. Please find the detailed results here:" />
 >> >> -        <echo
 >> >> 
message="${report.dir}${file.separator}html${file.separator}index.html"
 >> >> />
 >> >> -        <echo
 >> >> message="==============================================" />
 >> >>
 >> >> +        <concat append="on"
 >> >> destfile="${kernel.test.dir}/reports/summary"
 >> >> +            >      ${kernel.mode.name}
 >> >> ${kernel.status}${line.separator}</concat>
 >> >>     </target>
 >> >>  </project>
 >> >>
 >> >> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
 >> >> URL:
 >> >> 
http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
 >> >>
 >> >> 
==============================================================================
 >> >>
 >> >> --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
 >> >> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon 
Nov 20
 >> >> 03:27:39 2006
 >> >> @@ -0,0 +1,19 @@
 >> >> +kernel.test.mode=jet,opt,int
 >> >> +kernel.test.failfast=off
 >> >> +kernel.test.forkmode=once
 >> >> +kernel.test.timeout=360000
 >> >> +
 >> >> +
 >> >> +jit.name=Client mode JIT (default)
 >> >> +jit.switch=-Dbogus
 >> >> +
 >> >> +jet.name=jitrino.JET
 >> >> +jet.switch=-Xem:jet
 >> >> +
 >> >> +opt.name=jitrino.OPT
 >> >> +opt.switch=-Xem:opt
 >> >> +
 >> >> +int.name=interpreter
 >> >> +int.switch=-Xint
 >> >> +
 >> >> +
 >> >>
 >> >>
 >> >>
 >> >
 >>
 >


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
isn't that a setting in the test.properties file now?

Vladimir Ivanov wrote:
> By the way, could we increase vm kernel test timeout to do these tests 
> passed in the interpreter mode?
> Now is failed on the 1CPU P4*3GHz with message:
>      [exec]      [echo]         ==================================
>      [exec]      [echo]         Run kernel tests using interpreter
>      [exec]      [echo]         ==================================
>      [exec]      [echo]        
>      [exec]     [mkdir] Created dir: 
> /export/viv/trunk/cc/projects/drlvm/trunk/build/lnx_ia32_gcc_debug/semis/kernel.tests/reports/int.mode
>      [exec]     [junit] Running 
> org.apache.harmony.lang.generics.ClassLoaderTest
>      [exec]     [junit] Tests run: 21, Failures: 0, Errors: 0, Time 
> elapsed: 2.096 sec
>      [exec]     [junit] Tests run: 26, Failures: 0, Errors: 0, Time 
> elapsed: 1.137 sec
>      [exec]     [junit] Tests run: 15, Failures: 0, Errors: 0, Time 
> elapsed: 7.12 sec
>      [exec]     [junit] Tests run: 8, Failures: 0, Errors: 0, Time 
> elapsed: 105.573 sec
>      [exec]     [junit] Tests run: 3, Failures: 0, Errors: 0, Time 
> elapsed: 30.406 sec
>      [exec]     [junit] Tests run: 5, Failures: 0, Errors: 0, Time 
> elapsed: 60.607 sec
>      [exec]     [junit] Tests run: 3, Failures: 0, Errors: 0, Time 
> elapsed: 50.134 sec
>      [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0, Time 
> elapsed: 4.91 sec
>      [exec]     [junit] Tests run: 19, Failures: 0, Errors: 0, Time 
> elapsed: 2.728 sec
>      [exec]     [junit] Tests run: 1, Failures: 0, Errors: 1, Time 
> elapsed: 0 sec
>      [exec]     [junit] Tests FAILED (timeout)
> 
> 
>  
> On 11/21/06, *Vladimir Ivanov* <ivavladimir@gmail.com 
> <ma...@gmail.com>> wrote:
> 
> 
> 
>     On 11/21/06, *Geir Magnusson Jr.* <geir@pobox.com
>     <ma...@pobox.com> > wrote:
> 
>         1) Just windows?
> 
>      
>     The linux cycle is failed too but due to power outage :(
> 
>      
> 
>         2) Can we get a list of the commits since the last successful run?
> 
>      
>     modified tellison
>     /harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadLocalTest.java
>     modified tellison
>     /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
> 
>     modified gshimansky
>     /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
>     modified varlax
>     /harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>     added varlax /harmony/enhanced/drlvm/trunk/build/make/test.properties
>     modified varlax
>     /harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c
>      
>     I think it is a side effect of kernel.test.xml update (perTest -> once)
> 
>      
> 
>         3) can we get these messages posted to the commit@ list?
> 
>      
>     today I'll test it with 'dev' list too. Actually, I can't find the
>     reason while these notifications are not posted.
>      
> 
>         geir
> 
> 
>         Vladimir Ivanov wrote:
>         >  Today CC on windows failed to run DRLVM tests in the OPT mode
>         with message:
>         >
>         >     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0,
>         Time elapsed:
>         >  0.36 sec
>         >     [exec]     [junit] Tests run: 11, Failures: 0, Errors: 0,
>         Time elapsed:
>         >  0.032 sec
>         >
>         >     [exec]     [junit] An unhandled error (64) has occurred.
>         >     [exec]     [junit] HyGeneric_Signal_Number=00000040
>         >     [exec]     [junit] ExceptionCode=c0000024
>         >     [exec]     [junit] ExceptionAddress=7C964ED1
>         >     [exec]     [junit] ContextFlags=0001003f
>         >     [exec]     [junit] Handler1=00401010
>         >     [exec]     [junit] Handler2=11105D80
>         >     [exec]     [junit] EDI=0013EE34
>         >     [exec]     [junit] ESI=0013ED50
>         >     [exec]     [junit] EAX=0013ECE0
>         >     [exec]     [junit] EBX=26C1E508
>         >     [exec]     [junit] ECX=0013ED2C
>         >     [exec]     [junit] EDX=7C90EB94
>         >     [exec]     [junit] EIP=7C964ED1
>         >     [exec]     [junit] ESP=0013ECE0
>         >     [exec]     [junit] EBP=0013ED30
>         >     [exec]     [junit] Module=C:\WINDOWS\system32\ntdll.dll
>         >     [exec]     [junit] Module_base_address=7C900000
>         >     [exec]     [junit] Offset_in_DLL=00064ed1
>         >
>         >     [exec]     [junit] This application has requested the
>         Runtime to
>         >  terminate it in an unusual way.
>         >     [exec]     [junit] Please contact the application's support
>         team for
>         >  more information.
>         >     [exec]     [junit] Tests FAILED
>         >
>         >  Could somebody look on it?
>         >
>         >  Thanks, Vladimir
>         >
>         >
>         >  On 11/21/06, Alexey Varlamov < alexey.v.varlamov@gmail.com
>         <ma...@gmail.com>> wrote:
>         > >
>         > > 2006/11/21, Geir Magnusson Jr. <geir@pobox.com
>         <ma...@pobox.com> >:
>         > > >
>         > > >
>         > > > Alexey Varlamov wrote:
>         > > > > Folks,
>         > > > >
>         > > > > I've just did a little step in improving pre-commit
>         testing for
>         > > DRLVM;
>         > > > > most important change is a move from "perTest" forking
>         mode to "once"
>         > > > > (aka sameVM mode).
>         > > > > This reduces testing time drastically (~50%), but may
>         introduce some
>         > > > > extra instability (like new intermittent failures or
>         timeouts).
>         > > >
>         > > > Plus the inability to figure out what's screwing things up.
>         > > >
>         > > > I can't decide if I like this.  On one hand, I like it
>         because it's
>         > > > actually better to find side-effects - some test can pass,
>         but still
>         > > > leave the VM in a broken state that another test will show.
>         > > >
>         > > > OTOH, it does remove the clarity of each test being a
>         single, separate
>         > > > test.  It conceptually mixes integration testing with unit
>         testing.
>         > >
>         > > Well, initially purpose for the kernel tests *is* unit
>         testing and
>         > > AFAIU they were written with this in mind (with some exceptions
>         > > maybe). For conceptual purity we should re-group tests in the
>         first
>         > > place - drop some trivial smoke tests (or move to kernel if
>         > > appropriate) and extract some complex cases from kernel (
>         e.g. from
>         > > RuntimeTest or SystemExtensionTest).
>         > > So, I see no point to soothe ourselves with successful
>         "perTest" runs
>         > > if we know the same simple tests may fail in sameVM mode.
>         > >
>         > > >
>         > > > Can you please just add a switch?  That way in the event of
>         a failure,
>         > > > we can re-run with forking on, and therefore can tell if
>         the crash is
>         > > > specifically due to the test that is crashing, or a side
>         effect caused
>         > > > by something that came before.
>         > >
>         > > There is the switch: kernel.test.forkmode=[once|perTest].
>         > > I just assumed the keys are easily dediced from contents of the
>         > > test.properties , but probably should have announced them
>         explicitly.
>         > > OK, here they are with current defaults:
>         > >
>         > > kernel.test.mode=jet,opt,int     // list of EEs to run, as
>         configured
>         > > in the test.properties
>         > > kernel.test.failfast=off              // allows to abort testing
>         > > immediately after the first failure
>         > > kernel.test.forkmode=once     // [once|perTest]
>         > > kernel.test.timeout=360000
>         > >
>         > > > geir
>         > > >
>         > > >
>         > > >
>         > > > > Nevertheless I believe we are ready to accept this
>         challenge and
>         > > it is
>         > > > > important to take it earlier.
>         > > > > Other enhancements, are described below; hopefully will
>         make us more
>         > > > > productive. Have fun!
>         > > > >
>         > > > >
>         > > > > 2006/11/20, varlax@apache.org <ma...@apache.org>
>         <varlax@apache.org <ma...@apache.org>>:
>         > > > >> Author: varlax
>         > > > >> Date: Mon Nov 20 03:27:39 2006
>         > > > >> New Revision: 477149
>         > > > >>
>         > > > >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
>         <http://svn.apache.org/viewvc?view=rev&rev=477149>
>         > > > >> Log:
>         > > > >> Refactored kernel.test.xml, made it more "ant-minded"
>         and added some
>         > > > >> features:
>         > > > >> [+] "kernel.test.forkmode" support, "once" by default;
>         > > > >> [+] single "test.case" support;
>         > > > >> [+] "kernel.test.failfast " behaviour support;
>         > > > >> [!] Improved results reporting;
>         > > > >> [+] easy customization via property file;
>         > > > >>
>         > > > >> Some intermittent failures appeared on Win32 due to
>         forking only
>         > > > >> "once", but we must meet them sooner or later - why not
>         now...
>         > > > >>
>         > > > >> Added:
>         > > > >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
>         > > > >> Modified:
>         > > >
>          >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>         > > > >>
>         > > > >> Modified:
>         > > harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>         > > > >> URL:
>         > > > >>
>         > >
>         http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
>         <http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149>
>         > >
>         > > > >>
>         > > > >>
>         > >
>         ==============================================================================
> 
>         > >
>         > > > >>
>         > > > >> ---
>         harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>         > > > >> (original)
>         > > > >> +++
>         harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>         > > > >> Mon Nov 20 03:27:39 2006
>         > > > >> @@ -1,17 +1,18 @@
>         > > > >>  <!--
>         > > > >> -    Copyright 2006 The Apache Software Foundation or
>         its licensors,
>         > > > >> as applicable.
>         > > > >> -
>         > > > >> -    Licensed under the Apache License, Version 2.0 (the
>         "License");
>         > > > >> -    you may not use this file except in compliance with
>         the
>         > > License.
>         > > > >> -    You may obtain a copy of the License at
>         > > > >> -
>         > > > >> -       http://www.apache.org/licenses/LICENSE-2.0
>         <http://www.apache.org/licenses/LICENSE-2.0>
>         > > > >> -
>         > > > >> -    Unless required by applicable law or agreed to in
>         writing,
>         > > software
>         > > > >> -    distributed under the License is distributed on an
>         "AS IS"
>         > > BASIS,
>         > > > >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
>         either express or
>         > > > >> implied.
>         > > > >> -    See the License for the specific language governing
>         permissions
>         > > and
>         > > > >> -    limitations under the License.
>         > > > >> +     Licensed to the Apache Software Foundation (ASF)
>         under one or
>         > > more
>         > > > >> +     contributor license agreements.  See the NOTICE file
>         > > distributed
>         > > > >> with
>         > > > >> +     this work for additional information regarding
>         copyright
>         > > ownership.
>         > > > >> +     The ASF licenses this file to You under the Apache
>         License,
>         > > > >> Version 2.0
>         > > > >> +     (the "License"); you may not use this file except in
>         > > compliance
>         > > > >> with
>         > > > >> +     the License.  You may obtain a copy of the License at
>         > > > >> +
>         > > > >> +         http://www.apache.org/licenses/LICENSE-2.0
>         <http://www.apache.org/licenses/LICENSE-2.0>
>         > > > >> +
>         > > > >> +     Unless required by applicable law or agreed to in
>         writing,
>         > > software
>         > > > >> +     distributed under the License is distributed on an
>         "AS IS"
>         > > BASIS,
>         > > > >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
>         > > express or
>         > > > >> implied.
>         > > > >> +     See the License for the specific language governing
>         > > permissions
>         > > and
>         > > > >> +     limitations under the License.
>         > > > >>  -->
>         > > > >>
>         > > > >>  <project name="KERNEL TESTS">
>         > > > >> @@ -20,7 +21,9 @@
>         > > > >>     <property name=" kernel.test.dir"
>         > > > >> location="${build.semi.dir}/kernel.tests"/>
>         > > > >>     <property name=" test.resource.path"
>         > > > >> location="${ kernel.test.dir}/resources"/>
>         > > > >>     <property name="test.class.path"
>         > > > >> location="${ kernel.test.dir}/classes"/>
>         > > > >> -
>         > > > >> +
>         > > > >> +    <property name="test.jvm.exe" value="${build.deploy.dir
>         > > }/bin/java"/>
>         > > > >> +    <property file="test.properties "/>
>         > > > >>
>         > > > >>     <patternset id="kernel.test.java.pattern">
>         > > > >>         <include name="org/apache/harmony/**/*
>         Test.java" />
>         > > > >> @@ -36,68 +39,58 @@
>         > > > >>         <exclude
>         name="java/lang/RuntimeAdditionalTest40.java" />
>         > > > >>         <exclude
>         name="java/lang/RuntimeAdditionalTest41.java" />
>         > > > >>         <exclude
>         name="java/lang/RuntimeAdditionalTest42.java" />
>         > > > >> -
>         > > > >> -       <!-- This test fails -->
>         > > > >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
>         > > > >>     </patternset>
>         > > > >> -
>         > > > >> -    <property name="vm.use_verifier" value="1" />
>         > > > >> -    <property name=" kernel.test.timeout" value="360000" />
>         > > > >>
>         > > > >> -    <target name="kernel.test" depends="-pre-kernel-test">
>         > > > >> -        <property name=" test.mode" value="jet+opt+int" />
>         > > > >> -        <if>
>         > > > >> -            <contains string="${test.mode}"
>         substring="batch" />
>         > > > >> -            <then>
>         > > > >> -                <antcallback
>         target="-run-kernel-test-batch"
>         > > > >> -                    return="batch.status">
>         > > > >> -                </antcallback>
>         > > > >> -            </then>
>         > > > >> -        </if>
>         > > > >> -        <if>
>         > > > >> -            <contains string="${test.mode }"
>         substring="jet" />
>         > > > >> -            <then>
>         > > > >> -                <antcallback target="-run-kernel-test"
>         > > > >> -                    return=" jit.jet.status">
>         > > > >> -                    <param name="jit.or.interpreter"
>         > > > >> value="jitrino.jet" />
>         > > > >> -                    <param name=" int.or.jit.arg"
>         > > > >> value="-Dem.properties=jet" />
>         > > > >> -                </antcallback>
>         > > > >> -            </then>
>         > > > >> -        </if>
>         > > > >> -        <if>
>         > > > >> -            <contains string="${test.mode}"
>         substring="opt" />
>         > > > >> -            <then>
>         > > > >> -                <antcallback target="-run-kernel-test"
>         > > > >> -                    return="jit.opt.status">
>         > > > >> -                    <param name="jit.or.interpreter"
>         > > > >> value="jitrino.opt " />
>         > > > >> -                    <param name="int.or.jit.arg"
>         > > > >> value="-Dem.properties=opt" />
>         > > > >> -                </antcallback>
>         > > > >> -            </then>
>         > > > >> -        </if>
>         > > > >> -        <if>
>         > > > >> -            <contains string="${test.mode }"
>         substring="int" />
>         > > > >> -            <then>
>         > > > >> -                <antcallback target="-run-kernel-test"
>         > > > >> -                    return=" interpreter.status">
>         > > > >> -                    <param name="jit.or.interpreter"
>         > > > >> value="interpreter" />
>         > > > >> -                    <param name=" int.or.jit.arg"
>         value="-Xint" />
>         > > > >> -                </antcallback>
>         > > > >> -            </then>
>         > > > >> -        </if>
>         > > > >> -        <if>
>         > > > >> -            <or>
>         > > > >> -                <contains string="${jit.jet.status}"
>         > > > >> substring="FAILED" />
>         > > > >> -                <contains string="${ jit.opt.status}"
>         > > > >> substring="FAILED" />
>         > > > >> -                <contains string="${interpreter.status}"
>         > > > >> substring="FAILED" />
>         > > > >> -                <contains string="${batch.status}"
>         > > substring="FAILED" />
>         > > > >> -            </or>
>         > > > >> -            <then>
>         > > > >> -                <fail message="Kernel tests FAILED" />
>         > > > >> -            </then>
>         > > > >> -        </if>
>         > > > >> -    </target>
>         > > > >> +    <target name="kernel.test"
>         > > > >> +        depends="compile-kernel-test, run-kernel-test,
>         > > > >> report-kernel-test, check-kernel-test"/>
>         > > > >>
>         > > > >> -    <target name="compile-kernel-tests" depends="">
>         > > > >> +    <target name="run-kernel-test"
>         depends="-prepare-kernel-test">
>         > > > >> +        <condition property="kernel.test.continue"
>         value="true"
>         > > > >> else="false">
>         > > > >> +            <isfalse value="${ kernel.test.failfast}"/>
>         > > > >> +        </condition>
>         > > > >> +        <for list="${kernel.test.mode}" param="mode"
>         > > > >> +            trim="true" keepgoing="${
>         kernel.test.continue}">
>         > > > >> +            <sequential>
>         > > > >> +                <antcall target="-run-kernel-test-batch">
>         > > > >> +                    <param name=" kernel.mode"
>         value="@{mode}" />
>         > > > >> +                </antcall>
>         > > > >> +            </sequential>
>         > > > >> +        </for>
>         > > > >> +    </target>
>         > > > >> +
>         > > > >> +    <target name="report-kernel-test">
>         > > > >> +        <for list="${kernel.test.mode}" param="mode"
>         > > > >> +            trim="true" keepgoing="true">
>         > > > >> +            <sequential>
>         > > > >> +                <junitreport
>         > > > >> todir="${kernel.test.dir}/reports/@{mode}.mode">
>         > > > >> +                    <fileset
>         > > > >> dir="${kernel.test.dir}/reports/@{mode}.mode">
>         > > > >> +                        <include name="*.xml" />
>         > > > >> +                    </fileset>
>         > > > >> +                    <report format="frames"
>         > > > >> +
>         > > > >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
>         > > > >> +                </junitreport>
>         > > > >> +            </sequential>
>         > > > >> +        </for>
>         > > > >> +    </target>
>         > > > >> +
>         > > > >> +    <target name="check-kernel-test">
>         > > > >> +        <loadfile property="kernel.test.summary"
>         > > > >> +            srcFile="${kernel.test.dir}/reports/summary"/>
>         > > > >> +        <echo message="
>         > > ***************************${line.separator
>         > > }"/>
>         > > > >> +        <echo message="  *** Kernel tests status
>         > > ***${line.separator
>         > > }"/>
>         > > > >> +        <echo message="
>         > > ***************************${line.separator
>         > > }"/>
>         > > > >> +        <echo message="${line.separator}"/>
>         > > > >> +        <echo message="${kernel.test.summary}"/>
>         > > > >> +        <echo message="${line.separator}"/>
>         > > > >> +        <echo>Please find detailed results under
>         > > > >> ${kernel.test.dir}/reports directory.</echo>
>         > > > >> +
>         > > > >> +        <condition property="kernel.failures">
>         > > > >> +            <contains string="${ kernel.test.summary}"
>         > > > >> substring="FAILED" />
>         > > > >> +        </condition>
>         > > > >> +        <fail if="kernel.failures" message="There were
>         test
>         > > > >> failures." />
>         > > > >> +    </target>
>         > > > >> +
>         > > > >> +    <target name="compile-kernel-test">
>         > > > >>         <mkdir dir="${ test.resource.path}" />
>         > > > >>         <javac
>         srcdir="${kernel.test.javasrc}/../kernel_resources"
>         > > > >>             destdir="${test.resource.path}"
>         > > > >> @@ -111,177 +104,61 @@
>         > > > >>         <delete quiet="true"
>         dir="${test.class.path}/notfound" />
>         > > > >>     </target>
>         > > > >>
>         > > > >> -    <target name="-pre-kernel-test"
>         depends="compile-kernel-tests">
>         > > > >> +    <target name="-prepare-kernel-test">
>         > > > >> +        <delete quiet="true" dir="${
>         kernel.test.dir}/reports" />
>         > > > >> +        <mkdir dir="${kernel.test.dir}/reports" />
>         > > > >> +
>         > > > >>         <condition property=" junit.jar" value="${junit.home
>         > > }/junit.jar">
>         > > > >>             <isset property="junit.home" />
>         > > > >>         </condition>
>         > > > >> -        <property name=" junit.jar"
>         > > > >> location="${external.dep.CLASSLIB
>         > > }/depends/jars/junit_3.8.2/junit.jar"/>
>         > > > >> -        <if>
>         > > > >> -            <not>
>         > > > >> -                <available file="${junit.jar}"/>
>         > > > >> -            </not>
>         > > > >> -            <then>
>         > > > >> -                <echo>
>         > > > >> +        <property name="junit.jar"
>         > > > >> +
>         > > > >> location="${external.dep.CLASSLIB
>         > > }/depends/jars/junit_3.8.2/junit.jar"/>
>         > > > >> +        <available file="${junit.jar}"
>         property="junit.found"/>
>         > > > >> +        <fail unless="junit.found">
>         > > > >>                
>         ==============================================
>         > > > >>                 Please set the classpath of junit as
>         follows:
>         > > > >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
>         > > > >>                
>         ==============================================
>         > > > >> -                </echo>
>         > > > >> -                <fail message="Kernel tests
>         misconfigured" />
>         > > > >> -            </then>
>         > > > >> -        </if>
>         > > > >> -
>         > > > >> -        <delete quiet="true"
>         dir="${kernel.test.dir}/reports" />
>         > > > >> -        <delete quiet="true"
>         > > dir="${ kernel.test.dir}/ref-reports" />
>         > > > >> -        <mkdir dir="${kernel.test.dir}/reports" />
>         > > > >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
>         > > > >> -
>         > > > >> +        </fail>
>         > > > >>     </target>
>         > > > >>
>         > > > >>     <target name="-run-kernel-test-batch">
>         > > > >> +        <propertycopy property="kernel.mode.name
>         <http://kernel.mode.name/>"
>         > > > >> from="${ kernel.mode}.name" override="on"/>
>         > > > >> +        <propertycopy property="kernel.mode.switch"
>         > > > >> from="${kernel.mode}.switch" override="on"/>
>         > > > >> +        <echo>
>         > > > >> +        ==================================
>         > > > >> +        Run kernel tests using ${ kernel.mode.name
>         <http://kernel.mode.name/>}
>         > > > >> +        ==================================
>         > > > >> +        </echo>
>         > > > >>         <property name="report.dir"
>         > > > >> -            location="${
>         kernel.test.dir}/reports/batch.mode"/>
>         > > > >>
>         +            location="${kernel.test.dir}/reports/${kernel.mode
>         > > }.mode"/>
>         > > > >>         <mkdir dir="${ report.dir}" />
>         > > > >>
>         > > > >> -        <junit fork="yes" forkmode="once"
>         > > > >> timeout="${kernel.test.timeout}"
>         > > > >> -            haltonfailure="no" failureproperty="
>         batch.failed"
>         > > > >> -            filtertrace="no" printsummary="on"
>         > > > >> -            jvm="${build.deploy.dir}/bin/java">
>         > > > >> -
>         > > > >> -            <env key="JAVA_HOME"
>         value="${build.deploy.dir}"/>
>         > > > >> +        <junit fork="yes" failureproperty="kernel.failed"
>         > > > >> +            filtertrace="no" printsummary="on"
>         showoutput="off"
>         > > > >> +            haltonfailure="${kernel.test.failfast}"
>         > > > >> +            forkmode="${ kernel.test.forkmode}"
>         > > > >> +            timeout="${kernel.test.timeout}"
>         > > > >> +            jvm="${test.jvm.exe}">
>         > > > >>
>         > > > >> -            <jvmarg value="-
>         > > Dtest.resource.path=${test.resource.path}"/>
>         > > > >>             <jvmarg value="-Dvm.assert_dialog=0" />
>         > > > >> +            <jvmarg value="-
>         > > Dtest.resource.path=${test.resource.path}"/>
>         > > > >> +            <jvmarg value="${kernel.mode.switch}" />
>         > > > >>             <jvmarg
>         > > > >> value="-Xbootclasspath/a:${ junit.jar}${path.separator}${
>         > > test.class.path}"
>         > > > >> />
>         > > > >> -            <formatter type="brief"/>
>         > > > >> -            <batchtest todir="${ report.dir}">
>         > > > >> +            <formatter type="xml"/>
>         > > > >> +            <batchtest todir="${report.dir}"
>         unless="test.case">
>         > > > >>                 <fileset dir="${kernel.test.javasrc}">
>         > > > >>                     <patternset
>         refid="kernel.test.java.pattern"/>
>         > > > >>                 </fileset>
>         > > > >>             </batchtest>
>         > > > >> +            <test name="${test.case}" todir="${report.dir}"
>         > > > >> if="test.case" />
>         > > > >>         </junit>
>         > > > >>
>         > > > >> -        <condition property="batch.status" value="FAILED"
>         > > else="PASSED">
>         > > > >> -            <isset property="batch.failed" />
>         > > > >> +        <condition property="kernel.status" value="FAILED"
>         > > > >> else="PASSED">
>         > > > >> +            <isset property="kernel.failed" />
>         > > > >>         </condition>
>         > > > >> -    </target>
>         > > > >> -
>         > > > >> -
>         > > > >> -    <target name="-run-kernel-test">
>         > > > >> -        <echo>
>         > > > >> -               ==================================
>         > > > >> -               Run kernel tests using ${jit.or.interpreter}
>         > > > >> -               ==================================
>         > > > >> -               </echo>
>         > > > >> -
>         > > > >> -        <property name="report.dir"
>         > > > >> -
>         > > > >>
>         location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
>         > > > >> -        <mkdir dir="${report.dir}" />
>         > > > >> -
>         > > > >> -        <for param="test">
>         > > > >> -            <fileset dir="${ kernel.test.javasrc}">
>         > > > >> -                <patternset
>         refid="kernel.test.java.pattern" />
>         > > > >> -            </fileset>
>         > > > >> -            <sequential>
>         > > > >> -
>         > > > >> -                <basename property="last.dir"
>         > > > >> file="${kernel.test.javasrc}" />
>         > > > >> -                <propertyregex property=" class.name
>         <http://class.name/>"
>         > > override="true"
>         > > > >> input="@{test}" regexp="(.)+${ last.dir}\${file.separator}"
>         > > replace=""
>         > > > >> defaultValue="@{test}" />
>         > > > >> -                <propertyregex property=" class.name
>         <http://class.name/>"
>         > > override="true"
>         > > > >> input="${class.name <http://class.name/>}"
>         regexp="\.java" replace=""
>         > > > >> defaultValue="${class.name <http://class.name/>}" />
>         > > > >> -                <propertyregex property=" class.name
>         <http://class.name/>"
>         > > override="true"
>         > > > >> input="${ class.name <http://class.name/>}"
>         regexp="\${file.separator}" replace="."
>         > > > >> global="true" defaultValue="${ class.name
>         <http://class.name/> }" />
>         > > > >> -                <echo message="RUNNING : ${class.name
>         <http://class.name/> }" />
>         > > > >> -
>         > > > >> -                <junit fork="yes"
>         failureproperty="@{test}.failed"
>         > > > >> -                    timeout="${ kernel.test.timeout}"
>         > > > >> newenvironment="yes" filtertrace="no"
>         > > > >> -                    jvm="${ build.deploy.dir}/bin/java">
>         > > > >> -
>         > > > >> -                    <env key="JAVA_HOME"
>         value="${build.deploy.dir
>         > > }"/>
>         > > > >> -
>         > > > >> -                    <!--env key="LD_LIBRARY_PATH"
>         > > > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
>         > > > >> -                    <env key="SYSTEMDRIVE"
>         > > value="${env.SystemDrive }"
>         > > />
>         > > > >> -                    <env key="HOME" value="${env.HOME}" />
>         > > > >> -                    <env key="PATH" value="${ env.PATH}" />
>         > > > >> -                    <jvmarg
>         > > > >> value="-Dtest.resource.path=${test.resource.path}"/>
>         > > > >> -                    <jvmarg
>         > > > >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
>         > > > >> -                    <jvmarg
>         value="-Demma.coverage.out.merge=true"
>         > > />
>         > > > >> -                    <jvmarg
>         > > > >>
>         value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${
>         > > emma.jar}"
>         > > > >> />
>         > > > >> -                    <jvmarg
>         > > > >> value="-Dvm.use_verifier=${vm.use_verifier}" />
>         > > > >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
>         > > > >> -                    <jvmarg
>         > > > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
>         > > test.class.path}"
>         > > > >> />
>         > > > >> -                    <jvmarg value="${ int.or.jit.arg}" />
>         > > > >> -                    <jvmarg
>         value="-ea:java.lang.reflect..." />
>         > > > >> -                    <formatter type="brief"/>
>         > > > >> -                    <formatter type="xml" />
>         > > > >> -                    <test name="${ class.name
>         <http://class.name/>}" todir="${ report.dir
>         > > }"/>
>         > > > >> -                </junit>
>         > > > >> -                <condition
>         property="${jit.or.interpreter }.status"
>         > > > >> value="FAILED">
>         > > > >> -                    <isset property="@{test}.failed" />
>         > > > >> -                </condition>
>         > > > >> -
>         > > > >> -                <!--
>         > > > >> -                Gregory
>         > > > >> -                It appears that some kernel unit tests
>         for drlvm
>         > > > >> classes are
>         > > > >> -                implementation specific and may fail on
>         RI. So it
>         > > > >> makes no
>         > > > >> -                sense to check tests on RI. Also
>         running test on RI
>         > > > >> -                right after it failed on drlvm creates
>         wrong test
>         > > run
>         > > > >> report.
>         > > > >> -
>         > > > >> -                I am commenting this block for now in
>         case someone
>         > > > >> wants it
>         > > > >> -                back, possibly under some condition. My
>         POV is that
>         > > this
>         > > > >> -                block should be removed eventually.
>         > > > >> -                <if>
>         > > > >> -                    <or>
>         > > > >> -                        <isset
>         property="@{test}.failed" />
>         > > > >> -                        <isset property="
>         kernel.test.reference" />
>         > > > >> -                    </or>
>         > > > >> -                    <then>
>         > > > >> -                        <junit fork="yes"
>         > > > >> failureproperty="@{test}.ref.failed"
>         > > > >> -                            timeout="${
>         kernel.test.timeout}"
>         > > > >> -                            newenvironment="yes"
>         filtertrace="no">
>         > > > >> -
>         > > > >> -
>         > > > >> -                            <env key="JAVA_HOME"
>         > > > >> value="${build.deploy.dir}"/>
>         > > > >> -
>         > > > >> -                            <!- -env key="LD_LIBRARY_PATH"
>         > > > >> value="${ build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}"
>         /- ->
>         > > > >> -                            <env key="SYSTEMDRIVE"
>         > > > >> value="${env.SystemDrive}" />
>         > > > >> -                            <env key="HOME"
>         value="${env.HOME}" />
>         > > > >> -                            <env key="PATH" value="${
>         env.PATH }" />
>         > > > >> -                            <jvmarg
>         > > > >> value="-Dtest.resource.path=${test.resource.path}"/>
>         > > > >> -                            <jvmarg
>         > > > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
>         > > test.class.path}"
>         > > > >> />
>         > > > >> -                            <formatter type="brief"/>
>         > > > >> -                            <formatter type="xml" />
>         > > > >> -                            <test name="${ class.name
>         <http://class.name/>}"
>         > > > >> todir="${kernel.test.dir}/ref-reports"/>
>         > > > >> -                        </junit>
>         > > > >> -
>         > > > >> -                        <if>
>         > > > >> -                            <isset
>         property="@{test}.ref.failed" />
>         > > > >> -                            <then>
>         > > > >> -                                <echo message="   ****
>         FAILED on
>         > > > >> reference JRE ****" />
>         > > > >> -                            </then>
>         > > > >> -                        </if>
>         > > > >> -                    </then>
>         > > > >> -                </if>
>         > > > >> -                /-->
>         > > > >> -            </sequential>
>         > > > >> -        </for>
>         > > > >> -
>         > > > >> -        <junitreport todir="${report.dir}">
>         > > > >> -            <fileset dir="${report.dir}">
>         > > > >> -                <include name="TEST-*.xml" />
>         > > > >> -            </fileset>
>         > > > >> -            <report format="frames"
>         todir="${report.dir}/html" />
>         > > > >> -        </junitreport>
>         > > > >> -        <junitreport
>         todir="${kernel.test.dir}/ref-reports">
>         > > > >> -            <fileset dir="${kernel.test.dir}/ref-reports">
>         > > > >> -                <include name="TEST-*.xml" />
>         > > > >> -            </fileset>
>         > > > >> -            <report format="frames"
>         > > > >> todir="${kernel.test.dir}/ref-reports/html" />
>         > > > >> -        </junitreport>
>         > > > >> -        <property name="${jit.or.interpreter}.status"
>         > > value="PASSED"/>
>         > > > >> -        <propertycopy name="status"
>         > > > >> from="${jit.or.interpreter}.status"/>
>         > > > >> -        <echo message="" />
>         > > > >> -        <echo
>         > > > >> message="==============================================" />
>         > > > >> -        <echo message="Kernel tests ${status} using
>         > > > >> ${jit.or.interpreter}. Please find the detailed results
>         here:" />
>         > > > >> -        <echo
>         > > > >> message="${report.dir}${file.separator}html${file.separator
>         > > }index.html"
>         > > > >> />
>         > > > >> -        <echo
>         > > > >> message="==============================================" />
>         > > > >>
>         > > > >> +        <concat append="on"
>         > > > >> destfile="${kernel.test.dir}/reports/summary"
>         > > > >> +            >      ${ kernel.mode.name
>         <http://kernel.mode.name/>}
>         > > > >> ${kernel.status}${line.separator}</concat>
>         > > > >>     </target>
>         > > > >>  </project>
>         > > > >>
>         > > > >> Added:
>         harmony/enhanced/drlvm/trunk/build/make/test.properties
>         > > > >> URL:
>         > > > >>
>         > >
>         http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
>         <http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149>
>         > >
>         > > > >>
>         > > > >>
>         > >
>         ==============================================================================
> 
>         > >
>         > > > >>
>         > > > >> ---
>         harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
>         > > > >> +++
>         harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov
>         > > 20
>         > > > >> 03:27:39 2006
>         > > > >> @@ -0,0 +1,19 @@
>         > > > >> +kernel.test.mode=jet,opt,int
>         > > > >> +kernel.test.failfast=off
>         > > > >> +kernel.test.forkmode=once
>         > > > >> +kernel.test.timeout=360000
>         > > > >> +
>         > > > >> +
>         > > > >> +jit.name=Client mode JIT (default)
>         > > > >> +jit.switch=-Dbogus
>         > > > >> +
>         > > > >> +jet.name=jitrino.JET
>         > > > >> +jet.switch=-Xem:jet
>         > > > >> +
>         > > > >> +opt.name= jitrino.OPT
>         > > > >> +opt.switch=-Xem:opt
>         > > > >> +
>         > > > >> +int.name=interpreter
>         > > > >> +int.switch=-Xint
>         > > > >> +
>         > > > >> +
>         > > > >>
>         > > > >>
>         > > > >>
>         > > > >
>         > > >
>         > >
>         >
> 
> 
> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Vladimir Ivanov <iv...@gmail.com>.
By the way, could we increase vm kernel test timeout to do these tests
passed in the interpreter mode?
Now is failed on the 1CPU P4*3GHz with message:
     [exec]      [echo]         ==================================
     [exec]      [echo]         Run kernel tests using interpreter
     [exec]      [echo]         ==================================
     [exec]      [echo]
     [exec]     [mkdir] Created dir:
/export/viv/trunk/cc/projects/drlvm/trunk/build/lnx_ia32_gcc_debug/semis/kernel.tests/reports/int.mode
     [exec]     [junit] Running
org.apache.harmony.lang.generics.ClassLoaderTest
     [exec]     [junit] Tests run: 21, Failures: 0, Errors: 0, Time elapsed:
2.096 sec
     [exec]     [junit] Tests run: 26, Failures: 0, Errors: 0, Time elapsed:
1.137 sec
     [exec]     [junit] Tests run: 15, Failures: 0, Errors: 0, Time elapsed:
7.12 sec
     [exec]     [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed:
105.573 sec
     [exec]     [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed:
30.406 sec
     [exec]     [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed:
60.607 sec
     [exec]     [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed:
50.134 sec
     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
4.91 sec
     [exec]     [junit] Tests run: 19, Failures: 0, Errors: 0, Time elapsed:
2.728 sec
     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed:
0 sec
     [exec]     [junit] Tests FAILED (timeout)



On 11/21/06, Vladimir Ivanov <iv...@gmail.com> wrote:
>
>
>
> On 11/21/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>
> > 1) Just windows?
>
>
> The linux cycle is failed too but due to power outage :(
>
>
>
> > 2) Can we get a list of the commits since the last successful run?
>
>
> modified tellison
> /harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadLocalTest.java
> modified tellison
> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
>
> modified gshimansky
> /harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
> modified varlax
> /harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> added varlax /harmony/enhanced/drlvm/trunk/build/make/test.properties
> modified varlax
> /harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c
> I think it is a side effect of kernel.test.xml update (perTest -> once)
>
>
>
> > 3) can we get these messages posted to the commit@ list?
>
>
> today I'll test it with 'dev' list too. Actually, I can't find the reason
> while these notifications are not posted.
>
>
> geir
> >
> >
> > Vladimir Ivanov wrote:
> > > Today CC on windows failed to run DRLVM tests in the OPT mode with
> > message:
> > >
> > >     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0, Time
> > elapsed:
> > > 0.36 sec
> > >     [exec]     [junit] Tests run: 11, Failures: 0, Errors: 0, Time
> > elapsed:
> > > 0.032 sec
> > >
> > >     [exec]     [junit] An unhandled error (64) has occurred.
> > >     [exec]     [junit] HyGeneric_Signal_Number=00000040
> > >     [exec]     [junit] ExceptionCode=c0000024
> > >     [exec]     [junit] ExceptionAddress=7C964ED1
> > >     [exec]     [junit] ContextFlags=0001003f
> > >     [exec]     [junit] Handler1=00401010
> > >     [exec]     [junit] Handler2=11105D80
> > >     [exec]     [junit] EDI=0013EE34
> > >     [exec]     [junit] ESI=0013ED50
> > >     [exec]     [junit] EAX=0013ECE0
> > >     [exec]     [junit] EBX=26C1E508
> > >     [exec]     [junit] ECX=0013ED2C
> > >     [exec]     [junit] EDX=7C90EB94
> > >     [exec]     [junit] EIP=7C964ED1
> > >     [exec]     [junit] ESP=0013ECE0
> > >     [exec]     [junit] EBP=0013ED30
> > >     [exec]     [junit] Module=C:\WINDOWS\system32\ntdll.dll
> > >     [exec]     [junit] Module_base_address=7C900000
> > >     [exec]     [junit] Offset_in_DLL=00064ed1
> > >
> > >     [exec]     [junit] This application has requested the Runtime to
> > > terminate it in an unusual way.
> > >     [exec]     [junit] Please contact the application's support team
> > for
> > > more information.
> > >     [exec]     [junit] Tests FAILED
> > >
> > > Could somebody look on it?
> > >
> > > Thanks, Vladimir
> > >
> > >
> > > On 11/21/06, Alexey Varlamov < alexey.v.varlamov@gmail.com> wrote:
> > >>
> > >> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> > >> >
> > >> >
> > >> > Alexey Varlamov wrote:
> > >> > > Folks,
> > >> > >
> > >> > > I've just did a little step in improving pre-commit testing for
> > >> DRLVM;
> > >> > > most important change is a move from "perTest" forking mode to
> > "once"
> > >> > > (aka sameVM mode).
> > >> > > This reduces testing time drastically (~50%), but may introduce
> > some
> > >> > > extra instability (like new intermittent failures or timeouts).
> > >> >
> > >> > Plus the inability to figure out what's screwing things up.
> > >> >
> > >> > I can't decide if I like this.  On one hand, I like it because it's
> > >> > actually better to find side-effects - some test can pass, but
> > still
> > >> > leave the VM in a broken state that another test will show.
> > >> >
> > >> > OTOH, it does remove the clarity of each test being a single,
> > separate
> > >> > test.  It conceptually mixes integration testing with unit testing.
> >
> > >>
> > >> Well, initially purpose for the kernel tests *is* unit testing and
> > >> AFAIU they were written with this in mind (with some exceptions
> > >> maybe). For conceptual purity we should re-group tests in the first
> > >> place - drop some trivial smoke tests (or move to kernel if
> > >> appropriate) and extract some complex cases from kernel (e.g. from
> > >> RuntimeTest or SystemExtensionTest).
> > >> So, I see no point to soothe ourselves with successful "perTest" runs
> >
> > >> if we know the same simple tests may fail in sameVM mode.
> > >>
> > >> >
> > >> > Can you please just add a switch?  That way in the event of a
> > failure,
> > >> > we can re-run with forking on, and therefore can tell if the crash
> > is
> > >> > specifically due to the test that is crashing, or a side effect
> > caused
> > >> > by something that came before.
> > >>
> > >> There is the switch: kernel.test.forkmode=[once|perTest].
> > >> I just assumed the keys are easily dediced from contents of the
> > >> test.properties, but probably should have announced them explicitly.
> > >> OK, here they are with current defaults:
> > >>
> > >> kernel.test.mode=jet,opt,int     // list of EEs to run, as configured
> > >> in the test.properties
> > >> kernel.test.failfast=off              // allows to abort testing
> > >> immediately after the first failure
> > >> kernel.test.forkmode=once     // [once|perTest]
> > >> kernel.test.timeout=360000
> > >>
> > >> > geir
> > >> >
> > >> >
> > >> >
> > >> > > Nevertheless I believe we are ready to accept this challenge and
> > >> it is
> > >> > > important to take it earlier.
> > >> > > Other enhancements, are described below; hopefully will make us
> > more
> > >> > > productive. Have fun!
> > >> > >
> > >> > >
> > >> > > 2006/11/20, varlax@apache.org <va...@apache.org>:
> > >> > >> Author: varlax
> > >> > >> Date: Mon Nov 20 03:27:39 2006
> > >> > >> New Revision: 477149
> > >> > >>
> > >> > >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
> > >> > >> Log:
> > >> > >> Refactored kernel.test.xml, made it more "ant-minded" and added
> > some
> > >> > >> features:
> > >> > >> [+] "kernel.test.forkmode" support, "once" by default;
> > >> > >> [+] single "test.case" support;
> > >> > >> [+] "kernel.test.failfast " behaviour support;
> > >> > >> [!] Improved results reporting;
> > >> > >> [+] easy customization via property file;
> > >> > >>
> > >> > >> Some intermittent failures appeared on Win32 due to forking only
> >
> > >> > >> "once", but we must meet them sooner or later - why not now...
> > >> > >>
> > >> > >> Added:
> > >> > >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
> > >> > >> Modified:
> > >> >
> > >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> > >>
> > >> > >> Modified:
> > >> harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> > >> URL:
> > >> > >>
> > >>
> > http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
> > >>
> > >> > >>
> > >> > >>
> > >>
> > ==============================================================================
> >
> > >>
> > >> > >>
> > >> > >> ---
> > harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> > >> (original)
> > >> > >> +++
> > harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> > >> Mon Nov 20 03:27:39 2006
> > >> > >> @@ -1,17 +1,18 @@
> > >> > >>  <!--
> > >> > >> -    Copyright 2006 The Apache Software Foundation or its
> > licensors,
> > >> > >> as applicable.
> > >> > >> -
> > >> > >> -    Licensed under the Apache License, Version 2.0 (the
> > "License");
> > >> > >> -    you may not use this file except in compliance with the
> > >> License.
> > >> > >> -    You may obtain a copy of the License at
> > >> > >> -
> > >> > >> -       http://www.apache.org/licenses/LICENSE-2.0
> > >> > >> -
> > >> > >> -    Unless required by applicable law or agreed to in writing,
> > >> software
> > >> > >> -    distributed under the License is distributed on an "AS IS"
> > >> BASIS,
> > >> > >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
> > express or
> > >> > >> implied.
> > >> > >> -    See the License for the specific language governing
> > permissions
> > >> and
> > >> > >> -    limitations under the License.
> > >> > >> +     Licensed to the Apache Software Foundation (ASF) under one
> > or
> > >> more
> > >> > >> +     contributor license agreements.  See the NOTICE file
> > >> distributed
> > >> > >> with
> > >> > >> +     this work for additional information regarding copyright
> > >> ownership.
> > >> > >> +     The ASF licenses this file to You under the Apache
> > License,
> > >> > >> Version 2.0
> > >> > >> +     (the "License"); you may not use this file except in
> > >> compliance
> > >> > >> with
> > >> > >> +     the License.  You may obtain a copy of the License at
> > >> > >> +
> > >> > >> +         http://www.apache.org/licenses/LICENSE-2.0
> > >> > >> +
> > >> > >> +     Unless required by applicable law or agreed to in writing,
> >
> > >> software
> > >> > >> +     distributed under the License is distributed on an "AS IS"
> > >> BASIS,
> > >> > >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
> > >> express or
> > >> > >> implied.
> > >> > >> +     See the License for the specific language governing
> > >> permissions
> > >> and
> > >> > >> +     limitations under the License.
> > >> > >>  -->
> > >> > >>
> > >> > >>  <project name="KERNEL TESTS">
> > >> > >> @@ -20,7 +21,9 @@
> > >> > >>     <property name=" kernel.test.dir"
> > >> > >> location="${build.semi.dir}/kernel.tests"/>
> > >> > >>     <property name="test.resource.path"
> > >> > >> location="${ kernel.test.dir}/resources"/>
> > >> > >>     <property name="test.class.path"
> > >> > >> location="${kernel.test.dir}/classes"/>
> > >> > >> -
> > >> > >> +
> > >> > >> +    <property name="test.jvm.exe" value="${build.deploy.dir
> > >> }/bin/java"/>
> > >> > >> +    <property file="test.properties "/>
> > >> > >>
> > >> > >>     <patternset id="kernel.test.java.pattern">
> > >> > >>         <include name="org/apache/harmony/**/*Test.java" />
> > >> > >> @@ -36,68 +39,58 @@
> > >> > >>         <exclude name="java/lang/RuntimeAdditionalTest40.java"
> > />
> > >> > >>         <exclude name="java/lang/RuntimeAdditionalTest41.java"
> > />
> > >> > >>         <exclude name="java/lang/RuntimeAdditionalTest42.java"
> > />
> > >> > >> -
> > >> > >> -       <!-- This test fails -->
> > >> > >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
> > >> > >>     </patternset>
> > >> > >> -
> > >> > >> -    <property name="vm.use_verifier" value="1" />
> > >> > >> -    <property name=" kernel.test.timeout" value="360000" />
> > >> > >>
> > >> > >> -    <target name="kernel.test" depends="-pre-kernel-test">
> > >> > >> -        <property name=" test.mode" value="jet+opt+int" />
> > >> > >> -        <if>
> > >> > >> -            <contains string="${test.mode}" substring="batch"
> > />
> > >> > >> -            <then>
> > >> > >> -                <antcallback target="-run-kernel-test-batch"
> > >> > >> -                    return="batch.status">
> > >> > >> -                </antcallback>
> > >> > >> -            </then>
> > >> > >> -        </if>
> > >> > >> -        <if>
> > >> > >> -            <contains string="${test.mode }" substring="jet" />
> > >> > >> -            <then>
> > >> > >> -                <antcallback target="-run-kernel-test"
> > >> > >> -                    return=" jit.jet.status">
> > >> > >> -                    <param name="jit.or.interpreter"
> > >> > >> value="jitrino.jet" />
> > >> > >> -                    <param name=" int.or.jit.arg"
> > >> > >> value="-Dem.properties=jet" />
> > >> > >> -                </antcallback>
> > >> > >> -            </then>
> > >> > >> -        </if>
> > >> > >> -        <if>
> > >> > >> -            <contains string="${test.mode}" substring="opt" />
> > >> > >> -            <then>
> > >> > >> -                <antcallback target="-run-kernel-test"
> > >> > >> -                    return="jit.opt.status">
> > >> > >> -                    <param name="jit.or.interpreter"
> > >> > >> value="jitrino.opt " />
> > >> > >> -                    <param name="int.or.jit.arg"
> > >> > >> value="-Dem.properties=opt" />
> > >> > >> -                </antcallback>
> > >> > >> -            </then>
> > >> > >> -        </if>
> > >> > >> -        <if>
> > >> > >> -            <contains string="${test.mode }" substring="int" />
> > >> > >> -            <then>
> > >> > >> -                <antcallback target="-run-kernel-test"
> > >> > >> -                    return=" interpreter.status">
> > >> > >> -                    <param name="jit.or.interpreter"
> > >> > >> value="interpreter" />
> > >> > >> -                    <param name=" int.or.jit.arg" value="-Xint"
> > />
> > >> > >> -                </antcallback>
> > >> > >> -            </then>
> > >> > >> -        </if>
> > >> > >> -        <if>
> > >> > >> -            <or>
> > >> > >> -                <contains string="${jit.jet.status}"
> > >> > >> substring="FAILED" />
> > >> > >> -                <contains string="${ jit.opt.status}"
> > >> > >> substring="FAILED" />
> > >> > >> -                <contains string="${interpreter.status}"
> > >> > >> substring="FAILED" />
> > >> > >> -                <contains string="${batch.status}"
> > >> substring="FAILED" />
> > >> > >> -            </or>
> > >> > >> -            <then>
> > >> > >> -                <fail message="Kernel tests FAILED" />
> > >> > >> -            </then>
> > >> > >> -        </if>
> > >> > >> -    </target>
> > >> > >> +    <target name="kernel.test"
> > >> > >> +        depends="compile-kernel-test, run-kernel-test,
> > >> > >> report-kernel-test, check-kernel-test"/>
> > >> > >>
> > >> > >> -    <target name="compile-kernel-tests" depends="">
> > >> > >> +    <target name="run-kernel-test"
> > depends="-prepare-kernel-test">
> > >> > >> +        <condition property="kernel.test.continue" value="true"
> > >> > >> else="false">
> > >> > >> +            <isfalse value="${ kernel.test.failfast}"/>
> > >> > >> +        </condition>
> > >> > >> +        <for list="${kernel.test.mode}" param="mode"
> > >> > >> +            trim="true" keepgoing="${ kernel.test.continue}">
> > >> > >> +            <sequential>
> > >> > >> +                <antcall target="-run-kernel-test-batch">
> > >> > >> +                    <param name=" kernel.mode" value="@{mode}"
> > />
> > >> > >> +                </antcall>
> > >> > >> +            </sequential>
> > >> > >> +        </for>
> > >> > >> +    </target>
> > >> > >> +
> > >> > >> +    <target name="report-kernel-test">
> > >> > >> +        <for list="${kernel.test.mode}" param="mode"
> > >> > >> +            trim="true" keepgoing="true">
> > >> > >> +            <sequential>
> > >> > >> +                <junitreport
> > >> > >> todir="${kernel.test.dir}/reports/@{mode}.mode">
> > >> > >> +                    <fileset
> > >> > >> dir="${kernel.test.dir}/reports/@{mode}.mode">
> > >> > >> +                        <include name="*.xml" />
> > >> > >> +                    </fileset>
> > >> > >> +                    <report format="frames"
> > >> > >> +
> > >> > >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
> > >> > >> +                </junitreport>
> > >> > >> +            </sequential>
> > >> > >> +        </for>
> > >> > >> +    </target>
> > >> > >> +
> > >> > >> +    <target name="check-kernel-test">
> > >> > >> +        <loadfile property="kernel.test.summary"
> > >> > >> +            srcFile="${kernel.test.dir}/reports/summary"/>
> > >> > >> +        <echo message="
> > >> ***************************${line.separator
> > >> }"/>
> > >> > >> +        <echo message="  *** Kernel tests status
> > >> ***${line.separator
> > >> }"/>
> > >> > >> +        <echo message="
> > >> ***************************${line.separator
> > >> }"/>
> > >> > >> +        <echo message="${line.separator}"/>
> > >> > >> +        <echo message="${kernel.test.summary}"/>
> > >> > >> +        <echo message="${line.separator}"/>
> > >> > >> +        <echo>Please find detailed results under
> > >> > >> ${kernel.test.dir}/reports directory.</echo>
> > >> > >> +
> > >> > >> +        <condition property="kernel.failures">
> > >> > >> +            <contains string="${ kernel.test.summary}"
> > >> > >> substring="FAILED" />
> > >> > >> +        </condition>
> > >> > >> +        <fail if="kernel.failures" message="There were test
> > >> > >> failures." />
> > >> > >> +    </target>
> > >> > >> +
> > >> > >> +    <target name="compile-kernel-test">
> > >> > >>         <mkdir dir="${ test.resource.path}" />
> > >> > >>         <javac srcdir="${kernel.test.javasrc
> > }/../kernel_resources"
> > >> > >>             destdir="${test.resource.path}"
> > >> > >> @@ -111,177 +104,61 @@
> > >> > >>         <delete quiet="true" dir="${test.class.path}/notfound"
> > />
> > >> > >>     </target>
> > >> > >>
> > >> > >> -    <target name="-pre-kernel-test"
> > depends="compile-kernel-tests">
> > >> > >> +    <target name="-prepare-kernel-test">
> > >> > >> +        <delete quiet="true" dir="${ kernel.test.dir}/reports"
> > />
> > >> > >> +        <mkdir dir="${kernel.test.dir}/reports" />
> > >> > >> +
> > >> > >>         <condition property=" junit.jar" value="${junit.home
> > >> }/junit.jar">
> > >> > >>             <isset property="junit.home" />
> > >> > >>         </condition>
> > >> > >> -        <property name=" junit.jar"
> > >> > >> location="${external.dep.CLASSLIB
> > >> }/depends/jars/junit_3.8.2/junit.jar"/>
> > >> > >> -        <if>
> > >> > >> -            <not>
> > >> > >> -                <available file="${junit.jar}"/>
> > >> > >> -            </not>
> > >> > >> -            <then>
> > >> > >> -                <echo>
> > >> > >> +        <property name="junit.jar"
> > >> > >> +
> > >> > >> location="${external.dep.CLASSLIB
> > >> }/depends/jars/junit_3.8.2/junit.jar"/>
> > >> > >> +        <available file="${junit.jar}" property="junit.found"/>
> > >> > >> +        <fail unless="junit.found">
> > >> > >>                 ==============================================
> > >> > >>                 Please set the classpath of junit as follows:
> > >> > >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
> > >> > >>                 ==============================================
> > >> > >> -                </echo>
> > >> > >> -                <fail message="Kernel tests misconfigured" />
> > >> > >> -            </then>
> > >> > >> -        </if>
> > >> > >> -
> > >> > >> -        <delete quiet="true" dir="${kernel.test.dir}/reports"
> > />
> > >> > >> -        <delete quiet="true"
> > >> dir="${ kernel.test.dir}/ref-reports" />
> > >> > >> -        <mkdir dir="${kernel.test.dir}/reports" />
> > >> > >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
> > >> > >> -
> > >> > >> +        </fail>
> > >> > >>     </target>
> > >> > >>
> > >> > >>     <target name="-run-kernel-test-batch">
> > >> > >> +        <propertycopy property="kernel.mode.name"
> > >> > >> from="${kernel.mode}.name" override="on"/>
> > >> > >> +        <propertycopy property="kernel.mode.switch"
> > >> > >> from="${kernel.mode}.switch" override="on"/>
> > >> > >> +        <echo>
> > >> > >> +        ==================================
> > >> > >> +        Run kernel tests using ${kernel.mode.name}
> > >> > >> +        ==================================
> > >> > >> +        </echo>
> > >> > >>         <property name="report.dir"
> > >> > >> -            location="${kernel.test.dir}/reports/batch.mode"/>
> > >> > >> +            location="${kernel.test.dir}/reports/${kernel.mode
> > >> }.mode"/>
> > >> > >>         <mkdir dir="${report.dir}" />
> > >> > >>
> > >> > >> -        <junit fork="yes" forkmode="once"
> > >> > >> timeout="${kernel.test.timeout}"
> > >> > >> -            haltonfailure="no" failureproperty=" batch.failed"
> > >> > >> -            filtertrace="no" printsummary="on"
> > >> > >> -            jvm="${build.deploy.dir}/bin/java">
> > >> > >> -
> > >> > >> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> > >> > >> +        <junit fork="yes" failureproperty="kernel.failed"
> > >> > >> +            filtertrace="no" printsummary="on" showoutput="off"
> > >> > >> +            haltonfailure="${kernel.test.failfast}"
> > >> > >> +            forkmode="${ kernel.test.forkmode}"
> > >> > >> +            timeout="${kernel.test.timeout}"
> > >> > >> +            jvm="${test.jvm.exe}">
> > >> > >>
> > >> > >> -            <jvmarg value="-
> > >> Dtest.resource.path=${test.resource.path}"/>
> > >> > >>             <jvmarg value="-Dvm.assert_dialog=0" />
> > >> > >> +            <jvmarg value="-
> > >> Dtest.resource.path=${test.resource.path}"/>
> > >> > >> +            <jvmarg value="${kernel.mode.switch}" />
> > >> > >>             <jvmarg
> > >> > >> value="-Xbootclasspath/a:${ junit.jar}${path.separator}${
> > >> test.class.path}"
> > >> > >> />
> > >> > >> -            <formatter type="brief"/>
> > >> > >> -            <batchtest todir="${ report.dir}">
> > >> > >> +            <formatter type="xml"/>
> > >> > >> +            <batchtest todir="${report.dir}" unless="test.case
> > ">
> > >> > >>                 <fileset dir="${kernel.test.javasrc}">
> > >> > >>                     <patternset refid="kernel.test.java.pattern
> > "/>
> > >> > >>                 </fileset>
> > >> > >>             </batchtest>
> > >> > >> +            <test name="${test.case}" todir="${report.dir}"
> > >> > >> if="test.case" />
> > >> > >>         </junit>
> > >> > >>
> > >> > >> -        <condition property="batch.status" value="FAILED"
> > >> else="PASSED">
> > >> > >> -            <isset property="batch.failed" />
> > >> > >> +        <condition property="kernel.status" value="FAILED"
> > >> > >> else="PASSED">
> > >> > >> +            <isset property="kernel.failed" />
> > >> > >>         </condition>
> > >> > >> -    </target>
> > >> > >> -
> > >> > >> -
> > >> > >> -    <target name="-run-kernel-test">
> > >> > >> -        <echo>
> > >> > >> -               ==================================
> > >> > >> -               Run kernel tests using ${jit.or.interpreter}
> > >> > >> -               ==================================
> > >> > >> -               </echo>
> > >> > >> -
> > >> > >> -        <property name="report.dir"
> > >> > >> -
> > >> > >> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
> > >> > >> -        <mkdir dir="${report.dir}" />
> > >> > >> -
> > >> > >> -        <for param="test">
> > >> > >> -            <fileset dir="${ kernel.test.javasrc}">
> > >> > >> -                <patternset refid="kernel.test.java.pattern" />
> > >> > >> -            </fileset>
> > >> > >> -            <sequential>
> > >> > >> -
> > >> > >> -                <basename property="last.dir"
> > >> > >> file="${kernel.test.javasrc}" />
> > >> > >> -                <propertyregex property=" class.name"
> > >> override="true"
> > >> > >> input="@{test}" regexp="(.)+${last.dir}\${file.separator}"
> > >> replace=""
> > >> > >> defaultValue="@{test}" />
> > >> > >> -                <propertyregex property="class.name"
> > >> override="true"
> > >> > >> input="${class.name}" regexp="\.java" replace=""
> > >> > >> defaultValue="${class.name }" />
> > >> > >> -                <propertyregex property="class.name"
> > >> override="true"
> > >> > >> input="${ class.name}" regexp="\${file.separator}" replace="."
> > >> > >> global="true" defaultValue="${class.name }" />
> > >> > >> -                <echo message="RUNNING : ${class.name}" />
> > >> > >> -
> > >> > >> -                <junit fork="yes"
> > failureproperty="@{test}.failed"
> > >> > >> -                    timeout="${kernel.test.timeout}"
> > >> > >> newenvironment="yes" filtertrace="no"
> > >> > >> -                    jvm="${ build.deploy.dir}/bin/java">
> > >> > >> -
> > >> > >> -                    <env key="JAVA_HOME" value="${
> > build.deploy.dir
> > >> }"/>
> > >> > >> -
> > >> > >> -                    <!--env key="LD_LIBRARY_PATH"
> > >> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
> > >> > >> -                    <env key="SYSTEMDRIVE"
> > >> value="${env.SystemDrive}"
> > >> />
> > >> > >> -                    <env key="HOME" value="${env.HOME}" />
> > >> > >> -                    <env key="PATH" value="${ env.PATH}" />
> > >> > >> -                    <jvmarg
> > >> > >> value="-Dtest.resource.path=${test.resource.path}"/>
> > >> > >> -                    <jvmarg
> > >> > >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
> > >> > >> -                    <jvmarg value="-
> > Demma.coverage.out.merge=true"
> > >> />
> > >> > >> -                    <jvmarg
> > >> > >> value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${
> > >> emma.jar}"
> > >> > >> />
> > >> > >> -                    <jvmarg
> > >> > >> value="-Dvm.use_verifier=${vm.use_verifier}" />
> > >> > >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
> > >> > >> -                    <jvmarg
> > >> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> > >> test.class.path}"
> > >> > >> />
> > >> > >> -                    <jvmarg value="${ int.or.jit.arg}" />
> > >> > >> -                    <jvmarg value="-ea:java.lang.reflect..." />
> > >> > >> -                    <formatter type="brief"/>
> > >> > >> -                    <formatter type="xml" />
> > >> > >> -                    <test name="${class.name}" todir="${
> > report.dir
> > >> }"/>
> > >> > >> -                </junit>
> > >> > >> -                <condition property="${jit.or.interpreter
> > }.status"
> > >> > >> value="FAILED">
> > >> > >> -                    <isset property="@{test}.failed" />
> > >> > >> -                </condition>
> > >> > >> -
> > >> > >> -                <!--
> > >> > >> -                Gregory
> > >> > >> -                It appears that some kernel unit tests for
> > drlvm
> > >> > >> classes are
> > >> > >> -                implementation specific and may fail on RI. So
> > it
> > >> > >> makes no
> > >> > >> -                sense to check tests on RI. Also running test
> > on RI
> > >> > >> -                right after it failed on drlvm creates wrong
> > test
> > >> run
> > >> > >> report.
> > >> > >> -
> > >> > >> -                I am commenting this block for now in case
> > someone
> > >> > >> wants it
> > >> > >> -                back, possibly under some condition. My POV is
> > that
> > >> this
> > >> > >> -                block should be removed eventually.
> > >> > >> -                <if>
> > >> > >> -                    <or>
> > >> > >> -                        <isset property="@{test}.failed" />
> > >> > >> -                        <isset property="kernel.test.reference"
> > />
> > >> > >> -                    </or>
> > >> > >> -                    <then>
> > >> > >> -                        <junit fork="yes"
> > >> > >> failureproperty="@{test}.ref.failed"
> > >> > >> -                            timeout="${ kernel.test.timeout}"
> > >> > >> -                            newenvironment="yes"
> > filtertrace="no">
> > >> > >> -
> > >> > >> -
> > >> > >> -                            <env key="JAVA_HOME"
> > >> > >> value="${build.deploy.dir}"/>
> > >> > >> -
> > >> > >> -                            <!- -env key="LD_LIBRARY_PATH"
> > >> > >> value="${ build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
> > >> > >> -                            <env key="SYSTEMDRIVE"
> > >> > >> value="${env.SystemDrive}" />
> > >> > >> -                            <env key="HOME" value="${env.HOME}"
> > />
> > >> > >> -                            <env key="PATH" value="${env.PATH}" />
> > >> > >> -                            <jvmarg
> > >> > >> value="-Dtest.resource.path=${test.resource.path}"/>
> > >> > >> -                            <jvmarg
> > >> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> > >> test.class.path}"
> > >> > >> />
> > >> > >> -                            <formatter type="brief"/>
> > >> > >> -                            <formatter type="xml" />
> > >> > >> -                            <test name="${class.name}"
> > >> > >> todir="${kernel.test.dir}/ref-reports"/>
> > >> > >> -                        </junit>
> > >> > >> -
> > >> > >> -                        <if>
> > >> > >> -                            <isset
> > property="@{test}.ref.failed" />
> > >> > >> -                            <then>
> > >> > >> -                                <echo message="   **** FAILED
> > on
> > >> > >> reference JRE ****" />
> > >> > >> -                            </then>
> > >> > >> -                        </if>
> > >> > >> -                    </then>
> > >> > >> -                </if>
> > >> > >> -                /-->
> > >> > >> -            </sequential>
> > >> > >> -        </for>
> > >> > >> -
> > >> > >> -        <junitreport todir="${report.dir}">
> > >> > >> -            <fileset dir="${report.dir}">
> > >> > >> -                <include name="TEST-*.xml" />
> > >> > >> -            </fileset>
> > >> > >> -            <report format="frames" todir="${report.dir}/html"
> > />
> > >> > >> -        </junitreport>
> > >> > >> -        <junitreport todir="${kernel.test.dir}/ref-reports">
> > >> > >> -            <fileset dir="${kernel.test.dir}/ref-reports">
> > >> > >> -                <include name="TEST-*.xml" />
> > >> > >> -            </fileset>
> > >> > >> -            <report format="frames"
> > >> > >> todir="${kernel.test.dir}/ref-reports/html" />
> > >> > >> -        </junitreport>
> > >> > >> -        <property name="${jit.or.interpreter}.status"
> > >> value="PASSED"/>
> > >> > >> -        <propertycopy name="status"
> > >> > >> from="${jit.or.interpreter}.status"/>
> > >> > >> -        <echo message="" />
> > >> > >> -        <echo
> > >> > >> message="==============================================" />
> > >> > >> -        <echo message="Kernel tests ${status} using
> > >> > >> ${jit.or.interpreter}. Please find the detailed results here:"
> > />
> > >> > >> -        <echo
> > >> > >> message="${report.dir}${file.separator}html${file.separator
> > >> }index.html"
> > >> > >> />
> > >> > >> -        <echo
> > >> > >> message="==============================================" />
> > >> > >>
> > >> > >> +        <concat append="on"
> > >> > >> destfile="${kernel.test.dir}/reports/summary"
> > >> > >> +            >      ${ kernel.mode.name}
> > >> > >> ${kernel.status}${line.separator}</concat>
> > >> > >>     </target>
> > >> > >>  </project>
> > >> > >>
> > >> > >> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
> > >> > >> URL:
> > >> > >>
> > >>
> > http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
> > >>
> > >> > >>
> > >> > >>
> > >>
> > ==============================================================================
> >
> > >>
> > >> > >>
> > >> > >> --- harmony/enhanced/drlvm/trunk/build/make/test.properties
> > (added)
> > >> > >> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon
> > Nov
> > >> 20
> > >> > >> 03:27:39 2006
> > >> > >> @@ -0,0 +1,19 @@
> > >> > >> +kernel.test.mode=jet,opt,int
> > >> > >> +kernel.test.failfast=off
> > >> > >> +kernel.test.forkmode=once
> > >> > >> +kernel.test.timeout=360000
> > >> > >> +
> > >> > >> +
> > >> > >> +jit.name=Client mode JIT (default)
> > >> > >> +jit.switch=-Dbogus
> > >> > >> +
> > >> > >> +jet.name=jitrino.JET
> > >> > >> +jet.switch=-Xem:jet
> > >> > >> +
> > >> > >> +opt.name=jitrino.OPT
> > >> > >> +opt.switch=-Xem:opt
> > >> > >> +
> > >> > >> +int.name=interpreter
> > >> > >> +int.switch=-Xint
> > >> > >> +
> > >> > >> +
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >
> > >> >
> > >>
> > >
> >
>
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Vladimir Ivanov <iv...@gmail.com>.
On 11/21/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:

> 1) Just windows?


The linux cycle is failed too but due to power outage :(



> 2) Can we get a list of the commits since the last successful run?


modified tellison
/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/ThreadLocalTest.java
modified tellison
/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/javasrc/java/lang/Thread.java
modified gshimansky
/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/linux/signals_ipf.cpp
modified varlax
/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
added varlax /harmony/enhanced/drlvm/trunk/build/make/test.properties
modified varlax
/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_basic.c
I think it is a side effect of kernel.test.xml update (perTest -> once)



> 3) can we get these messages posted to the commit@ list?


today I'll test it with 'dev' list too. Actually, I can't find the reason
while these notifications are not posted.


geir
>
>
> Vladimir Ivanov wrote:
> > Today CC on windows failed to run DRLVM tests in the OPT mode with
> message:
> >
> >     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0, Time
> elapsed:
> > 0.36 sec
> >     [exec]     [junit] Tests run: 11, Failures: 0, Errors: 0, Time
> elapsed:
> > 0.032 sec
> >
> >     [exec]     [junit] An unhandled error (64) has occurred.
> >     [exec]     [junit] HyGeneric_Signal_Number=00000040
> >     [exec]     [junit] ExceptionCode=c0000024
> >     [exec]     [junit] ExceptionAddress=7C964ED1
> >     [exec]     [junit] ContextFlags=0001003f
> >     [exec]     [junit] Handler1=00401010
> >     [exec]     [junit] Handler2=11105D80
> >     [exec]     [junit] EDI=0013EE34
> >     [exec]     [junit] ESI=0013ED50
> >     [exec]     [junit] EAX=0013ECE0
> >     [exec]     [junit] EBX=26C1E508
> >     [exec]     [junit] ECX=0013ED2C
> >     [exec]     [junit] EDX=7C90EB94
> >     [exec]     [junit] EIP=7C964ED1
> >     [exec]     [junit] ESP=0013ECE0
> >     [exec]     [junit] EBP=0013ED30
> >     [exec]     [junit] Module=C:\WINDOWS\system32\ntdll.dll
> >     [exec]     [junit] Module_base_address=7C900000
> >     [exec]     [junit] Offset_in_DLL=00064ed1
> >
> >     [exec]     [junit] This application has requested the Runtime to
> > terminate it in an unusual way.
> >     [exec]     [junit] Please contact the application's support team for
> > more information.
> >     [exec]     [junit] Tests FAILED
> >
> > Could somebody look on it?
> >
> > Thanks, Vladimir
> >
> >
> > On 11/21/06, Alexey Varlamov <al...@gmail.com> wrote:
> >>
> >> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> >> >
> >> >
> >> > Alexey Varlamov wrote:
> >> > > Folks,
> >> > >
> >> > > I've just did a little step in improving pre-commit testing for
> >> DRLVM;
> >> > > most important change is a move from "perTest" forking mode to
> "once"
> >> > > (aka sameVM mode).
> >> > > This reduces testing time drastically (~50%), but may introduce
> some
> >> > > extra instability (like new intermittent failures or timeouts).
> >> >
> >> > Plus the inability to figure out what's screwing things up.
> >> >
> >> > I can't decide if I like this.  On one hand, I like it because it's
> >> > actually better to find side-effects - some test can pass, but still
> >> > leave the VM in a broken state that another test will show.
> >> >
> >> > OTOH, it does remove the clarity of each test being a single,
> separate
> >> > test.  It conceptually mixes integration testing with unit testing.
> >>
> >> Well, initially purpose for the kernel tests *is* unit testing and
> >> AFAIU they were written with this in mind (with some exceptions
> >> maybe). For conceptual purity we should re-group tests in the first
> >> place - drop some trivial smoke tests (or move to kernel if
> >> appropriate) and extract some complex cases from kernel (e.g. from
> >> RuntimeTest or SystemExtensionTest).
> >> So, I see no point to soothe ourselves with successful "perTest" runs
> >> if we know the same simple tests may fail in sameVM mode.
> >>
> >> >
> >> > Can you please just add a switch?  That way in the event of a
> failure,
> >> > we can re-run with forking on, and therefore can tell if the crash is
> >> > specifically due to the test that is crashing, or a side effect
> caused
> >> > by something that came before.
> >>
> >> There is the switch: kernel.test.forkmode=[once|perTest].
> >> I just assumed the keys are easily dediced from contents of the
> >> test.properties, but probably should have announced them explicitly.
> >> OK, here they are with current defaults:
> >>
> >> kernel.test.mode=jet,opt,int     // list of EEs to run, as configured
> >> in the test.properties
> >> kernel.test.failfast=off              // allows to abort testing
> >> immediately after the first failure
> >> kernel.test.forkmode=once     // [once|perTest]
> >> kernel.test.timeout=360000
> >>
> >> > geir
> >> >
> >> >
> >> >
> >> > > Nevertheless I believe we are ready to accept this challenge and
> >> it is
> >> > > important to take it earlier.
> >> > > Other enhancements, are described below; hopefully will make us
> more
> >> > > productive. Have fun!
> >> > >
> >> > >
> >> > > 2006/11/20, varlax@apache.org <va...@apache.org>:
> >> > >> Author: varlax
> >> > >> Date: Mon Nov 20 03:27:39 2006
> >> > >> New Revision: 477149
> >> > >>
> >> > >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
> >> > >> Log:
> >> > >> Refactored kernel.test.xml, made it more "ant-minded" and added
> some
> >> > >> features:
> >> > >> [+] "kernel.test.forkmode" support, "once" by default;
> >> > >> [+] single "test.case" support;
> >> > >> [+] "kernel.test.failfast" behaviour support;
> >> > >> [!] Improved results reporting;
> >> > >> [+] easy customization via property file;
> >> > >>
> >> > >> Some intermittent failures appeared on Win32 due to forking only
> >> > >> "once", but we must meet them sooner or later - why not now...
> >> > >>
> >> > >> Added:
> >> > >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
> >> > >> Modified:
> >> > >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> > >>
> >> > >> Modified:
> >> harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> > >> URL:
> >> > >>
> >>
> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
> >>
> >> > >>
> >> > >>
> >>
> ==============================================================================
> >>
> >> > >>
> >> > >> ---
> harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> > >> (original)
> >> > >> +++
> harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> > >> Mon Nov 20 03:27:39 2006
> >> > >> @@ -1,17 +1,18 @@
> >> > >>  <!--
> >> > >> -    Copyright 2006 The Apache Software Foundation or its
> licensors,
> >> > >> as applicable.
> >> > >> -
> >> > >> -    Licensed under the Apache License, Version 2.0 (the
> "License");
> >> > >> -    you may not use this file except in compliance with the
> >> License.
> >> > >> -    You may obtain a copy of the License at
> >> > >> -
> >> > >> -       http://www.apache.org/licenses/LICENSE-2.0
> >> > >> -
> >> > >> -    Unless required by applicable law or agreed to in writing,
> >> software
> >> > >> -    distributed under the License is distributed on an "AS IS"
> >> BASIS,
> >> > >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
> or
> >> > >> implied.
> >> > >> -    See the License for the specific language governing
> permissions
> >> and
> >> > >> -    limitations under the License.
> >> > >> +     Licensed to the Apache Software Foundation (ASF) under one
> or
> >> more
> >> > >> +     contributor license agreements.  See the NOTICE file
> >> distributed
> >> > >> with
> >> > >> +     this work for additional information regarding copyright
> >> ownership.
> >> > >> +     The ASF licenses this file to You under the Apache License,
> >> > >> Version 2.0
> >> > >> +     (the "License"); you may not use this file except in
> >> compliance
> >> > >> with
> >> > >> +     the License.  You may obtain a copy of the License at
> >> > >> +
> >> > >> +         http://www.apache.org/licenses/LICENSE-2.0
> >> > >> +
> >> > >> +     Unless required by applicable law or agreed to in writing,
> >> software
> >> > >> +     distributed under the License is distributed on an "AS IS"
> >> BASIS,
> >> > >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
> >> express or
> >> > >> implied.
> >> > >> +     See the License for the specific language governing
> >> permissions
> >> and
> >> > >> +     limitations under the License.
> >> > >>  -->
> >> > >>
> >> > >>  <project name="KERNEL TESTS">
> >> > >> @@ -20,7 +21,9 @@
> >> > >>     <property name="kernel.test.dir"
> >> > >> location="${build.semi.dir}/kernel.tests"/>
> >> > >>     <property name="test.resource.path"
> >> > >> location="${kernel.test.dir}/resources"/>
> >> > >>     <property name="test.class.path"
> >> > >> location="${kernel.test.dir}/classes"/>
> >> > >> -
> >> > >> +
> >> > >> +    <property name="test.jvm.exe" value="${build.deploy.dir
> >> }/bin/java"/>
> >> > >> +    <property file="test.properties"/>
> >> > >>
> >> > >>     <patternset id="kernel.test.java.pattern">
> >> > >>         <include name="org/apache/harmony/**/*Test.java" />
> >> > >> @@ -36,68 +39,58 @@
> >> > >>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
> >> > >>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
> >> > >>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
> >> > >> -
> >> > >> -       <!-- This test fails -->
> >> > >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
> >> > >>     </patternset>
> >> > >> -
> >> > >> -    <property name="vm.use_verifier" value="1" />
> >> > >> -    <property name="kernel.test.timeout" value="360000" />
> >> > >>
> >> > >> -    <target name="kernel.test" depends="-pre-kernel-test">
> >> > >> -        <property name="test.mode" value="jet+opt+int" />
> >> > >> -        <if>
> >> > >> -            <contains string="${test.mode}" substring="batch" />
> >> > >> -            <then>
> >> > >> -                <antcallback target="-run-kernel-test-batch"
> >> > >> -                    return="batch.status">
> >> > >> -                </antcallback>
> >> > >> -            </then>
> >> > >> -        </if>
> >> > >> -        <if>
> >> > >> -            <contains string="${test.mode}" substring="jet" />
> >> > >> -            <then>
> >> > >> -                <antcallback target="-run-kernel-test"
> >> > >> -                    return="jit.jet.status">
> >> > >> -                    <param name="jit.or.interpreter"
> >> > >> value="jitrino.jet" />
> >> > >> -                    <param name="int.or.jit.arg"
> >> > >> value="-Dem.properties=jet" />
> >> > >> -                </antcallback>
> >> > >> -            </then>
> >> > >> -        </if>
> >> > >> -        <if>
> >> > >> -            <contains string="${test.mode}" substring="opt" />
> >> > >> -            <then>
> >> > >> -                <antcallback target="-run-kernel-test"
> >> > >> -                    return="jit.opt.status">
> >> > >> -                    <param name="jit.or.interpreter"
> >> > >> value="jitrino.opt" />
> >> > >> -                    <param name="int.or.jit.arg"
> >> > >> value="-Dem.properties=opt" />
> >> > >> -                </antcallback>
> >> > >> -            </then>
> >> > >> -        </if>
> >> > >> -        <if>
> >> > >> -            <contains string="${test.mode}" substring="int" />
> >> > >> -            <then>
> >> > >> -                <antcallback target="-run-kernel-test"
> >> > >> -                    return="interpreter.status">
> >> > >> -                    <param name="jit.or.interpreter"
> >> > >> value="interpreter" />
> >> > >> -                    <param name="int.or.jit.arg" value="-Xint" />
> >> > >> -                </antcallback>
> >> > >> -            </then>
> >> > >> -        </if>
> >> > >> -        <if>
> >> > >> -            <or>
> >> > >> -                <contains string="${jit.jet.status}"
> >> > >> substring="FAILED" />
> >> > >> -                <contains string="${jit.opt.status}"
> >> > >> substring="FAILED" />
> >> > >> -                <contains string="${interpreter.status}"
> >> > >> substring="FAILED" />
> >> > >> -                <contains string="${batch.status}"
> >> substring="FAILED" />
> >> > >> -            </or>
> >> > >> -            <then>
> >> > >> -                <fail message="Kernel tests FAILED" />
> >> > >> -            </then>
> >> > >> -        </if>
> >> > >> -    </target>
> >> > >> +    <target name="kernel.test"
> >> > >> +        depends="compile-kernel-test, run-kernel-test,
> >> > >> report-kernel-test, check-kernel-test"/>
> >> > >>
> >> > >> -    <target name="compile-kernel-tests" depends="">
> >> > >> +    <target name="run-kernel-test"
> depends="-prepare-kernel-test">
> >> > >> +        <condition property="kernel.test.continue" value="true"
> >> > >> else="false">
> >> > >> +            <isfalse value="${kernel.test.failfast}"/>
> >> > >> +        </condition>
> >> > >> +        <for list="${kernel.test.mode}" param="mode"
> >> > >> +            trim="true" keepgoing="${kernel.test.continue}">
> >> > >> +            <sequential>
> >> > >> +                <antcall target="-run-kernel-test-batch">
> >> > >> +                    <param name="kernel.mode" value="@{mode}" />
> >> > >> +                </antcall>
> >> > >> +            </sequential>
> >> > >> +        </for>
> >> > >> +    </target>
> >> > >> +
> >> > >> +    <target name="report-kernel-test">
> >> > >> +        <for list="${kernel.test.mode}" param="mode"
> >> > >> +            trim="true" keepgoing="true">
> >> > >> +            <sequential>
> >> > >> +                <junitreport
> >> > >> todir="${kernel.test.dir}/reports/@{mode}.mode">
> >> > >> +                    <fileset
> >> > >> dir="${kernel.test.dir}/reports/@{mode}.mode">
> >> > >> +                        <include name="*.xml" />
> >> > >> +                    </fileset>
> >> > >> +                    <report format="frames"
> >> > >> +
> >> > >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
> >> > >> +                </junitreport>
> >> > >> +            </sequential>
> >> > >> +        </for>
> >> > >> +    </target>
> >> > >> +
> >> > >> +    <target name="check-kernel-test">
> >> > >> +        <loadfile property="kernel.test.summary"
> >> > >> +            srcFile="${kernel.test.dir}/reports/summary"/>
> >> > >> +        <echo message="
> >> ***************************${line.separator
> >> }"/>
> >> > >> +        <echo message="  *** Kernel tests status
> >> ***${line.separator
> >> }"/>
> >> > >> +        <echo message="
> >> ***************************${line.separator
> >> }"/>
> >> > >> +        <echo message="${line.separator}"/>
> >> > >> +        <echo message="${kernel.test.summary}"/>
> >> > >> +        <echo message="${line.separator}"/>
> >> > >> +        <echo>Please find detailed results under
> >> > >> ${kernel.test.dir}/reports directory.</echo>
> >> > >> +
> >> > >> +        <condition property="kernel.failures">
> >> > >> +            <contains string="${kernel.test.summary}"
> >> > >> substring="FAILED" />
> >> > >> +        </condition>
> >> > >> +        <fail if="kernel.failures" message="There were test
> >> > >> failures." />
> >> > >> +    </target>
> >> > >> +
> >> > >> +    <target name="compile-kernel-test">
> >> > >>         <mkdir dir="${test.resource.path}" />
> >> > >>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
> >> > >>             destdir="${test.resource.path}"
> >> > >> @@ -111,177 +104,61 @@
> >> > >>         <delete quiet="true" dir="${test.class.path}/notfound" />
> >> > >>     </target>
> >> > >>
> >> > >> -    <target name="-pre-kernel-test"
> depends="compile-kernel-tests">
> >> > >> +    <target name="-prepare-kernel-test">
> >> > >> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> >> > >> +        <mkdir dir="${kernel.test.dir}/reports" />
> >> > >> +
> >> > >>         <condition property="junit.jar" value="${junit.home
> >> }/junit.jar">
> >> > >>             <isset property="junit.home" />
> >> > >>         </condition>
> >> > >> -        <property name="junit.jar"
> >> > >> location="${external.dep.CLASSLIB
> >> }/depends/jars/junit_3.8.2/junit.jar"/>
> >> > >> -        <if>
> >> > >> -            <not>
> >> > >> -                <available file="${junit.jar}"/>
> >> > >> -            </not>
> >> > >> -            <then>
> >> > >> -                <echo>
> >> > >> +        <property name="junit.jar"
> >> > >> +
> >> > >> location="${external.dep.CLASSLIB
> >> }/depends/jars/junit_3.8.2/junit.jar"/>
> >> > >> +        <available file="${junit.jar}" property="junit.found"/>
> >> > >> +        <fail unless="junit.found">
> >> > >>                 ==============================================
> >> > >>                 Please set the classpath of junit as follows:
> >> > >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
> >> > >>                 ==============================================
> >> > >> -                </echo>
> >> > >> -                <fail message="Kernel tests misconfigured" />
> >> > >> -            </then>
> >> > >> -        </if>
> >> > >> -
> >> > >> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> >> > >> -        <delete quiet="true"
> >> dir="${kernel.test.dir}/ref-reports" />
> >> > >> -        <mkdir dir="${kernel.test.dir}/reports" />
> >> > >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
> >> > >> -
> >> > >> +        </fail>
> >> > >>     </target>
> >> > >>
> >> > >>     <target name="-run-kernel-test-batch">
> >> > >> +        <propertycopy property="kernel.mode.name"
> >> > >> from="${kernel.mode}.name" override="on"/>
> >> > >> +        <propertycopy property="kernel.mode.switch"
> >> > >> from="${kernel.mode}.switch" override="on"/>
> >> > >> +        <echo>
> >> > >> +        ==================================
> >> > >> +        Run kernel tests using ${kernel.mode.name}
> >> > >> +        ==================================
> >> > >> +        </echo>
> >> > >>         <property name="report.dir"
> >> > >> -            location="${kernel.test.dir}/reports/batch.mode"/>
> >> > >> +            location="${kernel.test.dir}/reports/${kernel.mode
> >> }.mode"/>
> >> > >>         <mkdir dir="${report.dir}" />
> >> > >>
> >> > >> -        <junit fork="yes" forkmode="once"
> >> > >> timeout="${kernel.test.timeout}"
> >> > >> -            haltonfailure="no" failureproperty="batch.failed"
> >> > >> -            filtertrace="no" printsummary="on"
> >> > >> -            jvm="${build.deploy.dir}/bin/java">
> >> > >> -
> >> > >> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> >> > >> +        <junit fork="yes" failureproperty="kernel.failed"
> >> > >> +            filtertrace="no" printsummary="on" showoutput="off"
> >> > >> +            haltonfailure="${kernel.test.failfast}"
> >> > >> +            forkmode="${kernel.test.forkmode}"
> >> > >> +            timeout="${kernel.test.timeout}"
> >> > >> +            jvm="${test.jvm.exe}">
> >> > >>
> >> > >> -            <jvmarg value="-
> >> Dtest.resource.path=${test.resource.path}"/>
> >> > >>             <jvmarg value="-Dvm.assert_dialog=0" />
> >> > >> +            <jvmarg value="-
> >> Dtest.resource.path=${test.resource.path}"/>
> >> > >> +            <jvmarg value="${kernel.mode.switch}" />
> >> > >>             <jvmarg
> >> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> >> test.class.path}"
> >> > >> />
> >> > >> -            <formatter type="brief"/>
> >> > >> -            <batchtest todir="${report.dir}">
> >> > >> +            <formatter type="xml"/>
> >> > >> +            <batchtest todir="${report.dir}" unless="test.case">
> >> > >>                 <fileset dir="${kernel.test.javasrc}">
> >> > >>                     <patternset refid="kernel.test.java.pattern"/>
> >> > >>                 </fileset>
> >> > >>             </batchtest>
> >> > >> +            <test name="${test.case}" todir="${report.dir}"
> >> > >> if="test.case" />
> >> > >>         </junit>
> >> > >>
> >> > >> -        <condition property="batch.status" value="FAILED"
> >> else="PASSED">
> >> > >> -            <isset property="batch.failed" />
> >> > >> +        <condition property="kernel.status" value="FAILED"
> >> > >> else="PASSED">
> >> > >> +            <isset property="kernel.failed" />
> >> > >>         </condition>
> >> > >> -    </target>
> >> > >> -
> >> > >> -
> >> > >> -    <target name="-run-kernel-test">
> >> > >> -        <echo>
> >> > >> -               ==================================
> >> > >> -               Run kernel tests using ${jit.or.interpreter}
> >> > >> -               ==================================
> >> > >> -               </echo>
> >> > >> -
> >> > >> -        <property name="report.dir"
> >> > >> -
> >> > >> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
> >> > >> -        <mkdir dir="${report.dir}" />
> >> > >> -
> >> > >> -        <for param="test">
> >> > >> -            <fileset dir="${kernel.test.javasrc}">
> >> > >> -                <patternset refid="kernel.test.java.pattern" />
> >> > >> -            </fileset>
> >> > >> -            <sequential>
> >> > >> -
> >> > >> -                <basename property="last.dir"
> >> > >> file="${kernel.test.javasrc}" />
> >> > >> -                <propertyregex property="class.name"
> >> override="true"
> >> > >> input="@{test}" regexp="(.)+${last.dir}\${file.separator}"
> >> replace=""
> >> > >> defaultValue="@{test}" />
> >> > >> -                <propertyregex property="class.name"
> >> override="true"
> >> > >> input="${class.name}" regexp="\.java" replace=""
> >> > >> defaultValue="${class.name}" />
> >> > >> -                <propertyregex property="class.name"
> >> override="true"
> >> > >> input="${class.name}" regexp="\${file.separator}" replace="."
> >> > >> global="true" defaultValue="${class.name}" />
> >> > >> -                <echo message="RUNNING : ${class.name}" />
> >> > >> -
> >> > >> -                <junit fork="yes"
> failureproperty="@{test}.failed"
> >> > >> -                    timeout="${kernel.test.timeout}"
> >> > >> newenvironment="yes" filtertrace="no"
> >> > >> -                    jvm="${build.deploy.dir}/bin/java">
> >> > >> -
> >> > >> -                    <env key="JAVA_HOME" value="${
> build.deploy.dir
> >> }"/>
> >> > >> -
> >> > >> -                    <!--env key="LD_LIBRARY_PATH"
> >> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
> >> > >> -                    <env key="SYSTEMDRIVE"
> >> value="${env.SystemDrive}"
> >> />
> >> > >> -                    <env key="HOME" value="${env.HOME}" />
> >> > >> -                    <env key="PATH" value="${env.PATH}" />
> >> > >> -                    <jvmarg
> >> > >> value="-Dtest.resource.path=${test.resource.path}"/>
> >> > >> -                    <jvmarg
> >> > >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
> >> > >> -                    <jvmarg value="-Demma.coverage.out.merge=true
> "
> >> />
> >> > >> -                    <jvmarg
> >> > >> value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${
> >> emma.jar}"
> >> > >> />
> >> > >> -                    <jvmarg
> >> > >> value="-Dvm.use_verifier=${vm.use_verifier}" />
> >> > >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
> >> > >> -                    <jvmarg
> >> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> >> test.class.path}"
> >> > >> />
> >> > >> -                    <jvmarg value="${int.or.jit.arg}" />
> >> > >> -                    <jvmarg value="-ea:java.lang.reflect..." />
> >> > >> -                    <formatter type="brief"/>
> >> > >> -                    <formatter type="xml" />
> >> > >> -                    <test name="${class.name}" todir="${
> report.dir
> >> }"/>
> >> > >> -                </junit>
> >> > >> -                <condition property="${jit.or.interpreter
> }.status"
> >> > >> value="FAILED">
> >> > >> -                    <isset property="@{test}.failed" />
> >> > >> -                </condition>
> >> > >> -
> >> > >> -                <!--
> >> > >> -                Gregory
> >> > >> -                It appears that some kernel unit tests for drlvm
> >> > >> classes are
> >> > >> -                implementation specific and may fail on RI. So it
> >> > >> makes no
> >> > >> -                sense to check tests on RI. Also running test on
> RI
> >> > >> -                right after it failed on drlvm creates wrong test
> >> run
> >> > >> report.
> >> > >> -
> >> > >> -                I am commenting this block for now in case
> someone
> >> > >> wants it
> >> > >> -                back, possibly under some condition. My POV is
> that
> >> this
> >> > >> -                block should be removed eventually.
> >> > >> -                <if>
> >> > >> -                    <or>
> >> > >> -                        <isset property="@{test}.failed" />
> >> > >> -                        <isset property="kernel.test.reference"
> />
> >> > >> -                    </or>
> >> > >> -                    <then>
> >> > >> -                        <junit fork="yes"
> >> > >> failureproperty="@{test}.ref.failed"
> >> > >> -                            timeout="${kernel.test.timeout}"
> >> > >> -                            newenvironment="yes"
> filtertrace="no">
> >> > >> -
> >> > >> -
> >> > >> -                            <env key="JAVA_HOME"
> >> > >> value="${build.deploy.dir}"/>
> >> > >> -
> >> > >> -                            <!- -env key="LD_LIBRARY_PATH"
> >> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
> >> > >> -                            <env key="SYSTEMDRIVE"
> >> > >> value="${env.SystemDrive}" />
> >> > >> -                            <env key="HOME" value="${env.HOME}"
> />
> >> > >> -                            <env key="PATH" value="${env.PATH}"
> />
> >> > >> -                            <jvmarg
> >> > >> value="-Dtest.resource.path=${test.resource.path}"/>
> >> > >> -                            <jvmarg
> >> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> >> test.class.path}"
> >> > >> />
> >> > >> -                            <formatter type="brief"/>
> >> > >> -                            <formatter type="xml" />
> >> > >> -                            <test name="${class.name}"
> >> > >> todir="${kernel.test.dir}/ref-reports"/>
> >> > >> -                        </junit>
> >> > >> -
> >> > >> -                        <if>
> >> > >> -                            <isset property="@{test}.ref.failed"
> />
> >> > >> -                            <then>
> >> > >> -                                <echo message="   **** FAILED on
> >> > >> reference JRE ****" />
> >> > >> -                            </then>
> >> > >> -                        </if>
> >> > >> -                    </then>
> >> > >> -                </if>
> >> > >> -                /-->
> >> > >> -            </sequential>
> >> > >> -        </for>
> >> > >> -
> >> > >> -        <junitreport todir="${report.dir}">
> >> > >> -            <fileset dir="${report.dir}">
> >> > >> -                <include name="TEST-*.xml" />
> >> > >> -            </fileset>
> >> > >> -            <report format="frames" todir="${report.dir}/html" />
> >> > >> -        </junitreport>
> >> > >> -        <junitreport todir="${kernel.test.dir}/ref-reports">
> >> > >> -            <fileset dir="${kernel.test.dir}/ref-reports">
> >> > >> -                <include name="TEST-*.xml" />
> >> > >> -            </fileset>
> >> > >> -            <report format="frames"
> >> > >> todir="${kernel.test.dir}/ref-reports/html" />
> >> > >> -        </junitreport>
> >> > >> -        <property name="${jit.or.interpreter}.status"
> >> value="PASSED"/>
> >> > >> -        <propertycopy name="status"
> >> > >> from="${jit.or.interpreter}.status"/>
> >> > >> -        <echo message="" />
> >> > >> -        <echo
> >> > >> message="==============================================" />
> >> > >> -        <echo message="Kernel tests ${status} using
> >> > >> ${jit.or.interpreter}. Please find the detailed results here:" />
> >> > >> -        <echo
> >> > >> message="${report.dir}${file.separator}html${file.separator
> >> }index.html"
> >> > >> />
> >> > >> -        <echo
> >> > >> message="==============================================" />
> >> > >>
> >> > >> +        <concat append="on"
> >> > >> destfile="${kernel.test.dir}/reports/summary"
> >> > >> +            >      ${kernel.mode.name}
> >> > >> ${kernel.status}${line.separator}</concat>
> >> > >>     </target>
> >> > >>  </project>
> >> > >>
> >> > >> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
> >> > >> URL:
> >> > >>
> >>
> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
> >>
> >> > >>
> >> > >>
> >>
> ==============================================================================
> >>
> >> > >>
> >> > >> --- harmony/enhanced/drlvm/trunk/build/make/test.properties
> (added)
> >> > >> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon
> Nov
> >> 20
> >> > >> 03:27:39 2006
> >> > >> @@ -0,0 +1,19 @@
> >> > >> +kernel.test.mode=jet,opt,int
> >> > >> +kernel.test.failfast=off
> >> > >> +kernel.test.forkmode=once
> >> > >> +kernel.test.timeout=360000
> >> > >> +
> >> > >> +
> >> > >> +jit.name=Client mode JIT (default)
> >> > >> +jit.switch=-Dbogus
> >> > >> +
> >> > >> +jet.name=jitrino.JET
> >> > >> +jet.switch=-Xem:jet
> >> > >> +
> >> > >> +opt.name=jitrino.OPT
> >> > >> +opt.switch=-Xem:opt
> >> > >> +
> >> > >> +int.name=interpreter
> >> > >> +int.switch=-Xint
> >> > >> +
> >> > >> +
> >> > >>
> >> > >>
> >> > >>
> >> > >
> >> >
> >>
> >
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
1) Just windows?

2) Can we get a list of the commits since the last successful run?

3) can we get these messages posted to the commit@ list?

geir


Vladimir Ivanov wrote:
> Today CC on windows failed to run DRLVM tests in the OPT mode with message:
> 
>     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
> 0.36 sec
>     [exec]     [junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed:
> 0.032 sec
> 
>     [exec]     [junit] An unhandled error (64) has occurred.
>     [exec]     [junit] HyGeneric_Signal_Number=00000040
>     [exec]     [junit] ExceptionCode=c0000024
>     [exec]     [junit] ExceptionAddress=7C964ED1
>     [exec]     [junit] ContextFlags=0001003f
>     [exec]     [junit] Handler1=00401010
>     [exec]     [junit] Handler2=11105D80
>     [exec]     [junit] EDI=0013EE34
>     [exec]     [junit] ESI=0013ED50
>     [exec]     [junit] EAX=0013ECE0
>     [exec]     [junit] EBX=26C1E508
>     [exec]     [junit] ECX=0013ED2C
>     [exec]     [junit] EDX=7C90EB94
>     [exec]     [junit] EIP=7C964ED1
>     [exec]     [junit] ESP=0013ECE0
>     [exec]     [junit] EBP=0013ED30
>     [exec]     [junit] Module=C:\WINDOWS\system32\ntdll.dll
>     [exec]     [junit] Module_base_address=7C900000
>     [exec]     [junit] Offset_in_DLL=00064ed1
> 
>     [exec]     [junit] This application has requested the Runtime to
> terminate it in an unusual way.
>     [exec]     [junit] Please contact the application's support team for
> more information.
>     [exec]     [junit] Tests FAILED
> 
> Could somebody look on it?
> 
> Thanks, Vladimir
> 
> 
> On 11/21/06, Alexey Varlamov <al...@gmail.com> wrote:
>>
>> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>> >
>> >
>> > Alexey Varlamov wrote:
>> > > Folks,
>> > >
>> > > I've just did a little step in improving pre-commit testing for 
>> DRLVM;
>> > > most important change is a move from "perTest" forking mode to "once"
>> > > (aka sameVM mode).
>> > > This reduces testing time drastically (~50%), but may introduce some
>> > > extra instability (like new intermittent failures or timeouts).
>> >
>> > Plus the inability to figure out what's screwing things up.
>> >
>> > I can't decide if I like this.  On one hand, I like it because it's
>> > actually better to find side-effects - some test can pass, but still
>> > leave the VM in a broken state that another test will show.
>> >
>> > OTOH, it does remove the clarity of each test being a single, separate
>> > test.  It conceptually mixes integration testing with unit testing.
>>
>> Well, initially purpose for the kernel tests *is* unit testing and
>> AFAIU they were written with this in mind (with some exceptions
>> maybe). For conceptual purity we should re-group tests in the first
>> place - drop some trivial smoke tests (or move to kernel if
>> appropriate) and extract some complex cases from kernel (e.g. from
>> RuntimeTest or SystemExtensionTest).
>> So, I see no point to soothe ourselves with successful "perTest" runs
>> if we know the same simple tests may fail in sameVM mode.
>>
>> >
>> > Can you please just add a switch?  That way in the event of a failure,
>> > we can re-run with forking on, and therefore can tell if the crash is
>> > specifically due to the test that is crashing, or a side effect caused
>> > by something that came before.
>>
>> There is the switch: kernel.test.forkmode=[once|perTest].
>> I just assumed the keys are easily dediced from contents of the
>> test.properties, but probably should have announced them explicitly.
>> OK, here they are with current defaults:
>>
>> kernel.test.mode=jet,opt,int     // list of EEs to run, as configured
>> in the test.properties
>> kernel.test.failfast=off              // allows to abort testing
>> immediately after the first failure
>> kernel.test.forkmode=once     // [once|perTest]
>> kernel.test.timeout=360000
>>
>> > geir
>> >
>> >
>> >
>> > > Nevertheless I believe we are ready to accept this challenge and 
>> it is
>> > > important to take it earlier.
>> > > Other enhancements, are described below; hopefully will make us more
>> > > productive. Have fun!
>> > >
>> > >
>> > > 2006/11/20, varlax@apache.org <va...@apache.org>:
>> > >> Author: varlax
>> > >> Date: Mon Nov 20 03:27:39 2006
>> > >> New Revision: 477149
>> > >>
>> > >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
>> > >> Log:
>> > >> Refactored kernel.test.xml, made it more "ant-minded" and added some
>> > >> features:
>> > >> [+] "kernel.test.forkmode" support, "once" by default;
>> > >> [+] single "test.case" support;
>> > >> [+] "kernel.test.failfast" behaviour support;
>> > >> [!] Improved results reporting;
>> > >> [+] easy customization via property file;
>> > >>
>> > >> Some intermittent failures appeared on Win32 due to forking only
>> > >> "once", but we must meet them sooner or later - why not now...
>> > >>
>> > >> Added:
>> > >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
>> > >> Modified:
>> > >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>> > >>
>> > >> Modified:
>> harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>> > >> URL:
>> > >>
>> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149 
>>
>> > >>
>> > >>
>> ============================================================================== 
>>
>> > >>
>> > >> --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>> > >> (original)
>> > >> +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>> > >> Mon Nov 20 03:27:39 2006
>> > >> @@ -1,17 +1,18 @@
>> > >>  <!--
>> > >> -    Copyright 2006 The Apache Software Foundation or its licensors,
>> > >> as applicable.
>> > >> -
>> > >> -    Licensed under the Apache License, Version 2.0 (the "License");
>> > >> -    you may not use this file except in compliance with the 
>> License.
>> > >> -    You may obtain a copy of the License at
>> > >> -
>> > >> -       http://www.apache.org/licenses/LICENSE-2.0
>> > >> -
>> > >> -    Unless required by applicable law or agreed to in writing,
>> software
>> > >> -    distributed under the License is distributed on an "AS IS"
>> BASIS,
>> > >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
>> > >> implied.
>> > >> -    See the License for the specific language governing permissions
>> and
>> > >> -    limitations under the License.
>> > >> +     Licensed to the Apache Software Foundation (ASF) under one or
>> more
>> > >> +     contributor license agreements.  See the NOTICE file
>> distributed
>> > >> with
>> > >> +     this work for additional information regarding copyright
>> ownership.
>> > >> +     The ASF licenses this file to You under the Apache License,
>> > >> Version 2.0
>> > >> +     (the "License"); you may not use this file except in 
>> compliance
>> > >> with
>> > >> +     the License.  You may obtain a copy of the License at
>> > >> +
>> > >> +         http://www.apache.org/licenses/LICENSE-2.0
>> > >> +
>> > >> +     Unless required by applicable law or agreed to in writing,
>> software
>> > >> +     distributed under the License is distributed on an "AS IS"
>> BASIS,
>> > >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
>> express or
>> > >> implied.
>> > >> +     See the License for the specific language governing 
>> permissions
>> and
>> > >> +     limitations under the License.
>> > >>  -->
>> > >>
>> > >>  <project name="KERNEL TESTS">
>> > >> @@ -20,7 +21,9 @@
>> > >>     <property name="kernel.test.dir"
>> > >> location="${build.semi.dir}/kernel.tests"/>
>> > >>     <property name="test.resource.path"
>> > >> location="${kernel.test.dir}/resources"/>
>> > >>     <property name="test.class.path"
>> > >> location="${kernel.test.dir}/classes"/>
>> > >> -
>> > >> +
>> > >> +    <property name="test.jvm.exe" value="${build.deploy.dir
>> }/bin/java"/>
>> > >> +    <property file="test.properties"/>
>> > >>
>> > >>     <patternset id="kernel.test.java.pattern">
>> > >>         <include name="org/apache/harmony/**/*Test.java" />
>> > >> @@ -36,68 +39,58 @@
>> > >>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
>> > >>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
>> > >>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
>> > >> -
>> > >> -       <!-- This test fails -->
>> > >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
>> > >>     </patternset>
>> > >> -
>> > >> -    <property name="vm.use_verifier" value="1" />
>> > >> -    <property name="kernel.test.timeout" value="360000" />
>> > >>
>> > >> -    <target name="kernel.test" depends="-pre-kernel-test">
>> > >> -        <property name="test.mode" value="jet+opt+int" />
>> > >> -        <if>
>> > >> -            <contains string="${test.mode}" substring="batch" />
>> > >> -            <then>
>> > >> -                <antcallback target="-run-kernel-test-batch"
>> > >> -                    return="batch.status">
>> > >> -                </antcallback>
>> > >> -            </then>
>> > >> -        </if>
>> > >> -        <if>
>> > >> -            <contains string="${test.mode}" substring="jet" />
>> > >> -            <then>
>> > >> -                <antcallback target="-run-kernel-test"
>> > >> -                    return="jit.jet.status">
>> > >> -                    <param name="jit.or.interpreter"
>> > >> value="jitrino.jet" />
>> > >> -                    <param name="int.or.jit.arg"
>> > >> value="-Dem.properties=jet" />
>> > >> -                </antcallback>
>> > >> -            </then>
>> > >> -        </if>
>> > >> -        <if>
>> > >> -            <contains string="${test.mode}" substring="opt" />
>> > >> -            <then>
>> > >> -                <antcallback target="-run-kernel-test"
>> > >> -                    return="jit.opt.status">
>> > >> -                    <param name="jit.or.interpreter"
>> > >> value="jitrino.opt" />
>> > >> -                    <param name="int.or.jit.arg"
>> > >> value="-Dem.properties=opt" />
>> > >> -                </antcallback>
>> > >> -            </then>
>> > >> -        </if>
>> > >> -        <if>
>> > >> -            <contains string="${test.mode}" substring="int" />
>> > >> -            <then>
>> > >> -                <antcallback target="-run-kernel-test"
>> > >> -                    return="interpreter.status">
>> > >> -                    <param name="jit.or.interpreter"
>> > >> value="interpreter" />
>> > >> -                    <param name="int.or.jit.arg" value="-Xint" />
>> > >> -                </antcallback>
>> > >> -            </then>
>> > >> -        </if>
>> > >> -        <if>
>> > >> -            <or>
>> > >> -                <contains string="${jit.jet.status}"
>> > >> substring="FAILED" />
>> > >> -                <contains string="${jit.opt.status}"
>> > >> substring="FAILED" />
>> > >> -                <contains string="${interpreter.status}"
>> > >> substring="FAILED" />
>> > >> -                <contains string="${batch.status}"
>> substring="FAILED" />
>> > >> -            </or>
>> > >> -            <then>
>> > >> -                <fail message="Kernel tests FAILED" />
>> > >> -            </then>
>> > >> -        </if>
>> > >> -    </target>
>> > >> +    <target name="kernel.test"
>> > >> +        depends="compile-kernel-test, run-kernel-test,
>> > >> report-kernel-test, check-kernel-test"/>
>> > >>
>> > >> -    <target name="compile-kernel-tests" depends="">
>> > >> +    <target name="run-kernel-test" depends="-prepare-kernel-test">
>> > >> +        <condition property="kernel.test.continue" value="true"
>> > >> else="false">
>> > >> +            <isfalse value="${kernel.test.failfast}"/>
>> > >> +        </condition>
>> > >> +        <for list="${kernel.test.mode}" param="mode"
>> > >> +            trim="true" keepgoing="${kernel.test.continue}">
>> > >> +            <sequential>
>> > >> +                <antcall target="-run-kernel-test-batch">
>> > >> +                    <param name="kernel.mode" value="@{mode}" />
>> > >> +                </antcall>
>> > >> +            </sequential>
>> > >> +        </for>
>> > >> +    </target>
>> > >> +
>> > >> +    <target name="report-kernel-test">
>> > >> +        <for list="${kernel.test.mode}" param="mode"
>> > >> +            trim="true" keepgoing="true">
>> > >> +            <sequential>
>> > >> +                <junitreport
>> > >> todir="${kernel.test.dir}/reports/@{mode}.mode">
>> > >> +                    <fileset
>> > >> dir="${kernel.test.dir}/reports/@{mode}.mode">
>> > >> +                        <include name="*.xml" />
>> > >> +                    </fileset>
>> > >> +                    <report format="frames"
>> > >> +
>> > >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
>> > >> +                </junitreport>
>> > >> +            </sequential>
>> > >> +        </for>
>> > >> +    </target>
>> > >> +
>> > >> +    <target name="check-kernel-test">
>> > >> +        <loadfile property="kernel.test.summary"
>> > >> +            srcFile="${kernel.test.dir}/reports/summary"/>
>> > >> +        <echo message="  
>> ***************************${line.separator
>> }"/>
>> > >> +        <echo message="  *** Kernel tests status 
>> ***${line.separator
>> }"/>
>> > >> +        <echo message="  
>> ***************************${line.separator
>> }"/>
>> > >> +        <echo message="${line.separator}"/>
>> > >> +        <echo message="${kernel.test.summary}"/>
>> > >> +        <echo message="${line.separator}"/>
>> > >> +        <echo>Please find detailed results under
>> > >> ${kernel.test.dir}/reports directory.</echo>
>> > >> +
>> > >> +        <condition property="kernel.failures">
>> > >> +            <contains string="${kernel.test.summary}"
>> > >> substring="FAILED" />
>> > >> +        </condition>
>> > >> +        <fail if="kernel.failures" message="There were test
>> > >> failures." />
>> > >> +    </target>
>> > >> +
>> > >> +    <target name="compile-kernel-test">
>> > >>         <mkdir dir="${test.resource.path}" />
>> > >>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
>> > >>             destdir="${test.resource.path}"
>> > >> @@ -111,177 +104,61 @@
>> > >>         <delete quiet="true" dir="${test.class.path}/notfound" />
>> > >>     </target>
>> > >>
>> > >> -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
>> > >> +    <target name="-prepare-kernel-test">
>> > >> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
>> > >> +        <mkdir dir="${kernel.test.dir}/reports" />
>> > >> +
>> > >>         <condition property="junit.jar" value="${junit.home
>> }/junit.jar">
>> > >>             <isset property="junit.home" />
>> > >>         </condition>
>> > >> -        <property name="junit.jar"
>> > >> location="${external.dep.CLASSLIB
>> }/depends/jars/junit_3.8.2/junit.jar"/>
>> > >> -        <if>
>> > >> -            <not>
>> > >> -                <available file="${junit.jar}"/>
>> > >> -            </not>
>> > >> -            <then>
>> > >> -                <echo>
>> > >> +        <property name="junit.jar"
>> > >> +
>> > >> location="${external.dep.CLASSLIB
>> }/depends/jars/junit_3.8.2/junit.jar"/>
>> > >> +        <available file="${junit.jar}" property="junit.found"/>
>> > >> +        <fail unless="junit.found">
>> > >>                 ==============================================
>> > >>                 Please set the classpath of junit as follows:
>> > >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
>> > >>                 ==============================================
>> > >> -                </echo>
>> > >> -                <fail message="Kernel tests misconfigured" />
>> > >> -            </then>
>> > >> -        </if>
>> > >> -
>> > >> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
>> > >> -        <delete quiet="true" 
>> dir="${kernel.test.dir}/ref-reports" />
>> > >> -        <mkdir dir="${kernel.test.dir}/reports" />
>> > >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
>> > >> -
>> > >> +        </fail>
>> > >>     </target>
>> > >>
>> > >>     <target name="-run-kernel-test-batch">
>> > >> +        <propertycopy property="kernel.mode.name"
>> > >> from="${kernel.mode}.name" override="on"/>
>> > >> +        <propertycopy property="kernel.mode.switch"
>> > >> from="${kernel.mode}.switch" override="on"/>
>> > >> +        <echo>
>> > >> +        ==================================
>> > >> +        Run kernel tests using ${kernel.mode.name}
>> > >> +        ==================================
>> > >> +        </echo>
>> > >>         <property name="report.dir"
>> > >> -            location="${kernel.test.dir}/reports/batch.mode"/>
>> > >> +            location="${kernel.test.dir}/reports/${kernel.mode
>> }.mode"/>
>> > >>         <mkdir dir="${report.dir}" />
>> > >>
>> > >> -        <junit fork="yes" forkmode="once"
>> > >> timeout="${kernel.test.timeout}"
>> > >> -            haltonfailure="no" failureproperty="batch.failed"
>> > >> -            filtertrace="no" printsummary="on"
>> > >> -            jvm="${build.deploy.dir}/bin/java">
>> > >> -
>> > >> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
>> > >> +        <junit fork="yes" failureproperty="kernel.failed"
>> > >> +            filtertrace="no" printsummary="on" showoutput="off"
>> > >> +            haltonfailure="${kernel.test.failfast}"
>> > >> +            forkmode="${kernel.test.forkmode}"
>> > >> +            timeout="${kernel.test.timeout}"
>> > >> +            jvm="${test.jvm.exe}">
>> > >>
>> > >> -            <jvmarg value="-
>> Dtest.resource.path=${test.resource.path}"/>
>> > >>             <jvmarg value="-Dvm.assert_dialog=0" />
>> > >> +            <jvmarg value="-
>> Dtest.resource.path=${test.resource.path}"/>
>> > >> +            <jvmarg value="${kernel.mode.switch}" />
>> > >>             <jvmarg
>> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
>> test.class.path}"
>> > >> />
>> > >> -            <formatter type="brief"/>
>> > >> -            <batchtest todir="${report.dir}">
>> > >> +            <formatter type="xml"/>
>> > >> +            <batchtest todir="${report.dir}" unless="test.case">
>> > >>                 <fileset dir="${kernel.test.javasrc}">
>> > >>                     <patternset refid="kernel.test.java.pattern"/>
>> > >>                 </fileset>
>> > >>             </batchtest>
>> > >> +            <test name="${test.case}" todir="${report.dir}"
>> > >> if="test.case" />
>> > >>         </junit>
>> > >>
>> > >> -        <condition property="batch.status" value="FAILED"
>> else="PASSED">
>> > >> -            <isset property="batch.failed" />
>> > >> +        <condition property="kernel.status" value="FAILED"
>> > >> else="PASSED">
>> > >> +            <isset property="kernel.failed" />
>> > >>         </condition>
>> > >> -    </target>
>> > >> -
>> > >> -
>> > >> -    <target name="-run-kernel-test">
>> > >> -        <echo>
>> > >> -               ==================================
>> > >> -               Run kernel tests using ${jit.or.interpreter}
>> > >> -               ==================================
>> > >> -               </echo>
>> > >> -
>> > >> -        <property name="report.dir"
>> > >> -
>> > >> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
>> > >> -        <mkdir dir="${report.dir}" />
>> > >> -
>> > >> -        <for param="test">
>> > >> -            <fileset dir="${kernel.test.javasrc}">
>> > >> -                <patternset refid="kernel.test.java.pattern" />
>> > >> -            </fileset>
>> > >> -            <sequential>
>> > >> -
>> > >> -                <basename property="last.dir"
>> > >> file="${kernel.test.javasrc}" />
>> > >> -                <propertyregex property="class.name" 
>> override="true"
>> > >> input="@{test}" regexp="(.)+${last.dir}\${file.separator}" 
>> replace=""
>> > >> defaultValue="@{test}" />
>> > >> -                <propertyregex property="class.name" 
>> override="true"
>> > >> input="${class.name}" regexp="\.java" replace=""
>> > >> defaultValue="${class.name}" />
>> > >> -                <propertyregex property="class.name" 
>> override="true"
>> > >> input="${class.name}" regexp="\${file.separator}" replace="."
>> > >> global="true" defaultValue="${class.name}" />
>> > >> -                <echo message="RUNNING : ${class.name}" />
>> > >> -
>> > >> -                <junit fork="yes" failureproperty="@{test}.failed"
>> > >> -                    timeout="${kernel.test.timeout}"
>> > >> newenvironment="yes" filtertrace="no"
>> > >> -                    jvm="${build.deploy.dir}/bin/java">
>> > >> -
>> > >> -                    <env key="JAVA_HOME" value="${build.deploy.dir
>> }"/>
>> > >> -
>> > >> -                    <!--env key="LD_LIBRARY_PATH"
>> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
>> > >> -                    <env key="SYSTEMDRIVE" 
>> value="${env.SystemDrive}"
>> />
>> > >> -                    <env key="HOME" value="${env.HOME}" />
>> > >> -                    <env key="PATH" value="${env.PATH}" />
>> > >> -                    <jvmarg
>> > >> value="-Dtest.resource.path=${test.resource.path}"/>
>> > >> -                    <jvmarg
>> > >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
>> > >> -                    <jvmarg value="-Demma.coverage.out.merge=true"
>> />
>> > >> -                    <jvmarg
>> > >> value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${
>> emma.jar}"
>> > >> />
>> > >> -                    <jvmarg
>> > >> value="-Dvm.use_verifier=${vm.use_verifier}" />
>> > >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
>> > >> -                    <jvmarg
>> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
>> test.class.path}"
>> > >> />
>> > >> -                    <jvmarg value="${int.or.jit.arg}" />
>> > >> -                    <jvmarg value="-ea:java.lang.reflect..." />
>> > >> -                    <formatter type="brief"/>
>> > >> -                    <formatter type="xml" />
>> > >> -                    <test name="${class.name}" todir="${report.dir
>> }"/>
>> > >> -                </junit>
>> > >> -                <condition property="${jit.or.interpreter}.status"
>> > >> value="FAILED">
>> > >> -                    <isset property="@{test}.failed" />
>> > >> -                </condition>
>> > >> -
>> > >> -                <!--
>> > >> -                Gregory
>> > >> -                It appears that some kernel unit tests for drlvm
>> > >> classes are
>> > >> -                implementation specific and may fail on RI. So it
>> > >> makes no
>> > >> -                sense to check tests on RI. Also running test on RI
>> > >> -                right after it failed on drlvm creates wrong test
>> run
>> > >> report.
>> > >> -
>> > >> -                I am commenting this block for now in case someone
>> > >> wants it
>> > >> -                back, possibly under some condition. My POV is that
>> this
>> > >> -                block should be removed eventually.
>> > >> -                <if>
>> > >> -                    <or>
>> > >> -                        <isset property="@{test}.failed" />
>> > >> -                        <isset property="kernel.test.reference" />
>> > >> -                    </or>
>> > >> -                    <then>
>> > >> -                        <junit fork="yes"
>> > >> failureproperty="@{test}.ref.failed"
>> > >> -                            timeout="${kernel.test.timeout}"
>> > >> -                            newenvironment="yes" filtertrace="no">
>> > >> -
>> > >> -
>> > >> -                            <env key="JAVA_HOME"
>> > >> value="${build.deploy.dir}"/>
>> > >> -
>> > >> -                            <!- -env key="LD_LIBRARY_PATH"
>> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
>> > >> -                            <env key="SYSTEMDRIVE"
>> > >> value="${env.SystemDrive}" />
>> > >> -                            <env key="HOME" value="${env.HOME}" />
>> > >> -                            <env key="PATH" value="${env.PATH}" />
>> > >> -                            <jvmarg
>> > >> value="-Dtest.resource.path=${test.resource.path}"/>
>> > >> -                            <jvmarg
>> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
>> test.class.path}"
>> > >> />
>> > >> -                            <formatter type="brief"/>
>> > >> -                            <formatter type="xml" />
>> > >> -                            <test name="${class.name}"
>> > >> todir="${kernel.test.dir}/ref-reports"/>
>> > >> -                        </junit>
>> > >> -
>> > >> -                        <if>
>> > >> -                            <isset property="@{test}.ref.failed" />
>> > >> -                            <then>
>> > >> -                                <echo message="   **** FAILED on
>> > >> reference JRE ****" />
>> > >> -                            </then>
>> > >> -                        </if>
>> > >> -                    </then>
>> > >> -                </if>
>> > >> -                /-->
>> > >> -            </sequential>
>> > >> -        </for>
>> > >> -
>> > >> -        <junitreport todir="${report.dir}">
>> > >> -            <fileset dir="${report.dir}">
>> > >> -                <include name="TEST-*.xml" />
>> > >> -            </fileset>
>> > >> -            <report format="frames" todir="${report.dir}/html" />
>> > >> -        </junitreport>
>> > >> -        <junitreport todir="${kernel.test.dir}/ref-reports">
>> > >> -            <fileset dir="${kernel.test.dir}/ref-reports">
>> > >> -                <include name="TEST-*.xml" />
>> > >> -            </fileset>
>> > >> -            <report format="frames"
>> > >> todir="${kernel.test.dir}/ref-reports/html" />
>> > >> -        </junitreport>
>> > >> -        <property name="${jit.or.interpreter}.status"
>> value="PASSED"/>
>> > >> -        <propertycopy name="status"
>> > >> from="${jit.or.interpreter}.status"/>
>> > >> -        <echo message="" />
>> > >> -        <echo
>> > >> message="==============================================" />
>> > >> -        <echo message="Kernel tests ${status} using
>> > >> ${jit.or.interpreter}. Please find the detailed results here:" />
>> > >> -        <echo
>> > >> message="${report.dir}${file.separator}html${file.separator
>> }index.html"
>> > >> />
>> > >> -        <echo
>> > >> message="==============================================" />
>> > >>
>> > >> +        <concat append="on"
>> > >> destfile="${kernel.test.dir}/reports/summary"
>> > >> +            >      ${kernel.mode.name}
>> > >> ${kernel.status}${line.separator}</concat>
>> > >>     </target>
>> > >>  </project>
>> > >>
>> > >> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
>> > >> URL:
>> > >>
>> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149 
>>
>> > >>
>> > >>
>> ============================================================================== 
>>
>> > >>
>> > >> --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
>> > >> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov
>> 20
>> > >> 03:27:39 2006
>> > >> @@ -0,0 +1,19 @@
>> > >> +kernel.test.mode=jet,opt,int
>> > >> +kernel.test.failfast=off
>> > >> +kernel.test.forkmode=once
>> > >> +kernel.test.timeout=360000
>> > >> +
>> > >> +
>> > >> +jit.name=Client mode JIT (default)
>> > >> +jit.switch=-Dbogus
>> > >> +
>> > >> +jet.name=jitrino.JET
>> > >> +jet.switch=-Xem:jet
>> > >> +
>> > >> +opt.name=jitrino.OPT
>> > >> +opt.switch=-Xem:opt
>> > >> +
>> > >> +int.name=interpreter
>> > >> +int.switch=-Xint
>> > >> +
>> > >> +
>> > >>
>> > >>
>> > >>
>> > >
>> >
>>
> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Vladimir Ivanov <iv...@gmail.com>.
Today CC on windows failed to run DRLVM tests in the OPT mode with message:

     [exec]     [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed:
0.36 sec
     [exec]     [junit] Tests run: 11, Failures: 0, Errors: 0, Time elapsed:
0.032 sec

     [exec]     [junit] An unhandled error (64) has occurred.
     [exec]     [junit] HyGeneric_Signal_Number=00000040
     [exec]     [junit] ExceptionCode=c0000024
     [exec]     [junit] ExceptionAddress=7C964ED1
     [exec]     [junit] ContextFlags=0001003f
     [exec]     [junit] Handler1=00401010
     [exec]     [junit] Handler2=11105D80
     [exec]     [junit] EDI=0013EE34
     [exec]     [junit] ESI=0013ED50
     [exec]     [junit] EAX=0013ECE0
     [exec]     [junit] EBX=26C1E508
     [exec]     [junit] ECX=0013ED2C
     [exec]     [junit] EDX=7C90EB94
     [exec]     [junit] EIP=7C964ED1
     [exec]     [junit] ESP=0013ECE0
     [exec]     [junit] EBP=0013ED30
     [exec]     [junit] Module=C:\WINDOWS\system32\ntdll.dll
     [exec]     [junit] Module_base_address=7C900000
     [exec]     [junit] Offset_in_DLL=00064ed1

     [exec]     [junit] This application has requested the Runtime to
terminate it in an unusual way.
     [exec]     [junit] Please contact the application's support team for
more information.
     [exec]     [junit] Tests FAILED

Could somebody look on it?

 Thanks, Vladimir


On 11/21/06, Alexey Varlamov <al...@gmail.com> wrote:
>
> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> >
> >
> > Alexey Varlamov wrote:
> > > Folks,
> > >
> > > I've just did a little step in improving pre-commit testing for DRLVM;
> > > most important change is a move from "perTest" forking mode to "once"
> > > (aka sameVM mode).
> > > This reduces testing time drastically (~50%), but may introduce some
> > > extra instability (like new intermittent failures or timeouts).
> >
> > Plus the inability to figure out what's screwing things up.
> >
> > I can't decide if I like this.  On one hand, I like it because it's
> > actually better to find side-effects - some test can pass, but still
> > leave the VM in a broken state that another test will show.
> >
> > OTOH, it does remove the clarity of each test being a single, separate
> > test.  It conceptually mixes integration testing with unit testing.
>
> Well, initially purpose for the kernel tests *is* unit testing and
> AFAIU they were written with this in mind (with some exceptions
> maybe). For conceptual purity we should re-group tests in the first
> place - drop some trivial smoke tests (or move to kernel if
> appropriate) and extract some complex cases from kernel (e.g. from
> RuntimeTest or SystemExtensionTest).
> So, I see no point to soothe ourselves with successful "perTest" runs
> if we know the same simple tests may fail in sameVM mode.
>
> >
> > Can you please just add a switch?  That way in the event of a failure,
> > we can re-run with forking on, and therefore can tell if the crash is
> > specifically due to the test that is crashing, or a side effect caused
> > by something that came before.
>
> There is the switch: kernel.test.forkmode=[once|perTest].
> I just assumed the keys are easily dediced from contents of the
> test.properties, but probably should have announced them explicitly.
> OK, here they are with current defaults:
>
> kernel.test.mode=jet,opt,int     // list of EEs to run, as configured
> in the test.properties
> kernel.test.failfast=off              // allows to abort testing
> immediately after the first failure
> kernel.test.forkmode=once     // [once|perTest]
> kernel.test.timeout=360000
>
> > geir
> >
> >
> >
> > > Nevertheless I believe we are ready to accept this challenge and it is
> > > important to take it earlier.
> > > Other enhancements, are described below; hopefully will make us more
> > > productive. Have fun!
> > >
> > >
> > > 2006/11/20, varlax@apache.org <va...@apache.org>:
> > >> Author: varlax
> > >> Date: Mon Nov 20 03:27:39 2006
> > >> New Revision: 477149
> > >>
> > >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
> > >> Log:
> > >> Refactored kernel.test.xml, made it more "ant-minded" and added some
> > >> features:
> > >> [+] "kernel.test.forkmode" support, "once" by default;
> > >> [+] single "test.case" support;
> > >> [+] "kernel.test.failfast" behaviour support;
> > >> [!] Improved results reporting;
> > >> [+] easy customization via property file;
> > >>
> > >> Some intermittent failures appeared on Win32 due to forking only
> > >> "once", but we must meet them sooner or later - why not now...
> > >>
> > >> Added:
> > >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
> > >> Modified:
> > >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >>
> > >> Modified:
> harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> URL:
> > >>
> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
> > >>
> > >>
> ==============================================================================
> > >>
> > >> --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> (original)
> > >> +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > >> Mon Nov 20 03:27:39 2006
> > >> @@ -1,17 +1,18 @@
> > >>  <!--
> > >> -    Copyright 2006 The Apache Software Foundation or its licensors,
> > >> as applicable.
> > >> -
> > >> -    Licensed under the Apache License, Version 2.0 (the "License");
> > >> -    you may not use this file except in compliance with the License.
> > >> -    You may obtain a copy of the License at
> > >> -
> > >> -       http://www.apache.org/licenses/LICENSE-2.0
> > >> -
> > >> -    Unless required by applicable law or agreed to in writing,
> software
> > >> -    distributed under the License is distributed on an "AS IS"
> BASIS,
> > >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> > >> implied.
> > >> -    See the License for the specific language governing permissions
> and
> > >> -    limitations under the License.
> > >> +     Licensed to the Apache Software Foundation (ASF) under one or
> more
> > >> +     contributor license agreements.  See the NOTICE file
> distributed
> > >> with
> > >> +     this work for additional information regarding copyright
> ownership.
> > >> +     The ASF licenses this file to You under the Apache License,
> > >> Version 2.0
> > >> +     (the "License"); you may not use this file except in compliance
> > >> with
> > >> +     the License.  You may obtain a copy of the License at
> > >> +
> > >> +         http://www.apache.org/licenses/LICENSE-2.0
> > >> +
> > >> +     Unless required by applicable law or agreed to in writing,
> software
> > >> +     distributed under the License is distributed on an "AS IS"
> BASIS,
> > >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> > >> implied.
> > >> +     See the License for the specific language governing permissions
> and
> > >> +     limitations under the License.
> > >>  -->
> > >>
> > >>  <project name="KERNEL TESTS">
> > >> @@ -20,7 +21,9 @@
> > >>     <property name="kernel.test.dir"
> > >> location="${build.semi.dir}/kernel.tests"/>
> > >>     <property name="test.resource.path"
> > >> location="${kernel.test.dir}/resources"/>
> > >>     <property name="test.class.path"
> > >> location="${kernel.test.dir}/classes"/>
> > >> -
> > >> +
> > >> +    <property name="test.jvm.exe" value="${build.deploy.dir
> }/bin/java"/>
> > >> +    <property file="test.properties"/>
> > >>
> > >>     <patternset id="kernel.test.java.pattern">
> > >>         <include name="org/apache/harmony/**/*Test.java" />
> > >> @@ -36,68 +39,58 @@
> > >>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
> > >>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
> > >>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
> > >> -
> > >> -       <!-- This test fails -->
> > >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
> > >>     </patternset>
> > >> -
> > >> -    <property name="vm.use_verifier" value="1" />
> > >> -    <property name="kernel.test.timeout" value="360000" />
> > >>
> > >> -    <target name="kernel.test" depends="-pre-kernel-test">
> > >> -        <property name="test.mode" value="jet+opt+int" />
> > >> -        <if>
> > >> -            <contains string="${test.mode}" substring="batch" />
> > >> -            <then>
> > >> -                <antcallback target="-run-kernel-test-batch"
> > >> -                    return="batch.status">
> > >> -                </antcallback>
> > >> -            </then>
> > >> -        </if>
> > >> -        <if>
> > >> -            <contains string="${test.mode}" substring="jet" />
> > >> -            <then>
> > >> -                <antcallback target="-run-kernel-test"
> > >> -                    return="jit.jet.status">
> > >> -                    <param name="jit.or.interpreter"
> > >> value="jitrino.jet" />
> > >> -                    <param name="int.or.jit.arg"
> > >> value="-Dem.properties=jet" />
> > >> -                </antcallback>
> > >> -            </then>
> > >> -        </if>
> > >> -        <if>
> > >> -            <contains string="${test.mode}" substring="opt" />
> > >> -            <then>
> > >> -                <antcallback target="-run-kernel-test"
> > >> -                    return="jit.opt.status">
> > >> -                    <param name="jit.or.interpreter"
> > >> value="jitrino.opt" />
> > >> -                    <param name="int.or.jit.arg"
> > >> value="-Dem.properties=opt" />
> > >> -                </antcallback>
> > >> -            </then>
> > >> -        </if>
> > >> -        <if>
> > >> -            <contains string="${test.mode}" substring="int" />
> > >> -            <then>
> > >> -                <antcallback target="-run-kernel-test"
> > >> -                    return="interpreter.status">
> > >> -                    <param name="jit.or.interpreter"
> > >> value="interpreter" />
> > >> -                    <param name="int.or.jit.arg" value="-Xint" />
> > >> -                </antcallback>
> > >> -            </then>
> > >> -        </if>
> > >> -        <if>
> > >> -            <or>
> > >> -                <contains string="${jit.jet.status}"
> > >> substring="FAILED" />
> > >> -                <contains string="${jit.opt.status}"
> > >> substring="FAILED" />
> > >> -                <contains string="${interpreter.status}"
> > >> substring="FAILED" />
> > >> -                <contains string="${batch.status}"
> substring="FAILED" />
> > >> -            </or>
> > >> -            <then>
> > >> -                <fail message="Kernel tests FAILED" />
> > >> -            </then>
> > >> -        </if>
> > >> -    </target>
> > >> +    <target name="kernel.test"
> > >> +        depends="compile-kernel-test, run-kernel-test,
> > >> report-kernel-test, check-kernel-test"/>
> > >>
> > >> -    <target name="compile-kernel-tests" depends="">
> > >> +    <target name="run-kernel-test" depends="-prepare-kernel-test">
> > >> +        <condition property="kernel.test.continue" value="true"
> > >> else="false">
> > >> +            <isfalse value="${kernel.test.failfast}"/>
> > >> +        </condition>
> > >> +        <for list="${kernel.test.mode}" param="mode"
> > >> +            trim="true" keepgoing="${kernel.test.continue}">
> > >> +            <sequential>
> > >> +                <antcall target="-run-kernel-test-batch">
> > >> +                    <param name="kernel.mode" value="@{mode}" />
> > >> +                </antcall>
> > >> +            </sequential>
> > >> +        </for>
> > >> +    </target>
> > >> +
> > >> +    <target name="report-kernel-test">
> > >> +        <for list="${kernel.test.mode}" param="mode"
> > >> +            trim="true" keepgoing="true">
> > >> +            <sequential>
> > >> +                <junitreport
> > >> todir="${kernel.test.dir}/reports/@{mode}.mode">
> > >> +                    <fileset
> > >> dir="${kernel.test.dir}/reports/@{mode}.mode">
> > >> +                        <include name="*.xml" />
> > >> +                    </fileset>
> > >> +                    <report format="frames"
> > >> +
> > >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
> > >> +                </junitreport>
> > >> +            </sequential>
> > >> +        </for>
> > >> +    </target>
> > >> +
> > >> +    <target name="check-kernel-test">
> > >> +        <loadfile property="kernel.test.summary"
> > >> +            srcFile="${kernel.test.dir}/reports/summary"/>
> > >> +        <echo message="  ***************************${line.separator
> }"/>
> > >> +        <echo message="  *** Kernel tests status ***${line.separator
> }"/>
> > >> +        <echo message="  ***************************${line.separator
> }"/>
> > >> +        <echo message="${line.separator}"/>
> > >> +        <echo message="${kernel.test.summary}"/>
> > >> +        <echo message="${line.separator}"/>
> > >> +        <echo>Please find detailed results under
> > >> ${kernel.test.dir}/reports directory.</echo>
> > >> +
> > >> +        <condition property="kernel.failures">
> > >> +            <contains string="${kernel.test.summary}"
> > >> substring="FAILED" />
> > >> +        </condition>
> > >> +        <fail if="kernel.failures" message="There were test
> > >> failures." />
> > >> +    </target>
> > >> +
> > >> +    <target name="compile-kernel-test">
> > >>         <mkdir dir="${test.resource.path}" />
> > >>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
> > >>             destdir="${test.resource.path}"
> > >> @@ -111,177 +104,61 @@
> > >>         <delete quiet="true" dir="${test.class.path}/notfound" />
> > >>     </target>
> > >>
> > >> -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
> > >> +    <target name="-prepare-kernel-test">
> > >> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> > >> +        <mkdir dir="${kernel.test.dir}/reports" />
> > >> +
> > >>         <condition property="junit.jar" value="${junit.home
> }/junit.jar">
> > >>             <isset property="junit.home" />
> > >>         </condition>
> > >> -        <property name="junit.jar"
> > >> location="${external.dep.CLASSLIB
> }/depends/jars/junit_3.8.2/junit.jar"/>
> > >> -        <if>
> > >> -            <not>
> > >> -                <available file="${junit.jar}"/>
> > >> -            </not>
> > >> -            <then>
> > >> -                <echo>
> > >> +        <property name="junit.jar"
> > >> +
> > >> location="${external.dep.CLASSLIB
> }/depends/jars/junit_3.8.2/junit.jar"/>
> > >> +        <available file="${junit.jar}" property="junit.found"/>
> > >> +        <fail unless="junit.found">
> > >>                 ==============================================
> > >>                 Please set the classpath of junit as follows:
> > >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
> > >>                 ==============================================
> > >> -                </echo>
> > >> -                <fail message="Kernel tests misconfigured" />
> > >> -            </then>
> > >> -        </if>
> > >> -
> > >> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> > >> -        <delete quiet="true" dir="${kernel.test.dir}/ref-reports" />
> > >> -        <mkdir dir="${kernel.test.dir}/reports" />
> > >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
> > >> -
> > >> +        </fail>
> > >>     </target>
> > >>
> > >>     <target name="-run-kernel-test-batch">
> > >> +        <propertycopy property="kernel.mode.name"
> > >> from="${kernel.mode}.name" override="on"/>
> > >> +        <propertycopy property="kernel.mode.switch"
> > >> from="${kernel.mode}.switch" override="on"/>
> > >> +        <echo>
> > >> +        ==================================
> > >> +        Run kernel tests using ${kernel.mode.name}
> > >> +        ==================================
> > >> +        </echo>
> > >>         <property name="report.dir"
> > >> -            location="${kernel.test.dir}/reports/batch.mode"/>
> > >> +            location="${kernel.test.dir}/reports/${kernel.mode
> }.mode"/>
> > >>         <mkdir dir="${report.dir}" />
> > >>
> > >> -        <junit fork="yes" forkmode="once"
> > >> timeout="${kernel.test.timeout}"
> > >> -            haltonfailure="no" failureproperty="batch.failed"
> > >> -            filtertrace="no" printsummary="on"
> > >> -            jvm="${build.deploy.dir}/bin/java">
> > >> -
> > >> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> > >> +        <junit fork="yes" failureproperty="kernel.failed"
> > >> +            filtertrace="no" printsummary="on" showoutput="off"
> > >> +            haltonfailure="${kernel.test.failfast}"
> > >> +            forkmode="${kernel.test.forkmode}"
> > >> +            timeout="${kernel.test.timeout}"
> > >> +            jvm="${test.jvm.exe}">
> > >>
> > >> -            <jvmarg value="-
> Dtest.resource.path=${test.resource.path}"/>
> > >>             <jvmarg value="-Dvm.assert_dialog=0" />
> > >> +            <jvmarg value="-
> Dtest.resource.path=${test.resource.path}"/>
> > >> +            <jvmarg value="${kernel.mode.switch}" />
> > >>             <jvmarg
> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> test.class.path}"
> > >> />
> > >> -            <formatter type="brief"/>
> > >> -            <batchtest todir="${report.dir}">
> > >> +            <formatter type="xml"/>
> > >> +            <batchtest todir="${report.dir}" unless="test.case">
> > >>                 <fileset dir="${kernel.test.javasrc}">
> > >>                     <patternset refid="kernel.test.java.pattern"/>
> > >>                 </fileset>
> > >>             </batchtest>
> > >> +            <test name="${test.case}" todir="${report.dir}"
> > >> if="test.case" />
> > >>         </junit>
> > >>
> > >> -        <condition property="batch.status" value="FAILED"
> else="PASSED">
> > >> -            <isset property="batch.failed" />
> > >> +        <condition property="kernel.status" value="FAILED"
> > >> else="PASSED">
> > >> +            <isset property="kernel.failed" />
> > >>         </condition>
> > >> -    </target>
> > >> -
> > >> -
> > >> -    <target name="-run-kernel-test">
> > >> -        <echo>
> > >> -               ==================================
> > >> -               Run kernel tests using ${jit.or.interpreter}
> > >> -               ==================================
> > >> -               </echo>
> > >> -
> > >> -        <property name="report.dir"
> > >> -
> > >> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
> > >> -        <mkdir dir="${report.dir}" />
> > >> -
> > >> -        <for param="test">
> > >> -            <fileset dir="${kernel.test.javasrc}">
> > >> -                <patternset refid="kernel.test.java.pattern" />
> > >> -            </fileset>
> > >> -            <sequential>
> > >> -
> > >> -                <basename property="last.dir"
> > >> file="${kernel.test.javasrc}" />
> > >> -                <propertyregex property="class.name" override="true"
> > >> input="@{test}" regexp="(.)+${last.dir}\${file.separator}" replace=""
> > >> defaultValue="@{test}" />
> > >> -                <propertyregex property="class.name" override="true"
> > >> input="${class.name}" regexp="\.java" replace=""
> > >> defaultValue="${class.name}" />
> > >> -                <propertyregex property="class.name" override="true"
> > >> input="${class.name}" regexp="\${file.separator}" replace="."
> > >> global="true" defaultValue="${class.name}" />
> > >> -                <echo message="RUNNING : ${class.name}" />
> > >> -
> > >> -                <junit fork="yes" failureproperty="@{test}.failed"
> > >> -                    timeout="${kernel.test.timeout}"
> > >> newenvironment="yes" filtertrace="no"
> > >> -                    jvm="${build.deploy.dir}/bin/java">
> > >> -
> > >> -                    <env key="JAVA_HOME" value="${build.deploy.dir
> }"/>
> > >> -
> > >> -                    <!--env key="LD_LIBRARY_PATH"
> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
> > >> -                    <env key="SYSTEMDRIVE" value="${env.SystemDrive}"
> />
> > >> -                    <env key="HOME" value="${env.HOME}" />
> > >> -                    <env key="PATH" value="${env.PATH}" />
> > >> -                    <jvmarg
> > >> value="-Dtest.resource.path=${test.resource.path}"/>
> > >> -                    <jvmarg
> > >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
> > >> -                    <jvmarg value="-Demma.coverage.out.merge=true"
> />
> > >> -                    <jvmarg
> > >> value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${
> emma.jar}"
> > >> />
> > >> -                    <jvmarg
> > >> value="-Dvm.use_verifier=${vm.use_verifier}" />
> > >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
> > >> -                    <jvmarg
> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> test.class.path}"
> > >> />
> > >> -                    <jvmarg value="${int.or.jit.arg}" />
> > >> -                    <jvmarg value="-ea:java.lang.reflect..." />
> > >> -                    <formatter type="brief"/>
> > >> -                    <formatter type="xml" />
> > >> -                    <test name="${class.name}" todir="${report.dir
> }"/>
> > >> -                </junit>
> > >> -                <condition property="${jit.or.interpreter}.status"
> > >> value="FAILED">
> > >> -                    <isset property="@{test}.failed" />
> > >> -                </condition>
> > >> -
> > >> -                <!--
> > >> -                Gregory
> > >> -                It appears that some kernel unit tests for drlvm
> > >> classes are
> > >> -                implementation specific and may fail on RI. So it
> > >> makes no
> > >> -                sense to check tests on RI. Also running test on RI
> > >> -                right after it failed on drlvm creates wrong test
> run
> > >> report.
> > >> -
> > >> -                I am commenting this block for now in case someone
> > >> wants it
> > >> -                back, possibly under some condition. My POV is that
> this
> > >> -                block should be removed eventually.
> > >> -                <if>
> > >> -                    <or>
> > >> -                        <isset property="@{test}.failed" />
> > >> -                        <isset property="kernel.test.reference" />
> > >> -                    </or>
> > >> -                    <then>
> > >> -                        <junit fork="yes"
> > >> failureproperty="@{test}.ref.failed"
> > >> -                            timeout="${kernel.test.timeout}"
> > >> -                            newenvironment="yes" filtertrace="no">
> > >> -
> > >> -
> > >> -                            <env key="JAVA_HOME"
> > >> value="${build.deploy.dir}"/>
> > >> -
> > >> -                            <!- -env key="LD_LIBRARY_PATH"
> > >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
> > >> -                            <env key="SYSTEMDRIVE"
> > >> value="${env.SystemDrive}" />
> > >> -                            <env key="HOME" value="${env.HOME}" />
> > >> -                            <env key="PATH" value="${env.PATH}" />
> > >> -                            <jvmarg
> > >> value="-Dtest.resource.path=${test.resource.path}"/>
> > >> -                            <jvmarg
> > >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${
> test.class.path}"
> > >> />
> > >> -                            <formatter type="brief"/>
> > >> -                            <formatter type="xml" />
> > >> -                            <test name="${class.name}"
> > >> todir="${kernel.test.dir}/ref-reports"/>
> > >> -                        </junit>
> > >> -
> > >> -                        <if>
> > >> -                            <isset property="@{test}.ref.failed" />
> > >> -                            <then>
> > >> -                                <echo message="   **** FAILED on
> > >> reference JRE ****" />
> > >> -                            </then>
> > >> -                        </if>
> > >> -                    </then>
> > >> -                </if>
> > >> -                /-->
> > >> -            </sequential>
> > >> -        </for>
> > >> -
> > >> -        <junitreport todir="${report.dir}">
> > >> -            <fileset dir="${report.dir}">
> > >> -                <include name="TEST-*.xml" />
> > >> -            </fileset>
> > >> -            <report format="frames" todir="${report.dir}/html" />
> > >> -        </junitreport>
> > >> -        <junitreport todir="${kernel.test.dir}/ref-reports">
> > >> -            <fileset dir="${kernel.test.dir}/ref-reports">
> > >> -                <include name="TEST-*.xml" />
> > >> -            </fileset>
> > >> -            <report format="frames"
> > >> todir="${kernel.test.dir}/ref-reports/html" />
> > >> -        </junitreport>
> > >> -        <property name="${jit.or.interpreter}.status"
> value="PASSED"/>
> > >> -        <propertycopy name="status"
> > >> from="${jit.or.interpreter}.status"/>
> > >> -        <echo message="" />
> > >> -        <echo
> > >> message="==============================================" />
> > >> -        <echo message="Kernel tests ${status} using
> > >> ${jit.or.interpreter}. Please find the detailed results here:" />
> > >> -        <echo
> > >> message="${report.dir}${file.separator}html${file.separator
> }index.html"
> > >> />
> > >> -        <echo
> > >> message="==============================================" />
> > >>
> > >> +        <concat append="on"
> > >> destfile="${kernel.test.dir}/reports/summary"
> > >> +            >      ${kernel.mode.name}
> > >> ${kernel.status}${line.separator}</concat>
> > >>     </target>
> > >>  </project>
> > >>
> > >> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
> > >> URL:
> > >>
> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
> > >>
> > >>
> ==============================================================================
> > >>
> > >> --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
> > >> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov
> 20
> > >> 03:27:39 2006
> > >> @@ -0,0 +1,19 @@
> > >> +kernel.test.mode=jet,opt,int
> > >> +kernel.test.failfast=off
> > >> +kernel.test.forkmode=once
> > >> +kernel.test.timeout=360000
> > >> +
> > >> +
> > >> +jit.name=Client mode JIT (default)
> > >> +jit.switch=-Dbogus
> > >> +
> > >> +jet.name=jitrino.JET
> > >> +jet.switch=-Xem:jet
> > >> +
> > >> +opt.name=jitrino.OPT
> > >> +opt.switch=-Xem:opt
> > >> +
> > >> +int.name=interpreter
> > >> +int.switch=-Xint
> > >> +
> > >> +
> > >>
> > >>
> > >>
> > >
> >
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>
>
> Alexey Varlamov wrote:
> > Folks,
> >
> > I've just did a little step in improving pre-commit testing for DRLVM;
> > most important change is a move from "perTest" forking mode to "once"
> > (aka sameVM mode).
> > This reduces testing time drastically (~50%), but may introduce some
> > extra instability (like new intermittent failures or timeouts).
>
> Plus the inability to figure out what's screwing things up.
>
> I can't decide if I like this.  On one hand, I like it because it's
> actually better to find side-effects - some test can pass, but still
> leave the VM in a broken state that another test will show.
>
> OTOH, it does remove the clarity of each test being a single, separate
> test.  It conceptually mixes integration testing with unit testing.

Well, initially purpose for the kernel tests *is* unit testing and
AFAIU they were written with this in mind (with some exceptions
maybe). For conceptual purity we should re-group tests in the first
place - drop some trivial smoke tests (or move to kernel if
appropriate) and extract some complex cases from kernel (e.g. from
RuntimeTest or SystemExtensionTest).
So, I see no point to soothe ourselves with successful "perTest" runs
if we know the same simple tests may fail in sameVM mode.

>
> Can you please just add a switch?  That way in the event of a failure,
> we can re-run with forking on, and therefore can tell if the crash is
> specifically due to the test that is crashing, or a side effect caused
> by something that came before.

There is the switch: kernel.test.forkmode=[once|perTest].
I just assumed the keys are easily dediced from contents of the
test.properties, but probably should have announced them explicitly.
OK, here they are with current defaults:

kernel.test.mode=jet,opt,int     // list of EEs to run, as configured
in the test.properties
kernel.test.failfast=off              // allows to abort testing
immediately after the first failure
kernel.test.forkmode=once     // [once|perTest]
kernel.test.timeout=360000

> geir
>
>
>
> > Nevertheless I believe we are ready to accept this challenge and it is
> > important to take it earlier.
> > Other enhancements, are described below; hopefully will make us more
> > productive. Have fun!
> >
> >
> > 2006/11/20, varlax@apache.org <va...@apache.org>:
> >> Author: varlax
> >> Date: Mon Nov 20 03:27:39 2006
> >> New Revision: 477149
> >>
> >> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
> >> Log:
> >> Refactored kernel.test.xml, made it more "ant-minded" and added some
> >> features:
> >> [+] "kernel.test.forkmode" support, "once" by default;
> >> [+] single "test.case" support;
> >> [+] "kernel.test.failfast" behaviour support;
> >> [!] Improved results reporting;
> >> [+] easy customization via property file;
> >>
> >> Some intermittent failures appeared on Win32 due to forking only
> >> "once", but we must meet them sooner or later - why not now...
> >>
> >> Added:
> >>    harmony/enhanced/drlvm/trunk/build/make/test.properties
> >> Modified:
> >>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >>
> >> Modified: harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> URL:
> >> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
> >>
> >> ==============================================================================
> >>
> >> --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> (original)
> >> +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >> Mon Nov 20 03:27:39 2006
> >> @@ -1,17 +1,18 @@
> >>  <!--
> >> -    Copyright 2006 The Apache Software Foundation or its licensors,
> >> as applicable.
> >> -
> >> -    Licensed under the Apache License, Version 2.0 (the "License");
> >> -    you may not use this file except in compliance with the License.
> >> -    You may obtain a copy of the License at
> >> -
> >> -       http://www.apache.org/licenses/LICENSE-2.0
> >> -
> >> -    Unless required by applicable law or agreed to in writing, software
> >> -    distributed under the License is distributed on an "AS IS" BASIS,
> >> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> >> implied.
> >> -    See the License for the specific language governing permissions and
> >> -    limitations under the License.
> >> +     Licensed to the Apache Software Foundation (ASF) under one or more
> >> +     contributor license agreements.  See the NOTICE file distributed
> >> with
> >> +     this work for additional information regarding copyright ownership.
> >> +     The ASF licenses this file to You under the Apache License,
> >> Version 2.0
> >> +     (the "License"); you may not use this file except in compliance
> >> with
> >> +     the License.  You may obtain a copy of the License at
> >> +
> >> +         http://www.apache.org/licenses/LICENSE-2.0
> >> +
> >> +     Unless required by applicable law or agreed to in writing, software
> >> +     distributed under the License is distributed on an "AS IS" BASIS,
> >> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> >> implied.
> >> +     See the License for the specific language governing permissions and
> >> +     limitations under the License.
> >>  -->
> >>
> >>  <project name="KERNEL TESTS">
> >> @@ -20,7 +21,9 @@
> >>     <property name="kernel.test.dir"
> >> location="${build.semi.dir}/kernel.tests"/>
> >>     <property name="test.resource.path"
> >> location="${kernel.test.dir}/resources"/>
> >>     <property name="test.class.path"
> >> location="${kernel.test.dir}/classes"/>
> >> -
> >> +
> >> +    <property name="test.jvm.exe" value="${build.deploy.dir}/bin/java"/>
> >> +    <property file="test.properties"/>
> >>
> >>     <patternset id="kernel.test.java.pattern">
> >>         <include name="org/apache/harmony/**/*Test.java" />
> >> @@ -36,68 +39,58 @@
> >>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
> >>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
> >>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
> >> -
> >> -       <!-- This test fails -->
> >> -       <!--exclude name="java/lang/ThreadTest.java" /-->
> >>     </patternset>
> >> -
> >> -    <property name="vm.use_verifier" value="1" />
> >> -    <property name="kernel.test.timeout" value="360000" />
> >>
> >> -    <target name="kernel.test" depends="-pre-kernel-test">
> >> -        <property name="test.mode" value="jet+opt+int" />
> >> -        <if>
> >> -            <contains string="${test.mode}" substring="batch" />
> >> -            <then>
> >> -                <antcallback target="-run-kernel-test-batch"
> >> -                    return="batch.status">
> >> -                </antcallback>
> >> -            </then>
> >> -        </if>
> >> -        <if>
> >> -            <contains string="${test.mode}" substring="jet" />
> >> -            <then>
> >> -                <antcallback target="-run-kernel-test"
> >> -                    return="jit.jet.status">
> >> -                    <param name="jit.or.interpreter"
> >> value="jitrino.jet" />
> >> -                    <param name="int.or.jit.arg"
> >> value="-Dem.properties=jet" />
> >> -                </antcallback>
> >> -            </then>
> >> -        </if>
> >> -        <if>
> >> -            <contains string="${test.mode}" substring="opt" />
> >> -            <then>
> >> -                <antcallback target="-run-kernel-test"
> >> -                    return="jit.opt.status">
> >> -                    <param name="jit.or.interpreter"
> >> value="jitrino.opt" />
> >> -                    <param name="int.or.jit.arg"
> >> value="-Dem.properties=opt" />
> >> -                </antcallback>
> >> -            </then>
> >> -        </if>
> >> -        <if>
> >> -            <contains string="${test.mode}" substring="int" />
> >> -            <then>
> >> -                <antcallback target="-run-kernel-test"
> >> -                    return="interpreter.status">
> >> -                    <param name="jit.or.interpreter"
> >> value="interpreter" />
> >> -                    <param name="int.or.jit.arg" value="-Xint" />
> >> -                </antcallback>
> >> -            </then>
> >> -        </if>
> >> -        <if>
> >> -            <or>
> >> -                <contains string="${jit.jet.status}"
> >> substring="FAILED" />
> >> -                <contains string="${jit.opt.status}"
> >> substring="FAILED" />
> >> -                <contains string="${interpreter.status}"
> >> substring="FAILED" />
> >> -                <contains string="${batch.status}" substring="FAILED" />
> >> -            </or>
> >> -            <then>
> >> -                <fail message="Kernel tests FAILED" />
> >> -            </then>
> >> -        </if>
> >> -    </target>
> >> +    <target name="kernel.test"
> >> +        depends="compile-kernel-test, run-kernel-test,
> >> report-kernel-test, check-kernel-test"/>
> >>
> >> -    <target name="compile-kernel-tests" depends="">
> >> +    <target name="run-kernel-test" depends="-prepare-kernel-test">
> >> +        <condition property="kernel.test.continue" value="true"
> >> else="false">
> >> +            <isfalse value="${kernel.test.failfast}"/>
> >> +        </condition>
> >> +        <for list="${kernel.test.mode}" param="mode"
> >> +            trim="true" keepgoing="${kernel.test.continue}">
> >> +            <sequential>
> >> +                <antcall target="-run-kernel-test-batch">
> >> +                    <param name="kernel.mode" value="@{mode}" />
> >> +                </antcall>
> >> +            </sequential>
> >> +        </for>
> >> +    </target>
> >> +
> >> +    <target name="report-kernel-test">
> >> +        <for list="${kernel.test.mode}" param="mode"
> >> +            trim="true" keepgoing="true">
> >> +            <sequential>
> >> +                <junitreport
> >> todir="${kernel.test.dir}/reports/@{mode}.mode">
> >> +                    <fileset
> >> dir="${kernel.test.dir}/reports/@{mode}.mode">
> >> +                        <include name="*.xml" />
> >> +                    </fileset>
> >> +                    <report format="frames"
> >> +
> >> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
> >> +                </junitreport>
> >> +            </sequential>
> >> +        </for>
> >> +    </target>
> >> +
> >> +    <target name="check-kernel-test">
> >> +        <loadfile property="kernel.test.summary"
> >> +            srcFile="${kernel.test.dir}/reports/summary"/>
> >> +        <echo message="  ***************************${line.separator}"/>
> >> +        <echo message="  *** Kernel tests status ***${line.separator}"/>
> >> +        <echo message="  ***************************${line.separator}"/>
> >> +        <echo message="${line.separator}"/>
> >> +        <echo message="${kernel.test.summary}"/>
> >> +        <echo message="${line.separator}"/>
> >> +        <echo>Please find detailed results under
> >> ${kernel.test.dir}/reports directory.</echo>
> >> +
> >> +        <condition property="kernel.failures">
> >> +            <contains string="${kernel.test.summary}"
> >> substring="FAILED" />
> >> +        </condition>
> >> +        <fail if="kernel.failures" message="There were test
> >> failures." />
> >> +    </target>
> >> +
> >> +    <target name="compile-kernel-test">
> >>         <mkdir dir="${test.resource.path}" />
> >>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
> >>             destdir="${test.resource.path}"
> >> @@ -111,177 +104,61 @@
> >>         <delete quiet="true" dir="${test.class.path}/notfound" />
> >>     </target>
> >>
> >> -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
> >> +    <target name="-prepare-kernel-test">
> >> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> >> +        <mkdir dir="${kernel.test.dir}/reports" />
> >> +
> >>         <condition property="junit.jar" value="${junit.home}/junit.jar">
> >>             <isset property="junit.home" />
> >>         </condition>
> >> -        <property name="junit.jar"
> >> location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
> >> -        <if>
> >> -            <not>
> >> -                <available file="${junit.jar}"/>
> >> -            </not>
> >> -            <then>
> >> -                <echo>
> >> +        <property name="junit.jar"
> >> +
> >> location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
> >> +        <available file="${junit.jar}" property="junit.found"/>
> >> +        <fail unless="junit.found">
> >>                 ==============================================
> >>                 Please set the classpath of junit as follows:
> >>                 build.bat -Djunit.jar=%JUNIT_HOME% test
> >>                 ==============================================
> >> -                </echo>
> >> -                <fail message="Kernel tests misconfigured" />
> >> -            </then>
> >> -        </if>
> >> -
> >> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> >> -        <delete quiet="true" dir="${kernel.test.dir}/ref-reports" />
> >> -        <mkdir dir="${kernel.test.dir}/reports" />
> >> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
> >> -
> >> +        </fail>
> >>     </target>
> >>
> >>     <target name="-run-kernel-test-batch">
> >> +        <propertycopy property="kernel.mode.name"
> >> from="${kernel.mode}.name" override="on"/>
> >> +        <propertycopy property="kernel.mode.switch"
> >> from="${kernel.mode}.switch" override="on"/>
> >> +        <echo>
> >> +        ==================================
> >> +        Run kernel tests using ${kernel.mode.name}
> >> +        ==================================
> >> +        </echo>
> >>         <property name="report.dir"
> >> -            location="${kernel.test.dir}/reports/batch.mode"/>
> >> +            location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
> >>         <mkdir dir="${report.dir}" />
> >>
> >> -        <junit fork="yes" forkmode="once"
> >> timeout="${kernel.test.timeout}"
> >> -            haltonfailure="no" failureproperty="batch.failed"
> >> -            filtertrace="no" printsummary="on"
> >> -            jvm="${build.deploy.dir}/bin/java">
> >> -
> >> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> >> +        <junit fork="yes" failureproperty="kernel.failed"
> >> +            filtertrace="no" printsummary="on" showoutput="off"
> >> +            haltonfailure="${kernel.test.failfast}"
> >> +            forkmode="${kernel.test.forkmode}"
> >> +            timeout="${kernel.test.timeout}"
> >> +            jvm="${test.jvm.exe}">
> >>
> >> -            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> >>             <jvmarg value="-Dvm.assert_dialog=0" />
> >> +            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> >> +            <jvmarg value="${kernel.mode.switch}" />
> >>             <jvmarg
> >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}"
> >> />
> >> -            <formatter type="brief"/>
> >> -            <batchtest todir="${report.dir}">
> >> +            <formatter type="xml"/>
> >> +            <batchtest todir="${report.dir}" unless="test.case">
> >>                 <fileset dir="${kernel.test.javasrc}">
> >>                     <patternset refid="kernel.test.java.pattern"/>
> >>                 </fileset>
> >>             </batchtest>
> >> +            <test name="${test.case}" todir="${report.dir}"
> >> if="test.case" />
> >>         </junit>
> >>
> >> -        <condition property="batch.status" value="FAILED" else="PASSED">
> >> -            <isset property="batch.failed" />
> >> +        <condition property="kernel.status" value="FAILED"
> >> else="PASSED">
> >> +            <isset property="kernel.failed" />
> >>         </condition>
> >> -    </target>
> >> -
> >> -
> >> -    <target name="-run-kernel-test">
> >> -        <echo>
> >> -               ==================================
> >> -               Run kernel tests using ${jit.or.interpreter}
> >> -               ==================================
> >> -               </echo>
> >> -
> >> -        <property name="report.dir"
> >> -
> >> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
> >> -        <mkdir dir="${report.dir}" />
> >> -
> >> -        <for param="test">
> >> -            <fileset dir="${kernel.test.javasrc}">
> >> -                <patternset refid="kernel.test.java.pattern" />
> >> -            </fileset>
> >> -            <sequential>
> >> -
> >> -                <basename property="last.dir"
> >> file="${kernel.test.javasrc}" />
> >> -                <propertyregex property="class.name" override="true"
> >> input="@{test}" regexp="(.)+${last.dir}\${file.separator}" replace=""
> >> defaultValue="@{test}" />
> >> -                <propertyregex property="class.name" override="true"
> >> input="${class.name}" regexp="\.java" replace=""
> >> defaultValue="${class.name}" />
> >> -                <propertyregex property="class.name" override="true"
> >> input="${class.name}" regexp="\${file.separator}" replace="."
> >> global="true" defaultValue="${class.name}" />
> >> -                <echo message="RUNNING : ${class.name}" />
> >> -
> >> -                <junit fork="yes" failureproperty="@{test}.failed"
> >> -                    timeout="${kernel.test.timeout}"
> >> newenvironment="yes" filtertrace="no"
> >> -                    jvm="${build.deploy.dir}/bin/java">
> >> -
> >> -                    <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> >> -
> >> -                    <!--env key="LD_LIBRARY_PATH"
> >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
> >> -                    <env key="SYSTEMDRIVE" value="${env.SystemDrive}" />
> >> -                    <env key="HOME" value="${env.HOME}" />
> >> -                    <env key="PATH" value="${env.PATH}" />
> >> -                    <jvmarg
> >> value="-Dtest.resource.path=${test.resource.path}"/>
> >> -                    <jvmarg
> >> value="-Demma.coverage.out.file=${emma.coverage.out}" />
> >> -                    <jvmarg value="-Demma.coverage.out.merge=true" />
> >> -                    <jvmarg
> >> value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${emma.jar}"
> >> />
> >> -                    <jvmarg
> >> value="-Dvm.use_verifier=${vm.use_verifier}" />
> >> -                    <jvmarg value="-Dvm.assert_dialog=0" />
> >> -                    <jvmarg
> >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}"
> >> />
> >> -                    <jvmarg value="${int.or.jit.arg}" />
> >> -                    <jvmarg value="-ea:java.lang.reflect..." />
> >> -                    <formatter type="brief"/>
> >> -                    <formatter type="xml" />
> >> -                    <test name="${class.name}" todir="${report.dir}"/>
> >> -                </junit>
> >> -                <condition property="${jit.or.interpreter}.status"
> >> value="FAILED">
> >> -                    <isset property="@{test}.failed" />
> >> -                </condition>
> >> -
> >> -                <!--
> >> -                Gregory
> >> -                It appears that some kernel unit tests for drlvm
> >> classes are
> >> -                implementation specific and may fail on RI. So it
> >> makes no
> >> -                sense to check tests on RI. Also running test on RI
> >> -                right after it failed on drlvm creates wrong test run
> >> report.
> >> -
> >> -                I am commenting this block for now in case someone
> >> wants it
> >> -                back, possibly under some condition. My POV is that this
> >> -                block should be removed eventually.
> >> -                <if>
> >> -                    <or>
> >> -                        <isset property="@{test}.failed" />
> >> -                        <isset property="kernel.test.reference" />
> >> -                    </or>
> >> -                    <then>
> >> -                        <junit fork="yes"
> >> failureproperty="@{test}.ref.failed"
> >> -                            timeout="${kernel.test.timeout}"
> >> -                            newenvironment="yes" filtertrace="no">
> >> -
> >> -
> >> -                            <env key="JAVA_HOME"
> >> value="${build.deploy.dir}"/>
> >> -
> >> -                            <!- -env key="LD_LIBRARY_PATH"
> >> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
> >> -                            <env key="SYSTEMDRIVE"
> >> value="${env.SystemDrive}" />
> >> -                            <env key="HOME" value="${env.HOME}" />
> >> -                            <env key="PATH" value="${env.PATH}" />
> >> -                            <jvmarg
> >> value="-Dtest.resource.path=${test.resource.path}"/>
> >> -                            <jvmarg
> >> value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}"
> >> />
> >> -                            <formatter type="brief"/>
> >> -                            <formatter type="xml" />
> >> -                            <test name="${class.name}"
> >> todir="${kernel.test.dir}/ref-reports"/>
> >> -                        </junit>
> >> -
> >> -                        <if>
> >> -                            <isset property="@{test}.ref.failed" />
> >> -                            <then>
> >> -                                <echo message="   **** FAILED on
> >> reference JRE ****" />
> >> -                            </then>
> >> -                        </if>
> >> -                    </then>
> >> -                </if>
> >> -                /-->
> >> -            </sequential>
> >> -        </for>
> >> -
> >> -        <junitreport todir="${report.dir}">
> >> -            <fileset dir="${report.dir}">
> >> -                <include name="TEST-*.xml" />
> >> -            </fileset>
> >> -            <report format="frames" todir="${report.dir}/html" />
> >> -        </junitreport>
> >> -        <junitreport todir="${kernel.test.dir}/ref-reports">
> >> -            <fileset dir="${kernel.test.dir}/ref-reports">
> >> -                <include name="TEST-*.xml" />
> >> -            </fileset>
> >> -            <report format="frames"
> >> todir="${kernel.test.dir}/ref-reports/html" />
> >> -        </junitreport>
> >> -        <property name="${jit.or.interpreter}.status" value="PASSED"/>
> >> -        <propertycopy name="status"
> >> from="${jit.or.interpreter}.status"/>
> >> -        <echo message="" />
> >> -        <echo
> >> message="==============================================" />
> >> -        <echo message="Kernel tests ${status} using
> >> ${jit.or.interpreter}. Please find the detailed results here:" />
> >> -        <echo
> >> message="${report.dir}${file.separator}html${file.separator}index.html"
> >> />
> >> -        <echo
> >> message="==============================================" />
> >>
> >> +        <concat append="on"
> >> destfile="${kernel.test.dir}/reports/summary"
> >> +            >      ${kernel.mode.name}
> >> ${kernel.status}${line.separator}</concat>
> >>     </target>
> >>  </project>
> >>
> >> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
> >> URL:
> >> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
> >>
> >> ==============================================================================
> >>
> >> --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
> >> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov 20
> >> 03:27:39 2006
> >> @@ -0,0 +1,19 @@
> >> +kernel.test.mode=jet,opt,int
> >> +kernel.test.failfast=off
> >> +kernel.test.forkmode=once
> >> +kernel.test.timeout=360000
> >> +
> >> +
> >> +jit.name=Client mode JIT (default)
> >> +jit.switch=-Dbogus
> >> +
> >> +jet.name=jitrino.JET
> >> +jet.switch=-Xem:jet
> >> +
> >> +opt.name=jitrino.OPT
> >> +opt.switch=-Xem:opt
> >> +
> >> +int.name=interpreter
> >> +int.switch=-Xint
> >> +
> >> +
> >>
> >>
> >>
> >
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/21, Alexei Fedotov <al...@gmail.com>:
> Hello,
> If a developer runs all tests in one VM and they pass, that's great
> and he can commit. Can developer make a commit if tests pass in
> "perTest" mode and fail in "once" mode?
>
> Let's imagine following scenarios of cooperative development when
> pre-commit test suite demonstrates unpredictable behavior (such as
> "once" mode").
>
> Scenario A.
> 1. A developer runs tests one time, and tests failed.
> 2. He runs them again and tests passes.
> 3. He commit changes.
> Why do we need to exercise developers' patience? Simple tests are
> predictable - they either pass or fail.
>
> Scenario B.
> 1. Developer A pass tests and commit his changes.
> 2. Developer B checks out a fresh workspace, makes changes and runs
> tests - they failed.
> 3. He digs out the problem to the stage when he runs tests for the
> clean workspace - tests fail since he has slightly different
> configuration.
> Developer B suspects developer A to run tests multiple times, or skip
> acceptance test run at all. This destroys mutual trust. This makes me
> think that the simpler pre-commit tests are, the better.

So in extreme case, no testing at all is the best! ;)
Seriously, kernel tests are simple enough unit tests - if we cannot
even trust "sameVM" runs here, do we ever need to invent complex
testing scenarios involving big apps?

Sure, we can reverse the default to "perTest" mode, but won't you feel
deeply sorry for time wasted in such testing? Just to remind, tests
for debug version take up to 2h on Windows server.

>
> Thanks!
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Alexei Fedotov wrote:
> Hello,
> If a developer runs all tests in one VM and they pass, that's great
> and he can commit. Can developer make a commit if tests pass in
> "perTest" mode and fail in "once" mode?
> 
> Let's imagine following scenarios of cooperative development when
> pre-commit test suite demonstrates unpredictable behavior (such as
> "once" mode").
> 
> Scenario A.
> 1. A developer runs tests one time, and tests failed.
> 2. He runs them again and tests passes.
> 3. He commit changes.
> Why do we need to exercise developers' patience? Simple tests are
> predictable - they either pass or fail.

Well, no.  If we've achieved stability, and are really being truthful 
about "no regression", that committer shouldn't commit that.  "Being 
lucky" isn't a reason to commit changes.

> 
> Scenario B.
> 1. Developer A pass tests and commit his changes.
> 2. Developer B checks out a fresh workspace, makes changes and runs
> tests - they failed.
> 3. He digs out the problem to the stage when he runs tests for the
> clean workspace - tests fail since he has slightly different
> configuration.
> Developer B suspects developer A to run tests multiple times, or skip
> acceptance test run at all. This destroys mutual trust. This makes me
> think that the simpler pre-commit tests are, the better.

I don't understand what simplifying the tests achieve.  If developer B 
has a problem, he or she should ask developer A about it.



> 
> Thanks!
> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexei Fedotov <al...@gmail.com>.
Hello,
If a developer runs all tests in one VM and they pass, that's great
and he can commit. Can developer make a commit if tests pass in
"perTest" mode and fail in "once" mode?

Let's imagine following scenarios of cooperative development when
pre-commit test suite demonstrates unpredictable behavior (such as
"once" mode").

Scenario A.
1. A developer runs tests one time, and tests failed.
2. He runs them again and tests passes.
3. He commit changes.
Why do we need to exercise developers' patience? Simple tests are
predictable - they either pass or fail.

Scenario B.
1. Developer A pass tests and commit his changes.
2. Developer B checks out a fresh workspace, makes changes and runs
tests - they failed.
3. He digs out the problem to the stage when he runs tests for the
clean workspace - tests fail since he has slightly different
configuration.
Developer B suspects developer A to run tests multiple times, or skip
acceptance test run at all. This destroys mutual trust. This makes me
think that the simpler pre-commit tests are, the better.

Thanks!

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Alexey Varlamov wrote:
> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>> Sorry - yes, you are right.
>>
>> Other things :
>>
>> 1) When running on x86_64 (where we have bugs), I noticed that the
>> kernel tests don't run to completion on failure.  How can we get it to
>> do that?  It would be nice to figure out what all the failures are.
>> Failfast is set to off.  Maybe I have to run forkmode as whatever the
>> other value is.  what is the other value?
> It must be VM crash, it may die silently and do not finish full suite.
> If it complained about invalid xml file while generating report, means
> that corresponding test killed VM.
> Please try with -Dkernel.test.forkmode=perTest to get whole picture.

"preTest" was what I was fishing for.  I added a little bit of 
documentation to the test.properties file.

> 
>>
>> 2) Would it be hard to have an overall test report?  Like :
>>
>>  JVMTI (jit) - PASSED
>>  JVMTI (int) - PASSED
>>  c-unit      - PASSED
>>  smoke (jit) - PASSED
>>  smoke (int) - PASSED
>>  kernel (jit) - PASSED
>>  kernel (opt) - PASSED
>>  kernel (int) - PASSED
>>
>>
>> Should be easy - maybe we just echo the result of each stage to a file
>> and print the result.  I'll poke at that.
> Yes, please :) Actually this is exactly how kernel.test summary works.

Ok - that will give people a better sense of what's going on, I think


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> Sorry - yes, you are right.
>
> Other things :
>
> 1) When running on x86_64 (where we have bugs), I noticed that the
> kernel tests don't run to completion on failure.  How can we get it to
> do that?  It would be nice to figure out what all the failures are.
> Failfast is set to off.  Maybe I have to run forkmode as whatever the
> other value is.  what is the other value?
It must be VM crash, it may die silently and do not finish full suite.
If it complained about invalid xml file while generating report, means
that corresponding test killed VM.
Please try with -Dkernel.test.forkmode=perTest to get whole picture.

>
> 2) Would it be hard to have an overall test report?  Like :
>
>  JVMTI (jit) - PASSED
>  JVMTI (int) - PASSED
>  c-unit      - PASSED
>  smoke (jit) - PASSED
>  smoke (int) - PASSED
>  kernel (jit) - PASSED
>  kernel (opt) - PASSED
>  kernel (int) - PASSED
>
>
> Should be easy - maybe we just echo the result of each stage to a file
> and print the result.  I'll poke at that.
Yes, please :) Actually this is exactly how kernel.test summary works.

>
> geir
>
> Alexey Varlamov wrote:
> > 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> >> I just ran full test suite on ubuntu 6 x86, after goosing the timeout
> >> number by an order of magnitude (and committing it..)
> >>
> >> But...
> >>
> >> where did the jvmti tests go?
> >>
> >> They should run by default as well
> >
> > They do run, the first in order - so may be just scrolled high in console.
> >
> >>
> >> geir
> >>
> >>
> >> Alexey Varlamov wrote:
> >> > 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> >> >>
> >> >>
> >> >> Geir Magnusson Jr. wrote:
> >> >> >
> >> >> >
> >> >> > Alexey Varlamov wrote:
> >> >> >> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
> >> >> >>> Geir Magnusson Jr. wrote:
> >> >>
> >> >> >
> >> >> >> Generally I agree it is always better to discuss, and in fact
> >> >> >> hesitated to commit with default forking set to "once" - but
> >> decided
> >> >> >> this is right thing to do rigth now. The current trend to make
> >> drlvm
> >> >> >> truly standard VM for harmony, recently Alexei even proclaimed 100%
> >> >> >> HUT pass rate, neverthless drlvm is not yet reliable enough and we
> >> >> >> should keep the momentum and face possible problems with open eyes.
> >> >> >> Again, I'm sorry to bother you^H^H^H us VM guys, but believe
> >> this is
> >> >> >> neccessary evil now.
> >> >> >
> >> >> > The nicer way to do this is to introduce this change as an
> >> option, and
> >> >> > let people start using it...
> >> >> >
> >> >>
> >> >> So it doesn't appear that I'm beating up on you :)  I want to say
> >> that i
> >> >> do like some of these changes.  very much, actually, such as the test
> >> >> properties, and the summary info.  And the fact that we have that
> >> switch
> >> >> and you just forgot to mention it... is great.
> >> >>
> >> >> It's just good to announce to people, to give them a heads-up and a
> >> >> chance to respond.
> >> >>
> >> >> It's also easier if you describe the changes in prose, rather than
> >> hope
> >> >> someone has the time and wherewithal to grok the svn diff.
> >> >
> >> > Thank you Geir! And thanks to all who cared and dared to speak up.
> >> > I see and I learn a lot.
> >> >
> >> > --
> >> > Alexey
> >> >
> >> >>
> >> >>
> >> >> geir
> >> >>
> >> >
> >>
> >
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
Sorry - yes, you are right.

Other things :

1) When running on x86_64 (where we have bugs), I noticed that the 
kernel tests don't run to completion on failure.  How can we get it to 
do that?  It would be nice to figure out what all the failures are. 
Failfast is set to off.  Maybe I have to run forkmode as whatever the 
other value is.  what is the other value?

2) Would it be hard to have an overall test report?  Like :

  JVMTI (jit) - PASSED
  JVMTI (int) - PASSED
  c-unit      - PASSED
  smoke (jit) - PASSED
  smoke (int) - PASSED
  kernel (jit) - PASSED
  kernel (opt) - PASSED
  kernel (int) - PASSED


Should be easy - maybe we just echo the result of each stage to a file 
and print the result.  I'll poke at that.

geir

Alexey Varlamov wrote:
> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>> I just ran full test suite on ubuntu 6 x86, after goosing the timeout
>> number by an order of magnitude (and committing it..)
>>
>> But...
>>
>> where did the jvmti tests go?
>>
>> They should run by default as well
> 
> They do run, the first in order - so may be just scrolled high in console.
> 
>>
>> geir
>>
>>
>> Alexey Varlamov wrote:
>> > 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>> >>
>> >>
>> >> Geir Magnusson Jr. wrote:
>> >> >
>> >> >
>> >> > Alexey Varlamov wrote:
>> >> >> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
>> >> >>> Geir Magnusson Jr. wrote:
>> >>
>> >> >
>> >> >> Generally I agree it is always better to discuss, and in fact
>> >> >> hesitated to commit with default forking set to "once" - but 
>> decided
>> >> >> this is right thing to do rigth now. The current trend to make 
>> drlvm
>> >> >> truly standard VM for harmony, recently Alexei even proclaimed 100%
>> >> >> HUT pass rate, neverthless drlvm is not yet reliable enough and we
>> >> >> should keep the momentum and face possible problems with open eyes.
>> >> >> Again, I'm sorry to bother you^H^H^H us VM guys, but believe 
>> this is
>> >> >> neccessary evil now.
>> >> >
>> >> > The nicer way to do this is to introduce this change as an 
>> option, and
>> >> > let people start using it...
>> >> >
>> >>
>> >> So it doesn't appear that I'm beating up on you :)  I want to say 
>> that i
>> >> do like some of these changes.  very much, actually, such as the test
>> >> properties, and the summary info.  And the fact that we have that 
>> switch
>> >> and you just forgot to mention it... is great.
>> >>
>> >> It's just good to announce to people, to give them a heads-up and a
>> >> chance to respond.
>> >>
>> >> It's also easier if you describe the changes in prose, rather than 
>> hope
>> >> someone has the time and wherewithal to grok the svn diff.
>> >
>> > Thank you Geir! And thanks to all who cared and dared to speak up.
>> > I see and I learn a lot.
>> >
>> > --
>> > Alexey
>> >
>> >>
>> >>
>> >> geir
>> >>
>> >
>>
> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> I just ran full test suite on ubuntu 6 x86, after goosing the timeout
> number by an order of magnitude (and committing it..)
>
> But...
>
> where did the jvmti tests go?
>
> They should run by default as well

They do run, the first in order - so may be just scrolled high in console.

>
> geir
>
>
> Alexey Varlamov wrote:
> > 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
> >>
> >>
> >> Geir Magnusson Jr. wrote:
> >> >
> >> >
> >> > Alexey Varlamov wrote:
> >> >> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
> >> >>> Geir Magnusson Jr. wrote:
> >>
> >> >
> >> >> Generally I agree it is always better to discuss, and in fact
> >> >> hesitated to commit with default forking set to "once" - but decided
> >> >> this is right thing to do rigth now. The current trend to make drlvm
> >> >> truly standard VM for harmony, recently Alexei even proclaimed 100%
> >> >> HUT pass rate, neverthless drlvm is not yet reliable enough and we
> >> >> should keep the momentum and face possible problems with open eyes.
> >> >> Again, I'm sorry to bother you^H^H^H us VM guys, but believe this is
> >> >> neccessary evil now.
> >> >
> >> > The nicer way to do this is to introduce this change as an option, and
> >> > let people start using it...
> >> >
> >>
> >> So it doesn't appear that I'm beating up on you :)  I want to say that i
> >> do like some of these changes.  very much, actually, such as the test
> >> properties, and the summary info.  And the fact that we have that switch
> >> and you just forgot to mention it... is great.
> >>
> >> It's just good to announce to people, to give them a heads-up and a
> >> chance to respond.
> >>
> >> It's also easier if you describe the changes in prose, rather than hope
> >> someone has the time and wherewithal to grok the svn diff.
> >
> > Thank you Geir! And thanks to all who cared and dared to speak up.
> > I see and I learn a lot.
> >
> > --
> > Alexey
> >
> >>
> >>
> >> geir
> >>
> >
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
I just ran full test suite on ubuntu 6 x86, after goosing the timeout 
number by an order of magnitude (and committing it..)

But...

where did the jvmti tests go?

They should run by default as well

geir


Alexey Varlamov wrote:
> 2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>>
>>
>> Geir Magnusson Jr. wrote:
>> >
>> >
>> > Alexey Varlamov wrote:
>> >> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
>> >>> Geir Magnusson Jr. wrote:
>>
>> >
>> >> Generally I agree it is always better to discuss, and in fact
>> >> hesitated to commit with default forking set to "once" - but decided
>> >> this is right thing to do rigth now. The current trend to make drlvm
>> >> truly standard VM for harmony, recently Alexei even proclaimed 100%
>> >> HUT pass rate, neverthless drlvm is not yet reliable enough and we
>> >> should keep the momentum and face possible problems with open eyes.
>> >> Again, I'm sorry to bother you^H^H^H us VM guys, but believe this is
>> >> neccessary evil now.
>> >
>> > The nicer way to do this is to introduce this change as an option, and
>> > let people start using it...
>> >
>>
>> So it doesn't appear that I'm beating up on you :)  I want to say that i
>> do like some of these changes.  very much, actually, such as the test
>> properties, and the summary info.  And the fact that we have that switch
>> and you just forgot to mention it... is great.
>>
>> It's just good to announce to people, to give them a heads-up and a
>> chance to respond.
>>
>> It's also easier if you describe the changes in prose, rather than hope
>> someone has the time and wherewithal to grok the svn diff.
> 
> Thank you Geir! And thanks to all who cared and dared to speak up.
> I see and I learn a lot.
> 
> -- 
> Alexey
> 
>>
>>
>> geir
>>
> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/21, Geir Magnusson Jr. <ge...@pobox.com>:
>
>
> Geir Magnusson Jr. wrote:
> >
> >
> > Alexey Varlamov wrote:
> >> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
> >>> Geir Magnusson Jr. wrote:
>
> >
> >> Generally I agree it is always better to discuss, and in fact
> >> hesitated to commit with default forking set to "once" - but decided
> >> this is right thing to do rigth now. The current trend to make drlvm
> >> truly standard VM for harmony, recently Alexei even proclaimed 100%
> >> HUT pass rate, neverthless drlvm is not yet reliable enough and we
> >> should keep the momentum and face possible problems with open eyes.
> >> Again, I'm sorry to bother you^H^H^H us VM guys, but believe this is
> >> neccessary evil now.
> >
> > The nicer way to do this is to introduce this change as an option, and
> > let people start using it...
> >
>
> So it doesn't appear that I'm beating up on you :)  I want to say that i
> do like some of these changes.  very much, actually, such as the test
> properties, and the summary info.  And the fact that we have that switch
> and you just forgot to mention it... is great.
>
> It's just good to announce to people, to give them a heads-up and a
> chance to respond.
>
> It's also easier if you describe the changes in prose, rather than hope
> someone has the time and wherewithal to grok the svn diff.

Thank you Geir! And thanks to all who cared and dared to speak up.
I see and I learn a lot.

--
Alexey

>
>
> geir
>

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Geir Magnusson Jr. wrote:
> 
> 
> Alexey Varlamov wrote:
>> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
>>> Geir Magnusson Jr. wrote:

> 
>> Generally I agree it is always better to discuss, and in fact
>> hesitated to commit with default forking set to "once" - but decided
>> this is right thing to do rigth now. The current trend to make drlvm
>> truly standard VM for harmony, recently Alexei even proclaimed 100%
>> HUT pass rate, neverthless drlvm is not yet reliable enough and we
>> should keep the momentum and face possible problems with open eyes.
>> Again, I'm sorry to bother you^H^H^H us VM guys, but believe this is
>> neccessary evil now.
> 
> The nicer way to do this is to introduce this change as an option, and 
> let people start using it...
> 

So it doesn't appear that I'm beating up on you :)  I want to say that i 
do like some of these changes.  very much, actually, such as the test 
properties, and the summary info.  And the fact that we have that switch 
and you just forgot to mention it... is great.

It's just good to announce to people, to give them a heads-up and a 
chance to respond.

It's also easier if you describe the changes in prose, rather than hope 
someone has the time and wherewithal to grok the svn diff.


geir

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Alexey Varlamov wrote:
> 2006/11/21, Gregory Shimansky <gs...@gmail.com>:
>> Geir Magnusson Jr. wrote:
>> >
>> >
>> > Alexey Varlamov wrote:
>> >> Folks,
>> >>
>> >> I've just did a little step in improving pre-commit testing for DRLVM;
>> >> most important change is a move from "perTest" forking mode to "once"
>> >> (aka sameVM mode).
>> >> This reduces testing time drastically (~50%), but may introduce some
>> >> extra instability (like new intermittent failures or timeouts).
>> >
>> > Plus the inability to figure out what's screwing things up.
>> >
>> > I can't decide if I like this.  On one hand, I like it because it's
>> > actually better to find side-effects - some test can pass, but still
>> > leave the VM in a broken state that another test will show.
>>
>> I think the change has a good intension but it should've gone through
>> more testing. Preferably the fixes for problems on windows should've
>> been included into the patch. If the problems are too hard to fix, why
>> not open a discussion before changing the files in SVN?
> 
> I did test on SUSE9, Win2003 server and WinXP(laptop) - only spotted
> *intermittent* failures on WinXP. I assumed it maybe little bothering
> but really easy to switch; OTOH we better discover instabilities
> sooner if they are frequent.
> 
>>
>> > OTOH, it does remove the clarity of each test being a single, separate
>> > test.  It conceptually mixes integration testing with unit testing.
>> >
>> > Can you please just add a switch?  That way in the event of a failure,
>> > we can re-run with forking on, and therefore can tell if the crash is
>> > specifically due to the test that is crashing, or a side effect caused
>> > by something that came before.
>>
>> I would also like a switch. I don't like it that a change which
>> knowingly introduces problems with acceptance tests is committed without
>> discussion. Should we discard kernel tests from drlvm commits until they
>> are fixed? I think that there was an agreement about no regression. So
>> now all commits to drlvm are blocked.
> 
> But there *is* cmd-line switch, my bad that I didn't explained this
> more clearly. And I'm not sure we firmly adopted "zero regression"
> policy - at least intermittent failures in kernel tests did block
> nobody so far. Should we vote formally, BTW?

No.  We've always been zero regression in classlib - we've never been 
clean enough with DRLVM to even know it.

So do I don't think we should make formal votes about - lets just drive 
forward to make it so.

> Generally I agree it is always better to discuss, and in fact
> hesitated to commit with default forking set to "once" - but decided
> this is right thing to do rigth now. The current trend to make drlvm
> truly standard VM for harmony, recently Alexei even proclaimed 100%
> HUT pass rate, neverthless drlvm is not yet reliable enough and we
> should keep the momentum and face possible problems with open eyes.
> Again, I'm sorry to bother you^H^H^H us VM guys, but believe this is
> neccessary evil now.

The nicer way to do this is to introduce this change as an option, and 
let people start using it...

geir


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Alexey Varlamov <al...@gmail.com>.
2006/11/21, Gregory Shimansky <gs...@gmail.com>:
> Geir Magnusson Jr. wrote:
> >
> >
> > Alexey Varlamov wrote:
> >> Folks,
> >>
> >> I've just did a little step in improving pre-commit testing for DRLVM;
> >> most important change is a move from "perTest" forking mode to "once"
> >> (aka sameVM mode).
> >> This reduces testing time drastically (~50%), but may introduce some
> >> extra instability (like new intermittent failures or timeouts).
> >
> > Plus the inability to figure out what's screwing things up.
> >
> > I can't decide if I like this.  On one hand, I like it because it's
> > actually better to find side-effects - some test can pass, but still
> > leave the VM in a broken state that another test will show.
>
> I think the change has a good intension but it should've gone through
> more testing. Preferably the fixes for problems on windows should've
> been included into the patch. If the problems are too hard to fix, why
> not open a discussion before changing the files in SVN?

I did test on SUSE9, Win2003 server and WinXP(laptop) - only spotted
*intermittent* failures on WinXP. I assumed it maybe little bothering
but really easy to switch; OTOH we better discover instabilities
sooner if they are frequent.

>
> > OTOH, it does remove the clarity of each test being a single, separate
> > test.  It conceptually mixes integration testing with unit testing.
> >
> > Can you please just add a switch?  That way in the event of a failure,
> > we can re-run with forking on, and therefore can tell if the crash is
> > specifically due to the test that is crashing, or a side effect caused
> > by something that came before.
>
> I would also like a switch. I don't like it that a change which
> knowingly introduces problems with acceptance tests is committed without
> discussion. Should we discard kernel tests from drlvm commits until they
> are fixed? I think that there was an agreement about no regression. So
> now all commits to drlvm are blocked.

But there *is* cmd-line switch, my bad that I didn't explained this
more clearly. And I'm not sure we firmly adopted "zero regression"
policy - at least intermittent failures in kernel tests did block
nobody so far. Should we vote formally, BTW?
Generally I agree it is always better to discuss, and in fact
hesitated to commit with default forking set to "once" - but decided
this is right thing to do rigth now. The current trend to make drlvm
truly standard VM for harmony, recently Alexei even proclaimed 100%
HUT pass rate, neverthless drlvm is not yet reliable enough and we
should keep the momentum and face possible problems with open eyes.
Again, I'm sorry to bother you^H^H^H us VM guys, but believe this is
neccessary evil now.

--
Alexey

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Gregory Shimansky <gs...@gmail.com>.
Geir Magnusson Jr. wrote:
> 
> 
> Gregory Shimansky wrote:
>> Geir Magnusson Jr. wrote:
>>>
>>>
>>> Gregory Shimansky wrote:
>>>
>>>> I just complained that instead of breaking things like this, the new 
>>>> mode could be introduced as an option to allow us to fix tests 
>>>> first, then switch to it.
>>>
>>> I'm missing something though - what broke because of this change?
>>
>> Well I assumed that kernel tests crashes on windows XP are because of 
>> the new mode when all tests are executed in the same VM. When test is 
>> executed separately it doesn't crash. I am going to try to find the 
>> problem now.
> 
> If that's the case, I'd argue that we were already broken, and we just 
> didn't know it.

Yes this is true.

But imagine that I've created a new test that fails on VM. Should I 
immediately add it to acceptance tests, or should I fix the problem 
(announce about it in case I cannot do it myself) and only then add this 
test as a regression?

The same happened with kernel tests. The switch was done before the 
problem was fixed. I think it is not right.

-- 
Gregory


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Gregory Shimansky wrote:
> Geir Magnusson Jr. wrote:
>>
>>
>> Gregory Shimansky wrote:
>>
>>> I just complained that instead of breaking things like this, the new 
>>> mode could be introduced as an option to allow us to fix tests first, 
>>> then switch to it.
>>
>> I'm missing something though - what broke because of this change?
> 
> Well I assumed that kernel tests crashes on windows XP are because of 
> the new mode when all tests are executed in the same VM. When test is 
> executed separately it doesn't crash. I am going to try to find the 
> problem now.

If that's the case, I'd argue that we were already broken, and we just 
didn't know it.

geir

> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Gregory Shimansky <gs...@gmail.com>.
Geir Magnusson Jr. wrote:
> 
> 
> Gregory Shimansky wrote:
>> Geir Magnusson Jr. wrote:
>>>
>>>
>>> Gregory Shimansky wrote:
>>>>
>>>> I would also like a switch. I don't like it that a change which 
>>>> knowingly introduces problems with acceptance tests is committed 
>>>> without discussion. Should we discard kernel tests from drlvm 
>>>> commits until they are fixed? I think that there was an agreement 
>>>> about no regression. So now all commits to drlvm are blocked.
>>>>
>>>
>>>
>>> Can we just declare that it's time to drive to getting these tests 
>>> fixed????
>>
>> I never wrote that we shouldn't fix these bugs.
> 
> I know.
> 
>> I just complained that instead of breaking things like this, the new 
>> mode could be introduced as an option to allow us to fix tests first, 
>> then switch to it.
> 
> I'm missing something though - what broke because of this change?

Well I assumed that kernel tests crashes on windows XP are because of 
the new mode when all tests are executed in the same VM. When test is 
executed separately it doesn't crash. I am going to try to find the 
problem now.

-- 
Gregory


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Gregory Shimansky wrote:
> Geir Magnusson Jr. wrote:
>>
>>
>> Gregory Shimansky wrote:
>>>
>>> I would also like a switch. I don't like it that a change which 
>>> knowingly introduces problems with acceptance tests is committed 
>>> without discussion. Should we discard kernel tests from drlvm commits 
>>> until they are fixed? I think that there was an agreement about no 
>>> regression. So now all commits to drlvm are blocked.
>>>
>>
>>
>> Can we just declare that it's time to drive to getting these tests 
>> fixed????
> 
> I never wrote that we shouldn't fix these bugs.

I know.

> I just complained that 
> instead of breaking things like this, the new mode could be introduced 
> as an option to allow us to fix tests first, then switch to it.

I'm missing something though - what broke because of this change?

geir


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Gregory Shimansky <gs...@gmail.com>.
Geir Magnusson Jr. wrote:
> 
> 
> Gregory Shimansky wrote:
>>
>> I would also like a switch. I don't like it that a change which 
>> knowingly introduces problems with acceptance tests is committed 
>> without discussion. Should we discard kernel tests from drlvm commits 
>> until they are fixed? I think that there was an agreement about no 
>> regression. So now all commits to drlvm are blocked.
>>
> 
> 
> Can we just declare that it's time to drive to getting these tests 
> fixed????

I never wrote that we shouldn't fix these bugs. I just complained that 
instead of breaking things like this, the new mode could be introduced 
as an option to allow us to fix tests first, then switch to it.

> I'll start a new thread.

-- 
Gregory


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Gregory Shimansky wrote:
> 
> I would also like a switch. I don't like it that a change which 
> knowingly introduces problems with acceptance tests is committed without 
> discussion. Should we discard kernel tests from drlvm commits until they 
> are fixed? I think that there was an agreement about no regression. So 
> now all commits to drlvm are blocked.
> 


Can we just declare that it's time to drive to getting these tests fixed????

I'll start a new thread.

geir

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Gregory Shimansky <gs...@gmail.com>.
Geir Magnusson Jr. wrote:
> 
> 
> Alexey Varlamov wrote:
>> Folks,
>>
>> I've just did a little step in improving pre-commit testing for DRLVM;
>> most important change is a move from "perTest" forking mode to "once"
>> (aka sameVM mode).
>> This reduces testing time drastically (~50%), but may introduce some
>> extra instability (like new intermittent failures or timeouts).
> 
> Plus the inability to figure out what's screwing things up.
> 
> I can't decide if I like this.  On one hand, I like it because it's 
> actually better to find side-effects - some test can pass, but still 
> leave the VM in a broken state that another test will show.

I think the change has a good intension but it should've gone through 
more testing. Preferably the fixes for problems on windows should've 
been included into the patch. If the problems are too hard to fix, why 
not open a discussion before changing the files in SVN?

> OTOH, it does remove the clarity of each test being a single, separate 
> test.  It conceptually mixes integration testing with unit testing.
> 
> Can you please just add a switch?  That way in the event of a failure, 
> we can re-run with forking on, and therefore can tell if the crash is 
> specifically due to the test that is crashing, or a side effect caused 
> by something that came before.

I would also like a switch. I don't like it that a change which 
knowingly introduces problems with acceptance tests is committed without 
discussion. Should we discard kernel tests from drlvm commits until they 
are fixed? I think that there was an agreement about no regression. So 
now all commits to drlvm are blocked.

-- 
Gregory


Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.

Alexey Varlamov wrote:
> Folks,
> 
> I've just did a little step in improving pre-commit testing for DRLVM;
> most important change is a move from "perTest" forking mode to "once"
> (aka sameVM mode).
> This reduces testing time drastically (~50%), but may introduce some
> extra instability (like new intermittent failures or timeouts).

Plus the inability to figure out what's screwing things up.

I can't decide if I like this.  On one hand, I like it because it's 
actually better to find side-effects - some test can pass, but still 
leave the VM in a broken state that another test will show.

OTOH, it does remove the clarity of each test being a single, separate 
test.  It conceptually mixes integration testing with unit testing.

Can you please just add a switch?  That way in the event of a failure, 
we can re-run with forking on, and therefore can tell if the crash is 
specifically due to the test that is crashing, or a side effect caused 
by something that came before.

geir



> Nevertheless I believe we are ready to accept this challenge and it is
> important to take it earlier.
> Other enhancements, are described below; hopefully will make us more
> productive. Have fun!
> 
> 
> 2006/11/20, varlax@apache.org <va...@apache.org>:
>> Author: varlax
>> Date: Mon Nov 20 03:27:39 2006
>> New Revision: 477149
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=477149
>> Log:
>> Refactored kernel.test.xml, made it more "ant-minded" and added some 
>> features:
>> [+] "kernel.test.forkmode" support, "once" by default;
>> [+] single "test.case" support;
>> [+] "kernel.test.failfast" behaviour support;
>> [!] Improved results reporting;
>> [+] easy customization via property file;
>>
>> Some intermittent failures appeared on Win32 due to forking only 
>> "once", but we must meet them sooner or later - why not now...
>>
>> Added:
>>    harmony/enhanced/drlvm/trunk/build/make/test.properties
>> Modified:
>>    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>>
>> Modified: harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
>> URL: 
>> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149 
>>
>> ============================================================================== 
>>
>> --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml 
>> (original)
>> +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml 
>> Mon Nov 20 03:27:39 2006
>> @@ -1,17 +1,18 @@
>>  <!--
>> -    Copyright 2006 The Apache Software Foundation or its licensors, 
>> as applicable.
>> -
>> -    Licensed under the Apache License, Version 2.0 (the "License");
>> -    you may not use this file except in compliance with the License.
>> -    You may obtain a copy of the License at
>> -
>> -       http://www.apache.org/licenses/LICENSE-2.0
>> -
>> -    Unless required by applicable law or agreed to in writing, software
>> -    distributed under the License is distributed on an "AS IS" BASIS,
>> -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>> implied.
>> -    See the License for the specific language governing permissions and
>> -    limitations under the License.
>> +     Licensed to the Apache Software Foundation (ASF) under one or more
>> +     contributor license agreements.  See the NOTICE file distributed 
>> with
>> +     this work for additional information regarding copyright ownership.
>> +     The ASF licenses this file to You under the Apache License, 
>> Version 2.0
>> +     (the "License"); you may not use this file except in compliance 
>> with
>> +     the License.  You may obtain a copy of the License at
>> +
>> +         http://www.apache.org/licenses/LICENSE-2.0
>> +
>> +     Unless required by applicable law or agreed to in writing, software
>> +     distributed under the License is distributed on an "AS IS" BASIS,
>> +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
>> implied.
>> +     See the License for the specific language governing permissions and
>> +     limitations under the License.
>>  -->
>>
>>  <project name="KERNEL TESTS">
>> @@ -20,7 +21,9 @@
>>     <property name="kernel.test.dir" 
>> location="${build.semi.dir}/kernel.tests"/>
>>     <property name="test.resource.path" 
>> location="${kernel.test.dir}/resources"/>
>>     <property name="test.class.path" 
>> location="${kernel.test.dir}/classes"/>
>> -
>> +
>> +    <property name="test.jvm.exe" value="${build.deploy.dir}/bin/java"/>
>> +    <property file="test.properties"/>
>>
>>     <patternset id="kernel.test.java.pattern">
>>         <include name="org/apache/harmony/**/*Test.java" />
>> @@ -36,68 +39,58 @@
>>         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
>>         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
>>         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
>> -
>> -       <!-- This test fails -->
>> -       <!--exclude name="java/lang/ThreadTest.java" /-->
>>     </patternset>
>> -
>> -    <property name="vm.use_verifier" value="1" />
>> -    <property name="kernel.test.timeout" value="360000" />
>>
>> -    <target name="kernel.test" depends="-pre-kernel-test">
>> -        <property name="test.mode" value="jet+opt+int" />
>> -        <if>
>> -            <contains string="${test.mode}" substring="batch" />
>> -            <then>
>> -                <antcallback target="-run-kernel-test-batch"
>> -                    return="batch.status">
>> -                </antcallback>
>> -            </then>
>> -        </if>
>> -        <if>
>> -            <contains string="${test.mode}" substring="jet" />
>> -            <then>
>> -                <antcallback target="-run-kernel-test"
>> -                    return="jit.jet.status">
>> -                    <param name="jit.or.interpreter" 
>> value="jitrino.jet" />
>> -                    <param name="int.or.jit.arg" 
>> value="-Dem.properties=jet" />
>> -                </antcallback>
>> -            </then>
>> -        </if>
>> -        <if>
>> -            <contains string="${test.mode}" substring="opt" />
>> -            <then>
>> -                <antcallback target="-run-kernel-test"
>> -                    return="jit.opt.status">
>> -                    <param name="jit.or.interpreter" 
>> value="jitrino.opt" />
>> -                    <param name="int.or.jit.arg" 
>> value="-Dem.properties=opt" />
>> -                </antcallback>
>> -            </then>
>> -        </if>
>> -        <if>
>> -            <contains string="${test.mode}" substring="int" />
>> -            <then>
>> -                <antcallback target="-run-kernel-test"
>> -                    return="interpreter.status">
>> -                    <param name="jit.or.interpreter" 
>> value="interpreter" />
>> -                    <param name="int.or.jit.arg" value="-Xint" />
>> -                </antcallback>
>> -            </then>
>> -        </if>
>> -        <if>
>> -            <or>
>> -                <contains string="${jit.jet.status}" 
>> substring="FAILED" />
>> -                <contains string="${jit.opt.status}" 
>> substring="FAILED" />
>> -                <contains string="${interpreter.status}" 
>> substring="FAILED" />
>> -                <contains string="${batch.status}" substring="FAILED" />
>> -            </or>
>> -            <then>
>> -                <fail message="Kernel tests FAILED" />
>> -            </then>
>> -        </if>
>> -    </target>
>> +    <target name="kernel.test"
>> +        depends="compile-kernel-test, run-kernel-test, 
>> report-kernel-test, check-kernel-test"/>
>>
>> -    <target name="compile-kernel-tests" depends="">
>> +    <target name="run-kernel-test" depends="-prepare-kernel-test">
>> +        <condition property="kernel.test.continue" value="true" 
>> else="false">
>> +            <isfalse value="${kernel.test.failfast}"/>
>> +        </condition>
>> +        <for list="${kernel.test.mode}" param="mode"
>> +            trim="true" keepgoing="${kernel.test.continue}">
>> +            <sequential>
>> +                <antcall target="-run-kernel-test-batch">
>> +                    <param name="kernel.mode" value="@{mode}" />
>> +                </antcall>
>> +            </sequential>
>> +        </for>
>> +    </target>
>> +
>> +    <target name="report-kernel-test">
>> +        <for list="${kernel.test.mode}" param="mode"
>> +            trim="true" keepgoing="true">
>> +            <sequential>
>> +                <junitreport 
>> todir="${kernel.test.dir}/reports/@{mode}.mode">
>> +                    <fileset 
>> dir="${kernel.test.dir}/reports/@{mode}.mode">
>> +                        <include name="*.xml" />
>> +                    </fileset>
>> +                    <report format="frames"
>> +                        
>> todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
>> +                </junitreport>
>> +            </sequential>
>> +        </for>
>> +    </target>
>> +
>> +    <target name="check-kernel-test">
>> +        <loadfile property="kernel.test.summary"
>> +            srcFile="${kernel.test.dir}/reports/summary"/>
>> +        <echo message="  ***************************${line.separator}"/>
>> +        <echo message="  *** Kernel tests status ***${line.separator}"/>
>> +        <echo message="  ***************************${line.separator}"/>
>> +        <echo message="${line.separator}"/>
>> +        <echo message="${kernel.test.summary}"/>
>> +        <echo message="${line.separator}"/>
>> +        <echo>Please find detailed results under 
>> ${kernel.test.dir}/reports directory.</echo>
>> +
>> +        <condition property="kernel.failures">
>> +            <contains string="${kernel.test.summary}" 
>> substring="FAILED" />
>> +        </condition>
>> +        <fail if="kernel.failures" message="There were test 
>> failures." />
>> +    </target>
>> +
>> +    <target name="compile-kernel-test">
>>         <mkdir dir="${test.resource.path}" />
>>         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
>>             destdir="${test.resource.path}"
>> @@ -111,177 +104,61 @@
>>         <delete quiet="true" dir="${test.class.path}/notfound" />
>>     </target>
>>
>> -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
>> +    <target name="-prepare-kernel-test">
>> +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
>> +        <mkdir dir="${kernel.test.dir}/reports" />
>> +
>>         <condition property="junit.jar" value="${junit.home}/junit.jar">
>>             <isset property="junit.home" />
>>         </condition>
>> -        <property name="junit.jar" 
>> location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
>> -        <if>
>> -            <not>
>> -                <available file="${junit.jar}"/>
>> -            </not>
>> -            <then>
>> -                <echo>
>> +        <property name="junit.jar"
>> +            
>> location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
>> +        <available file="${junit.jar}" property="junit.found"/>
>> +        <fail unless="junit.found">
>>                 ==============================================
>>                 Please set the classpath of junit as follows:
>>                 build.bat -Djunit.jar=%JUNIT_HOME% test
>>                 ==============================================
>> -                </echo>
>> -                <fail message="Kernel tests misconfigured" />
>> -            </then>
>> -        </if>
>> -
>> -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
>> -        <delete quiet="true" dir="${kernel.test.dir}/ref-reports" />
>> -        <mkdir dir="${kernel.test.dir}/reports" />
>> -        <mkdir dir="${kernel.test.dir}/ref-reports" />
>> -
>> +        </fail>
>>     </target>
>>
>>     <target name="-run-kernel-test-batch">
>> +        <propertycopy property="kernel.mode.name" 
>> from="${kernel.mode}.name" override="on"/>
>> +        <propertycopy property="kernel.mode.switch" 
>> from="${kernel.mode}.switch" override="on"/>
>> +        <echo>
>> +        ==================================
>> +        Run kernel tests using ${kernel.mode.name}
>> +        ==================================
>> +        </echo>
>>         <property name="report.dir"
>> -            location="${kernel.test.dir}/reports/batch.mode"/>
>> +            location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
>>         <mkdir dir="${report.dir}" />
>>
>> -        <junit fork="yes" forkmode="once" 
>> timeout="${kernel.test.timeout}"
>> -            haltonfailure="no" failureproperty="batch.failed"
>> -            filtertrace="no" printsummary="on"
>> -            jvm="${build.deploy.dir}/bin/java">
>> -
>> -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
>> +        <junit fork="yes" failureproperty="kernel.failed"
>> +            filtertrace="no" printsummary="on" showoutput="off"
>> +            haltonfailure="${kernel.test.failfast}"
>> +            forkmode="${kernel.test.forkmode}"
>> +            timeout="${kernel.test.timeout}"
>> +            jvm="${test.jvm.exe}">
>>
>> -            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
>>             <jvmarg value="-Dvm.assert_dialog=0" />
>> +            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
>> +            <jvmarg value="${kernel.mode.switch}" />
>>             <jvmarg 
>> value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" 
>> />
>> -            <formatter type="brief"/>
>> -            <batchtest todir="${report.dir}">
>> +            <formatter type="xml"/>
>> +            <batchtest todir="${report.dir}" unless="test.case">
>>                 <fileset dir="${kernel.test.javasrc}">
>>                     <patternset refid="kernel.test.java.pattern"/>
>>                 </fileset>
>>             </batchtest>
>> +            <test name="${test.case}" todir="${report.dir}" 
>> if="test.case" />
>>         </junit>
>>
>> -        <condition property="batch.status" value="FAILED" else="PASSED">
>> -            <isset property="batch.failed" />
>> +        <condition property="kernel.status" value="FAILED" 
>> else="PASSED">
>> +            <isset property="kernel.failed" />
>>         </condition>
>> -    </target>
>> -
>> -
>> -    <target name="-run-kernel-test">
>> -        <echo>
>> -               ==================================
>> -               Run kernel tests using ${jit.or.interpreter}
>> -               ==================================
>> -               </echo>
>> -
>> -        <property name="report.dir"
>> -            
>> location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
>> -        <mkdir dir="${report.dir}" />
>> -
>> -        <for param="test">
>> -            <fileset dir="${kernel.test.javasrc}">
>> -                <patternset refid="kernel.test.java.pattern" />
>> -            </fileset>
>> -            <sequential>
>> -
>> -                <basename property="last.dir" 
>> file="${kernel.test.javasrc}" />
>> -                <propertyregex property="class.name" override="true" 
>> input="@{test}" regexp="(.)+${last.dir}\${file.separator}" replace="" 
>> defaultValue="@{test}" />
>> -                <propertyregex property="class.name" override="true" 
>> input="${class.name}" regexp="\.java" replace="" 
>> defaultValue="${class.name}" />
>> -                <propertyregex property="class.name" override="true" 
>> input="${class.name}" regexp="\${file.separator}" replace="." 
>> global="true" defaultValue="${class.name}" />
>> -                <echo message="RUNNING : ${class.name}" />
>> -
>> -                <junit fork="yes" failureproperty="@{test}.failed"
>> -                    timeout="${kernel.test.timeout}" 
>> newenvironment="yes" filtertrace="no"
>> -                    jvm="${build.deploy.dir}/bin/java">
>> -
>> -                    <env key="JAVA_HOME" value="${build.deploy.dir}"/>
>> -
>> -                    <!--env key="LD_LIBRARY_PATH" 
>> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
>> -                    <env key="SYSTEMDRIVE" value="${env.SystemDrive}" />
>> -                    <env key="HOME" value="${env.HOME}" />
>> -                    <env key="PATH" value="${env.PATH}" />
>> -                    <jvmarg 
>> value="-Dtest.resource.path=${test.resource.path}"/>
>> -                    <jvmarg 
>> value="-Demma.coverage.out.file=${emma.coverage.out}" />
>> -                    <jvmarg value="-Demma.coverage.out.merge=true" />
>> -                    <jvmarg 
>> value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${emma.jar}" 
>> />
>> -                    <jvmarg 
>> value="-Dvm.use_verifier=${vm.use_verifier}" />
>> -                    <jvmarg value="-Dvm.assert_dialog=0" />
>> -                    <jvmarg 
>> value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" 
>> />
>> -                    <jvmarg value="${int.or.jit.arg}" />
>> -                    <jvmarg value="-ea:java.lang.reflect..." />
>> -                    <formatter type="brief"/>
>> -                    <formatter type="xml" />
>> -                    <test name="${class.name}" todir="${report.dir}"/>
>> -                </junit>
>> -                <condition property="${jit.or.interpreter}.status" 
>> value="FAILED">
>> -                    <isset property="@{test}.failed" />
>> -                </condition>
>> -
>> -                <!--
>> -                Gregory
>> -                It appears that some kernel unit tests for drlvm 
>> classes are
>> -                implementation specific and may fail on RI. So it 
>> makes no
>> -                sense to check tests on RI. Also running test on RI
>> -                right after it failed on drlvm creates wrong test run 
>> report.
>> -
>> -                I am commenting this block for now in case someone 
>> wants it
>> -                back, possibly under some condition. My POV is that this
>> -                block should be removed eventually.
>> -                <if>
>> -                    <or>
>> -                        <isset property="@{test}.failed" />
>> -                        <isset property="kernel.test.reference" />
>> -                    </or>
>> -                    <then>
>> -                        <junit fork="yes" 
>> failureproperty="@{test}.ref.failed"
>> -                            timeout="${kernel.test.timeout}"
>> -                            newenvironment="yes" filtertrace="no">
>> -
>> -
>> -                            <env key="JAVA_HOME" 
>> value="${build.deploy.dir}"/>
>> -
>> -                            <!- -env key="LD_LIBRARY_PATH" 
>> value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
>> -                            <env key="SYSTEMDRIVE" 
>> value="${env.SystemDrive}" />
>> -                            <env key="HOME" value="${env.HOME}" />
>> -                            <env key="PATH" value="${env.PATH}" />
>> -                            <jvmarg 
>> value="-Dtest.resource.path=${test.resource.path}"/>
>> -                            <jvmarg 
>> value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" 
>> />
>> -                            <formatter type="brief"/>
>> -                            <formatter type="xml" />
>> -                            <test name="${class.name}" 
>> todir="${kernel.test.dir}/ref-reports"/>
>> -                        </junit>
>> -
>> -                        <if>
>> -                            <isset property="@{test}.ref.failed" />
>> -                            <then>
>> -                                <echo message="   **** FAILED on 
>> reference JRE ****" />
>> -                            </then>
>> -                        </if>
>> -                    </then>
>> -                </if>
>> -                /-->
>> -            </sequential>
>> -        </for>
>> -
>> -        <junitreport todir="${report.dir}">
>> -            <fileset dir="${report.dir}">
>> -                <include name="TEST-*.xml" />
>> -            </fileset>
>> -            <report format="frames" todir="${report.dir}/html" />
>> -        </junitreport>
>> -        <junitreport todir="${kernel.test.dir}/ref-reports">
>> -            <fileset dir="${kernel.test.dir}/ref-reports">
>> -                <include name="TEST-*.xml" />
>> -            </fileset>
>> -            <report format="frames" 
>> todir="${kernel.test.dir}/ref-reports/html" />
>> -        </junitreport>
>> -        <property name="${jit.or.interpreter}.status" value="PASSED"/>
>> -        <propertycopy name="status" 
>> from="${jit.or.interpreter}.status"/>
>> -        <echo message="" />
>> -        <echo 
>> message="==============================================" />
>> -        <echo message="Kernel tests ${status} using 
>> ${jit.or.interpreter}. Please find the detailed results here:" />
>> -        <echo 
>> message="${report.dir}${file.separator}html${file.separator}index.html" 
>> />
>> -        <echo 
>> message="==============================================" />
>>
>> +        <concat append="on" 
>> destfile="${kernel.test.dir}/reports/summary"
>> +            >      ${kernel.mode.name} 
>> ${kernel.status}${line.separator}</concat>
>>     </target>
>>  </project>
>>
>> Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
>> URL: 
>> http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149 
>>
>> ============================================================================== 
>>
>> --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
>> +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov 20 
>> 03:27:39 2006
>> @@ -0,0 +1,19 @@
>> +kernel.test.mode=jet,opt,int
>> +kernel.test.failfast=off
>> +kernel.test.forkmode=once
>> +kernel.test.timeout=360000
>> +
>> +
>> +jit.name=Client mode JIT (default)
>> +jit.switch=-Dbogus
>> +
>> +jet.name=jitrino.JET
>> +jet.switch=-Xem:jet
>> +
>> +opt.name=jitrino.OPT
>> +opt.switch=-Xem:opt
>> +
>> +int.name=interpreter
>> +int.switch=-Xint
>> +
>> +
>>
>>
>>
> 

Re: svn commit: r477149 - in /harmony/enhanced/drlvm/trunk/build/make: targets/kernel.test.xml test.properties

Posted by Egor Pasko <eg...@gmail.com>.
On the 0x227 day of Apache Harmony Alexey Varlamov wrote:
> Folks,
> 
> I've just did a little step in improving pre-commit testing for DRLVM;
> most important change is a move from "perTest" forking mode to "once"
> (aka sameVM mode).
> This reduces testing time drastically (~50%), but may introduce some
> extra instability (like new intermittent failures or timeouts).
> Nevertheless I believe we are ready to accept this challenge and it is
> important to take it earlier.
> Other enhancements, are described below; hopefully will make us more
> productive. Have fun!

Although, that was a kind of surprize... :) I like the changes because:
* we do not have to spend 50% of pre-commit testing on
  loading/compiling same bootstrap many times.
* a good opportunity opened to make DRLVM more stable with relatively
  small tests

That makes me think we have testing time spent more effectively.
+1 to have fun

> 
> 2006/11/20, varlax@apache.org <va...@apache.org>:
> > Author: varlax
> > Date: Mon Nov 20 03:27:39 2006
> > New Revision: 477149
> >
> > URL: http://svn.apache.org/viewvc?view=rev&rev=477149
> > Log:
> > Refactored kernel.test.xml, made it more "ant-minded" and added some features:
> > [+] "kernel.test.forkmode" support, "once" by default;
> > [+] single "test.case" support;
> > [+] "kernel.test.failfast" behaviour support;
> > [!] Improved results reporting;
> > [+] easy customization via property file;
> >
> > Some intermittent failures appeared on Win32 due to forking only "once", but we must meet them sooner or later - why not now...
> >
> > Added:
> >    harmony/enhanced/drlvm/trunk/build/make/test.properties
> > Modified:
> >    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> >
> > Modified: harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
> > URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml?view=diff&rev=477149&r1=477148&r2=477149
> > ==============================================================================
> > --- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml (original)
> > +++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml Mon Nov 20 03:27:39 2006
> > @@ -1,17 +1,18 @@
> >  <!--
> > -    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
> > -
> > -    Licensed under the Apache License, Version 2.0 (the "License");
> > -    you may not use this file except in compliance with the License.
> > -    You may obtain a copy of the License at
> > -
> > -       http://www.apache.org/licenses/LICENSE-2.0
> > -
> > -    Unless required by applicable law or agreed to in writing, software
> > -    distributed under the License is distributed on an "AS IS" BASIS,
> > -    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > -    See the License for the specific language governing permissions and
> > -    limitations under the License.
> > +     Licensed to the Apache Software Foundation (ASF) under one or more
> > +     contributor license agreements.  See the NOTICE file distributed with
> > +     this work for additional information regarding copyright ownership.
> > +     The ASF licenses this file to You under the Apache License, Version 2.0
> > +     (the "License"); you may not use this file except in compliance with
> > +     the License.  You may obtain a copy of the License at
> > +
> > +         http://www.apache.org/licenses/LICENSE-2.0
> > +
> > +     Unless required by applicable law or agreed to in writing, software
> > +     distributed under the License is distributed on an "AS IS" BASIS,
> > +     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> > +     See the License for the specific language governing permissions and
> > +     limitations under the License.
> >  -->
> >
> >  <project name="KERNEL TESTS">
> > @@ -20,7 +21,9 @@
> >     <property name="kernel.test.dir" location="${build.semi.dir}/kernel.tests"/>
> >     <property name="test.resource.path" location="${kernel.test.dir}/resources"/>
> >     <property name="test.class.path" location="${kernel.test.dir}/classes"/>
> > -
> > +
> > +    <property name="test.jvm.exe" value="${build.deploy.dir}/bin/java"/>
> > +    <property file="test.properties"/>
> >
> >     <patternset id="kernel.test.java.pattern">
> >         <include name="org/apache/harmony/**/*Test.java" />
> > @@ -36,68 +39,58 @@
> >         <exclude name="java/lang/RuntimeAdditionalTest40.java" />
> >         <exclude name="java/lang/RuntimeAdditionalTest41.java" />
> >         <exclude name="java/lang/RuntimeAdditionalTest42.java" />
> > -
> > -       <!-- This test fails -->
> > -       <!--exclude name="java/lang/ThreadTest.java" /-->
> >     </patternset>
> > -
> > -    <property name="vm.use_verifier" value="1" />
> > -    <property name="kernel.test.timeout" value="360000" />
> >
> > -    <target name="kernel.test" depends="-pre-kernel-test">
> > -        <property name="test.mode" value="jet+opt+int" />
> > -        <if>
> > -            <contains string="${test.mode}" substring="batch" />
> > -            <then>
> > -                <antcallback target="-run-kernel-test-batch"
> > -                    return="batch.status">
> > -                </antcallback>
> > -            </then>
> > -        </if>
> > -        <if>
> > -            <contains string="${test.mode}" substring="jet" />
> > -            <then>
> > -                <antcallback target="-run-kernel-test"
> > -                    return="jit.jet.status">
> > -                    <param name="jit.or.interpreter" value="jitrino.jet" />
> > -                    <param name="int.or.jit.arg" value="-Dem.properties=jet" />
> > -                </antcallback>
> > -            </then>
> > -        </if>
> > -        <if>
> > -            <contains string="${test.mode}" substring="opt" />
> > -            <then>
> > -                <antcallback target="-run-kernel-test"
> > -                    return="jit.opt.status">
> > -                    <param name="jit.or.interpreter" value="jitrino.opt" />
> > -                    <param name="int.or.jit.arg" value="-Dem.properties=opt" />
> > -                </antcallback>
> > -            </then>
> > -        </if>
> > -        <if>
> > -            <contains string="${test.mode}" substring="int" />
> > -            <then>
> > -                <antcallback target="-run-kernel-test"
> > -                    return="interpreter.status">
> > -                    <param name="jit.or.interpreter" value="interpreter" />
> > -                    <param name="int.or.jit.arg" value="-Xint" />
> > -                </antcallback>
> > -            </then>
> > -        </if>
> > -        <if>
> > -            <or>
> > -                <contains string="${jit.jet.status}" substring="FAILED" />
> > -                <contains string="${jit.opt.status}" substring="FAILED" />
> > -                <contains string="${interpreter.status}" substring="FAILED" />
> > -                <contains string="${batch.status}" substring="FAILED" />
> > -            </or>
> > -            <then>
> > -                <fail message="Kernel tests FAILED" />
> > -            </then>
> > -        </if>
> > -    </target>
> > +    <target name="kernel.test"
> > +        depends="compile-kernel-test, run-kernel-test, report-kernel-test, check-kernel-test"/>
> >
> > -    <target name="compile-kernel-tests" depends="">
> > +    <target name="run-kernel-test" depends="-prepare-kernel-test">
> > +        <condition property="kernel.test.continue" value="true" else="false">
> > +            <isfalse value="${kernel.test.failfast}"/>
> > +        </condition>
> > +        <for list="${kernel.test.mode}" param="mode"
> > +            trim="true" keepgoing="${kernel.test.continue}">
> > +            <sequential>
> > +                <antcall target="-run-kernel-test-batch">
> > +                    <param name="kernel.mode" value="@{mode}" />
> > +                </antcall>
> > +            </sequential>
> > +        </for>
> > +    </target>
> > +
> > +    <target name="report-kernel-test">
> > +        <for list="${kernel.test.mode}" param="mode"
> > +            trim="true" keepgoing="true">
> > +            <sequential>
> > +                <junitreport todir="${kernel.test.dir}/reports/@{mode}.mode">
> > +                    <fileset dir="${kernel.test.dir}/reports/@{mode}.mode">
> > +                        <include name="*.xml" />
> > +                    </fileset>
> > +                    <report format="frames"
> > +                        todir="${kernel.test.dir}/reports/@{mode}.mode/html" />
> > +                </junitreport>
> > +            </sequential>
> > +        </for>
> > +    </target>
> > +
> > +    <target name="check-kernel-test">
> > +        <loadfile property="kernel.test.summary"
> > +            srcFile="${kernel.test.dir}/reports/summary"/>
> > +        <echo message="  ***************************${line.separator}"/>
> > +        <echo message="  *** Kernel tests status ***${line.separator}"/>
> > +        <echo message="  ***************************${line.separator}"/>
> > +        <echo message="${line.separator}"/>
> > +        <echo message="${kernel.test.summary}"/>
> > +        <echo message="${line.separator}"/>
> > +        <echo>Please find detailed results under ${kernel.test.dir}/reports directory.</echo>
> > +
> > +        <condition property="kernel.failures">
> > +            <contains string="${kernel.test.summary}" substring="FAILED" />
> > +        </condition>
> > +        <fail if="kernel.failures" message="There were test failures." />
> > +    </target>
> > +
> > +    <target name="compile-kernel-test">
> >         <mkdir dir="${test.resource.path}" />
> >         <javac srcdir="${kernel.test.javasrc}/../kernel_resources"
> >             destdir="${test.resource.path}"
> > @@ -111,177 +104,61 @@
> >         <delete quiet="true" dir="${test.class.path}/notfound" />
> >     </target>
> >
> > -    <target name="-pre-kernel-test" depends="compile-kernel-tests">
> > +    <target name="-prepare-kernel-test">
> > +        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> > +        <mkdir dir="${kernel.test.dir}/reports" />
> > +
> >         <condition property="junit.jar" value="${junit.home}/junit.jar">
> >             <isset property="junit.home" />
> >         </condition>
> > -        <property name="junit.jar" location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
> > -        <if>
> > -            <not>
> > -                <available file="${junit.jar}"/>
> > -            </not>
> > -            <then>
> > -                <echo>
> > +        <property name="junit.jar"
> > +            location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
> > +        <available file="${junit.jar}" property="junit.found"/>
> > +        <fail unless="junit.found">
> >                 ==============================================
> >                 Please set the classpath of junit as follows:
> >                 build.bat -Djunit.jar=%JUNIT_HOME% test
> >                 ==============================================
> > -                </echo>
> > -                <fail message="Kernel tests misconfigured" />
> > -            </then>
> > -        </if>
> > -
> > -        <delete quiet="true" dir="${kernel.test.dir}/reports" />
> > -        <delete quiet="true" dir="${kernel.test.dir}/ref-reports" />
> > -        <mkdir dir="${kernel.test.dir}/reports" />
> > -        <mkdir dir="${kernel.test.dir}/ref-reports" />
> > -
> > +        </fail>
> >     </target>
> >
> >     <target name="-run-kernel-test-batch">
> > +        <propertycopy property="kernel.mode.name" from="${kernel.mode}.name" override="on"/>
> > +        <propertycopy property="kernel.mode.switch" from="${kernel.mode}.switch" override="on"/>
> > +        <echo>
> > +        ==================================
> > +        Run kernel tests using ${kernel.mode.name}
> > +        ==================================
> > +        </echo>
> >         <property name="report.dir"
> > -            location="${kernel.test.dir}/reports/batch.mode"/>
> > +            location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
> >         <mkdir dir="${report.dir}" />
> >
> > -        <junit fork="yes" forkmode="once" timeout="${kernel.test.timeout}"
> > -            haltonfailure="no" failureproperty="batch.failed"
> > -            filtertrace="no" printsummary="on"
> > -            jvm="${build.deploy.dir}/bin/java">
> > -
> > -            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> > +        <junit fork="yes" failureproperty="kernel.failed"
> > +            filtertrace="no" printsummary="on" showoutput="off"
> > +            haltonfailure="${kernel.test.failfast}"
> > +            forkmode="${kernel.test.forkmode}"
> > +            timeout="${kernel.test.timeout}"
> > +            jvm="${test.jvm.exe}">
> >
> > -            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> >             <jvmarg value="-Dvm.assert_dialog=0" />
> > +            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> > +            <jvmarg value="${kernel.mode.switch}" />
> >             <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
> > -            <formatter type="brief"/>
> > -            <batchtest todir="${report.dir}">
> > +            <formatter type="xml"/>
> > +            <batchtest todir="${report.dir}" unless="test.case">
> >                 <fileset dir="${kernel.test.javasrc}">
> >                     <patternset refid="kernel.test.java.pattern"/>
> >                 </fileset>
> >             </batchtest>
> > +            <test name="${test.case}" todir="${report.dir}" if="test.case" />
> >         </junit>
> >
> > -        <condition property="batch.status" value="FAILED" else="PASSED">
> > -            <isset property="batch.failed" />
> > +        <condition property="kernel.status" value="FAILED" else="PASSED">
> > +            <isset property="kernel.failed" />
> >         </condition>
> > -    </target>
> > -
> > -
> > -    <target name="-run-kernel-test">
> > -        <echo>
> > -               ==================================
> > -               Run kernel tests using ${jit.or.interpreter}
> > -               ==================================
> > -               </echo>
> > -
> > -        <property name="report.dir"
> > -            location="${kernel.test.dir}/reports/${jit.or.interpreter}"/>
> > -        <mkdir dir="${report.dir}" />
> > -
> > -        <for param="test">
> > -            <fileset dir="${kernel.test.javasrc}">
> > -                <patternset refid="kernel.test.java.pattern" />
> > -            </fileset>
> > -            <sequential>
> > -
> > -                <basename property="last.dir" file="${kernel.test.javasrc}" />
> > -                <propertyregex property="class.name" override="true" input="@{test}" regexp="(.)+${last.dir}\${file.separator}" replace="" defaultValue="@{test}" />
> > -                <propertyregex property="class.name" override="true" input="${class.name}" regexp="\.java" replace="" defaultValue="${class.name}" />
> > -                <propertyregex property="class.name" override="true" input="${class.name}" regexp="\${file.separator}" replace="." global="true" defaultValue="${class.name}" />
> > -                <echo message="RUNNING : ${class.name}" />
> > -
> > -                <junit fork="yes" failureproperty="@{test}.failed"
> > -                    timeout="${kernel.test.timeout}" newenvironment="yes" filtertrace="no"
> > -                    jvm="${build.deploy.dir}/bin/java">
> > -
> > -                    <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> > -
> > -                    <!--env key="LD_LIBRARY_PATH" value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /-->
> > -                    <env key="SYSTEMDRIVE" value="${env.SystemDrive}" />
> > -                    <env key="HOME" value="${env.HOME}" />
> > -                    <env key="PATH" value="${env.PATH}" />
> > -                    <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> > -                    <jvmarg value="-Demma.coverage.out.file=${emma.coverage.out}" />
> > -                    <jvmarg value="-Demma.coverage.out.merge=true" />
> > -                    <jvmarg value="-Xbootclasspath/p:${emma.coverage.ip}${path.separator}${emma.jar}" />
> > -                    <jvmarg value="-Dvm.use_verifier=${vm.use_verifier}" />
> > -                    <jvmarg value="-Dvm.assert_dialog=0" />
> > -                    <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
> > -                    <jvmarg value="${int.or.jit.arg}" />
> > -                    <jvmarg value="-ea:java.lang.reflect..." />
> > -                    <formatter type="brief"/>
> > -                    <formatter type="xml" />
> > -                    <test name="${class.name}" todir="${report.dir}"/>
> > -                </junit>
> > -                <condition property="${jit.or.interpreter}.status" value="FAILED">
> > -                    <isset property="@{test}.failed" />
> > -                </condition>
> > -
> > -                <!--
> > -                Gregory
> > -                It appears that some kernel unit tests for drlvm classes are
> > -                implementation specific and may fail on RI. So it makes no
> > -                sense to check tests on RI. Also running test on RI
> > -                right after it failed on drlvm creates wrong test run report.
> > -
> > -                I am commenting this block for now in case someone wants it
> > -                back, possibly under some condition. My POV is that this
> > -                block should be removed eventually.
> > -                <if>
> > -                    <or>
> > -                        <isset property="@{test}.failed" />
> > -                        <isset property="kernel.test.reference" />
> > -                    </or>
> > -                    <then>
> > -                        <junit fork="yes" failureproperty="@{test}.ref.failed"
> > -                            timeout="${kernel.test.timeout}"
> > -                            newenvironment="yes" filtertrace="no">
> > -
> > -
> > -                            <env key="JAVA_HOME" value="${build.deploy.dir}"/>
> > -
> > -                            <!- -env key="LD_LIBRARY_PATH" value="${build.deploy.dir}/bin:${env.LD_LIBRARY_PATH}" /- ->
> > -                            <env key="SYSTEMDRIVE" value="${env.SystemDrive}" />
> > -                            <env key="HOME" value="${env.HOME}" />
> > -                            <env key="PATH" value="${env.PATH}" />
> > -                            <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
> > -                            <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
> > -                            <formatter type="brief"/>
> > -                            <formatter type="xml" />
> > -                            <test name="${class.name}" todir="${kernel.test.dir}/ref-reports"/>
> > -                        </junit>
> > -
> > -                        <if>
> > -                            <isset property="@{test}.ref.failed" />
> > -                            <then>
> > -                                <echo message="   **** FAILED on reference JRE ****" />
> > -                            </then>
> > -                        </if>
> > -                    </then>
> > -                </if>
> > -                /-->
> > -            </sequential>
> > -        </for>
> > -
> > -        <junitreport todir="${report.dir}">
> > -            <fileset dir="${report.dir}">
> > -                <include name="TEST-*.xml" />
> > -            </fileset>
> > -            <report format="frames" todir="${report.dir}/html" />
> > -        </junitreport>
> > -        <junitreport todir="${kernel.test.dir}/ref-reports">
> > -            <fileset dir="${kernel.test.dir}/ref-reports">
> > -                <include name="TEST-*.xml" />
> > -            </fileset>
> > -            <report format="frames" todir="${kernel.test.dir}/ref-reports/html" />
> > -        </junitreport>
> > -        <property name="${jit.or.interpreter}.status" value="PASSED"/>
> > -        <propertycopy name="status" from="${jit.or.interpreter}.status"/>
> > -        <echo message="" />
> > -        <echo message="==============================================" />
> > -        <echo message="Kernel tests ${status} using ${jit.or.interpreter}. Please find the detailed results here:" />
> > -        <echo message="${report.dir}${file.separator}html${file.separator}index.html" />
> > -        <echo message="==============================================" />
> >
> > +        <concat append="on" destfile="${kernel.test.dir}/reports/summary"
> > +            >      ${kernel.mode.name} ${kernel.status}${line.separator}</concat>
> >     </target>
> >  </project>
> >
> > Added: harmony/enhanced/drlvm/trunk/build/make/test.properties
> > URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?view=auto&rev=477149
> > ==============================================================================
> > --- harmony/enhanced/drlvm/trunk/build/make/test.properties (added)
> > +++ harmony/enhanced/drlvm/trunk/build/make/test.properties Mon Nov 20 03:27:39 2006
> > @@ -0,0 +1,19 @@
> > +kernel.test.mode=jet,opt,int
> > +kernel.test.failfast=off
> > +kernel.test.forkmode=once
> > +kernel.test.timeout=360000
> > +
> > +
> > +jit.name=Client mode JIT (default)
> > +jit.switch=-Dbogus
> > +
> > +jet.name=jitrino.JET
> > +jet.switch=-Xem:jet
> > +
> > +opt.name=jitrino.OPT
> > +opt.switch=-Xem:opt
> > +
> > +int.name=interpreter
> > +int.switch=-Xint
> > +
> > +
> >
> >
> >
> 

-- 
Egor Pasko