harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r573547 - in /harmony/enhanced/drlvm/trunk/build/make: ./ targets/
Date Fri, 07 Sep 2007 11:31:07 GMT
Author: varlax
Date: Fri Sep  7 04:31:06 2007
New Revision: 573547

URL: http://svn.apache.org/viewvc?rev=573547&view=rev
Log:
Fixed HARMONY-4752 [drlvm][build] tests env unification:
- common set of properties for setting tested hdk/jdk/jre and other resources; 
- shared utilities & properties controlling test compilation, execution, test generation; 
- unified layout for all test artifacts and results;
- support of single test execution (via -Dtest.case) for all suites; 
- more clean and readable code.

Added:
    harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/build/make/build.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/build.java.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/unit.test.xml
    harmony/enhanced/drlvm/trunk/build/make/test.properties

Modified: harmony/enhanced/drlvm/trunk/build/make/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build.xml Fri Sep  7 04:31:06 2007
@@ -338,7 +338,7 @@
         <echo message="       components = ${COMPONENTS}" />
     </target>
 
-    <target name="setup" depends="svn-prop,extern_dep,detect.os.arch.cxx.cfg, set.semis.dirs">
+    <target name="setup" depends="svn-prop,extern_dep,detect.os.arch.cxx.cfg, set.semis.dirs" unless="skip.setup">
         <ant antfile="setup.xml" target="setup" inheritall="true" />
     </target>
 

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/build.java.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/build.java.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/build.java.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/build.java.xml Fri Sep  7 04:31:06 2007
@@ -24,8 +24,8 @@
         <patternset id="java.source.pattern"  includes="**/*.java"/>
 
         <javac srcdir="${java.source.dir}" destdir="${java.build.dir}"
-               source="${javac.source}" target="${javac.target}"
-               debug="${java.debug.option}"
+               source="${hy.javac.source}" target="${hy.javac.target}"
+               debug="${hy.java.debug}"
                compiler="${hy.javac.compiler}">
             <!--src refid="java.source" /-->
             <patternset refid="java.source.pattern" />

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml Fri Sep  7 04:31:06 2007
@@ -15,29 +15,44 @@
     limitations under the License.
 -->
 <project name="C UNIT TESTS">
-    <target name="cunit.test" depends="init_component">
+    
+    <import file="test.common.xml"/>
+    
+    <property name="cunit.test.dir" location="${base.test.dir}/cunit.tests"/>
+    <property name="cunit.test.summary" location="${base.test.dir}/cunit.test.failed"/>
+    <property name="cunit.obj.dir" location="${cunit.test.dir}/obj" />
+    <property name="cunit.bin.dir" location="${cunit.test.dir}/bin" />
+    
+    <property name="test.vmdir" location="${test.jre.home}/bin/default"/>
+    
+    <!-- Set cunit tests sources -->
+    <fileset id="unit.test.c.src" dir="${build.VM.home}/tests/unit/thread">
+        <include name="*.c" />
+    </fileset>
+
+    <!-- Create a list of cunit tests excecutable -->
+    <condition property="cunit.test.list" value="${test.case}">
+        <isset property="test.case"/>
+    </condition>
+    <pathconvert pathsep="," property="cunit.test.list" refid="unit.test.c.src">
+        <globmapper from="*.c" to="*"/>
+    </pathconvert>
+    
+    <target name="cunit.test" depends="init_component,cunit-compile,cunit-run,cunit-report"/>
 
+    <target name="cunit-compile" >
         <!-- Set cunit tests include dirs -->
         <path id="unit.test.c.include">
             <pathelement location="${build.VM.home}/tests/unit/thread/utils" />
             <pathelement location="${build.VM.home}/tests/unit/framework" />
-            <pathelement location="${build.semi.dir}/extra/apr/include" />
-            <pathelement location="${build.semi.dir}/extra/apr/include/apr-1" />
+            <pathelement location="${hdk.include.dir}/apr-1" />
             <pathelement location="${build.VM.home}/include" />
             <pathelement location="${build.VM.home}/vmcore/include" />
             <pathelement location="${build.VM.home}/port/include" />
         </path>
 
-        <!-- Set cunit tests sources -->
-        <fileset id="unit.test.c.src" dir="${build.VM.home}/tests/unit/thread">
-            <include name="*.c" />
-        </fileset>
-
-        <!-- Create cunit tests work dir -->
-        <property name="unit.test.c.workdir" value="${build.dir}/_cunit.tests" />
-        <mkdir dir="${unit.test.c.workdir}/_obj" />
-        <mkdir dir="${unit.test.c.workdir}/_bin" />
-        <mkdir dir="${unit.test.c.workdir}/report" />
+        <mkdir dir="${cunit.obj.dir}" />
+        <mkdir dir="${cunit.bin.dir}" />
 
         <compiler name="${build.cxx}" id="cunit.test.compiler">
             <defineset define="APR_DECLARE_STATIC, BUILDING_VM"/>
@@ -126,8 +141,8 @@
         </compiler>
        
         <!-- Compiling cunit tests and framework -->
-        <echo message="cunit: Compiling tests and framework..." />
-        <cc objdir="${unit.test.c.workdir}/_obj" multithreaded="true">
+        <echo message="Compiling tests and framework..." />
+        <cc objdir="${cunit.obj.dir}" multithreaded="true">
             <compiler refid="cunit.test.compiler" />
             <fileset dir="${build.VM.home}/tests/unit/thread/utils">
                 <include name="*.c" />
@@ -139,34 +154,22 @@
             <includepath refid="unit.test.c.include" />
         </cc>
         
-        <!-- Create a list of cunit tests excecutable -->
-        <pathconvert pathsep="," property="unit.test.c.files" refid="unit.test.c.src" />
-        <propertyregex override="yes" property="unit.test.c.files" input="${unit.test.c.files}"
-            regexp="\.c" replace="" defaultValue="${unit.test.c.files}" />
-        <condition property="extention" value=".exe">
-            <isset property="if.win" />
-        </condition>
-        <property name="extention" value="" />
-
         <!-- Compiling cunit tests -->
-        <property name="filename" value="--" />
-
-        <echo message="cunit: Compiling tests..." />
-        <for list="${unit.test.c.files}" param="file" delimiter=",">
+        <for list="${cunit.test.list}" param="file" delimiter=",">
             <sequential>
 
                 <var name="filename" unset="true" />
                 <basename property="filename" file="@{file}" />
 
-                <echo message="cunit: Compile test: ${filename}" />
+                <echo message="Link test: ${filename}" />
                 
-                <cc outfile="${unit.test.c.workdir}/_bin/${filename}${extention}"
+                <cc outfile="${cunit.bin.dir}/${filename}"
                     runtime="dynamic" multithreaded="true" subsystem="console">
                     
                     <compiler refid="cunit.test.compiler" />
                     
                     <linker name="${build.cxx}">
-                        <fileset dir="${unit.test.c.workdir}/_obj">
+                        <fileset dir="${cunit.obj.dir}">
                             <include name="thread_unit_test_main.o*" />
                             <include name="thread_unit_test_utils.o*" />
                             <include name="testframe.o*" />
@@ -175,129 +178,103 @@
 
                         <select os="win">
                             <libset type="shared" libs="harmonyvm"
-                                dir="${build.semi.dir}/vm/vmcore/_bin" />
+                                dir="${hdk.lib.dir}" />
                             <libset type="shared" libs="hythr"
-                                dir="${build.semi.dir}/vm/hythr/_bin" />
-                            <linkerarg value="/libpath:${build.deploy.dir}/jdk/jre/bin/default" />
+                                dir="${hdk.lib.dir}" />
+                            <linkerarg value="/libpath:${test.vmdir}" />
                             <linkerarg value="/NODEFAULTLIB:libcmtd" />
                         </select>
                         
                         <select os="lnx">
                             <libset type="shared" libs="harmonyvm"
-                                dir="${build.deploy.dir}/jdk/jre/bin/default" />
+                                dir="${test.vmdir}" />
                             <linkerarg value="-rpath" />
-                            <linkerarg value="${build.deploy.dir}/jdk/jre/bin" />
+                            <linkerarg value="${test.jre.home}/bin" />
                             <linkerarg value="-rpath" />
-                            <linkerarg value="${build.deploy.dir}/jdk/jre/bin/default" />
+                            <linkerarg value="${test.vmdir}" />
                         </select>
                     </linker>
                 </cc>
             </sequential>
         </for>
-                    
-        <!-- Executing cunit tests... -->
-        <property name="outputproperty" value="--" />
-        <property name="resultproperty" value="--" />
-        <delete file="${build.semi.dir}/cunit.test.failed" failonerror="false" />
-
-        <echo message="cunit: Compiling tests..." />
-        <for list="${unit.test.c.files}" param="file" delimiter=",">
+    </target>            
+    
+    <target name="cunit-run"> 
+        <delete dir="${cunit.test.dir}/reports" quiet="true"/>
+        <mkdir dir="${cunit.test.dir}/reports" />
+        <delete file="${cunit.test.summary}" failonerror="false" />
+        
+        <echo message="Running tests..." />
+        <for list="${cunit.test.list}" param="file" delimiter=",">
             <sequential>
                 
                 <var name="filename" unset="true" />
                 <basename property="filename" file="@{file}" />
                 
                 <!-- Executing unit test... -->
-                <echo message="cunit: Executing test: ${filename} ..." />
+                <echo message="Running: ${filename}" />
                 <var name="outputproperty" unset="true" />
                 <var name="resultproperty" unset="true" />
-                <exec dir="${unit.test.c.workdir}/_bin"
-                    executable="${unit.test.c.workdir}/_bin/${filename}${extention}"
+                <exec dir="${cunit.bin.dir}"
+                    executable="${cunit.bin.dir}/${filename}${exe.suffix}"
                     resultproperty="resultproperty"
-                    outputproperty="outputproperty">
+                    outputproperty="outputproperty" 
+                    timeout="${test.timeout}">
                     
-                    <arg value="-Dorg.apache.harmony.vm.vmdir=${build.deploy.dir}/jdk/jre/bin/default"/>
-                    <arg value="-Djava.home=${build.deploy.dir}/jdk/jre ${test.vmargs}"/>
+                    <arg value="-Dorg.apache.harmony.vm.vmdir=${test.vmdir}"/>
+                    <arg value="-Djava.home=${test.jre.home}"/>
                     <arg value="-XX:vm.jvmti.enabled=true"/>
+                    <arg value="${test.vmargs}"/>
                     <select arch="ipf">
                         <arg value="-Xint"/>
                     </select>
                     
-                    <env key="JAVA_HOME" value="${build.deploy.dir}/jdk/jre" />
+                    <env key="JAVA_HOME" value="${test.jre.home}" />
                     
                     <select os="win">
-                        <env key="Path" path="${build.deploy.dir}/jdk/jre/bin/:${build.deploy.dir}/jdk/jre/bin/default:${env.Path}" />
+                        <env key="Path" path="${test.jre.home}/bin/;${test.vmdir};${env.Path}" />
                     </select>
                     <select os="lnx">
-                        <env key="LD_LIBRARY_PATH" path="${build.deploy.dir}/jdk/jre/bin/:${build.deploy.dir}/jdk/jre/bin/default" />
+                        <env key="LD_LIBRARY_PATH" path="${test.jre.home}/bin/:${test.vmdir}" />
                     </select>
                 </exec>
 
-                <!-- Echo test output... -->
-                <echo file="${unit.test.c.workdir}/report/${filename}.out" message="${outputproperty}" />
-                <!-- echo message="${outputproperty}" / -->
+                <echo file="${cunit.test.dir}/reports/${filename}.out" message="${outputproperty}" />
 
                 <!-- Checking test result... -->
+                <condition property="@{file}.status" value="true" else="false">
+                    <equals arg1="${resultproperty}" arg2="0" />
+                </condition>
+
+                <to-junit-xml xml="${cunit.test.dir}/reports/TEST-${filename}.xml" 
+                    suite="${filename}"
+                    status="${@file}.status}"
+                    out="${outputproperty}"/>
+                
                 <if>
-                    <not>
-                        <equals arg1="${resultproperty}" arg2="0" />
-                    </not>
+                    <istrue value="${@{file}.status}"/>
                     <then>
-                        
-                        <!-- Test failed... -->
-                        <property name="test.failed" value="true" />
-                        <echo message="cunit: TEST FAILED" />
-                        <echo file="${build.semi.dir}/cunit.test.failed" message="${filename} FAILED${line.separator}" append="true"/>
-
-                        <echo file="${unit.test.c.workdir}/report/TEST-${filename}.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
-                            <testsuite errors="0" failures="1" name="@@@@@" tests="1" time="0.01">
-                                <testcase classname="@@@@@" name="test" time="0.1"><error message="FAILED"/></testcase>
-                                <system-out><![CDATA[@out]!]></system-out>
-                            </testsuite>]]>
-                        </echo>
-
+                        <echo message=" PASSED : ${filename}" />
                     </then>
                     <else>
-                        
-                        <!-- Test passed... -->
-                        <echo message="cunit: TEST PASSED" />
-                        <echo file="${unit.test.c.workdir}/report/TEST-${filename}.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
-                            <testsuite errors="0" failures="0" name="@@@@@" tests="1" time="0.01">
-                                <testcase classname="@@@@@" name="test" time="0.1"></testcase>
-                                <system-out><![CDATA[@out]!]></system-out>
-                            </testsuite>]]>
-                        </echo>
-                        
+                        <echo message="*** FAILED **** : ${filename}" />
+                        <echo message="*** FAILED **** : ${filename} (${resultproperty} res code)${line.separator}" file="${cunit.test.summary}" append="true"/>
                     </else>
                 </if>
 
-                <!-- Setting file output to xml... -->
-                <replace file="${unit.test.c.workdir}/report/TEST-${filename}.xml" token="@@@@@" value="${filename}" />
-                <if>
-                    <isset property="outputproperty" />
-                    <then>
-                        <replace file="${unit.test.c.workdir}/report/TEST-${filename}.xml" token="@out]!" value="${outputproperty}]" />
-                    </then>
-                    <else>
-                        <replace file="${unit.test.c.workdir}/report/TEST-${filename}.xml" token="@out]!" value="]" />
-                    </else>
-                </if>
+                <!-- Overall status property -->
+                <condition property="test.failed">
+                    <isfalse value="${@{file}.status}"/>
+                </condition>
+
             </sequential>
         </for>
-
-        <!-- Creating execution report... -->
-        <property name="cunit.tests.report.dir" location="${unit.test.c.workdir}/report/html"/>
-        <delete dir="${cunit.tests.report.dir}" />
-        <mkdir dir="${cunit.tests.report.dir}" />
-        <junitreport todir="${cunit.tests.report.dir}">
-            <fileset dir="${unit.test.c.workdir}/report">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${cunit.tests.report.dir}"/>
-        </junitreport>
-
-        <echo message="## Please find tests and results at ${build.dir}/_cunit.tests/" />
-        <fail unless="run.all.tests" if="test.failed" message="cunit: SOME TESTS FAILED"/>
     </target>
+    
+    <target name="cunit-report"> 
+        <gen-test-report dir="${cunit.test.dir}/reports"/>
+        <echo message="Please find tests and results at ${cunit.test.dir}" />
+        <fail unless="run.all.tests" if="test.failed" message="Some cunit tests failed"/>
+    </target>
+    
 </project>
-

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml Fri Sep  7 04:31:06 2007
@@ -15,60 +15,40 @@
     limitations under the License.
 -->
 <project name="JVMTI TESTS">
+    
+    <import file="test.common.xml"/>
+    
     <property name="jvmti.test.src" location="${build.VM.home}/tests/jvmti" />
-    <property name="jvmti.test.dir" location="${build.semi.dir}/jvmti.tests"/>
+    <property name="jvmti.test.dir" location="${base.test.dir}/jvmti.tests"/>
+    <property name="jvmti.test.summary" location="${base.test.dir}/jvmti.test.failed"/>
     <property name="jvmti.test.class.path" location="${jvmti.test.dir}/classes"/>
     <property name="jvmti.test.native.path" location="${jvmti.test.dir}/native"/>
 
-    <property file="test.properties"/>
-
-    <patternset id="jvmti.test.src.pattern">
+    <dirset id="jvmti.test.src.dirs.set" dir="${jvmti.test.src}">
         <include name="*" />
-        <!-- This test fails -->
-        <!--exclude name="FailingTest" /-->
-    </patternset>
-
-    <property name="jvmti.test.timeout" value="180000" />
-
-    <target name="compile-jvmti-tests-prepare" depends="">
-        <dirset id="jvmti.test.src.dirs.set"
-                dir="${jvmti.test.src}">
-            <patternset refid="jvmti.test.src.pattern" />
-        </dirset>
-
-        <pathconvert pathsep=","
-                     property="jvmti.test.src.dirs.list"
-                     refid="jvmti.test.src.dirs.set" />
-    </target>
+    </dirset>
 
-    <target name="compile-jvmti-tests-java"
-            depends="compile-jvmti-tests-prepare, init_component">
-        <mkdir dir="${jvmti.test.class.path}" />
-        <for list="${jvmti.test.src.dirs.list}" param="directory"
-             delimiter=",">
-            <sequential>
-                <var name="testdir" unset="true" />
-                <basename property="testdir" file="@{directory}" />
-                <javac destdir="${jvmti.test.class.path}"
-                       source="1.5" target="1.5" listfiles="true"
-                       debug="true">
-                    <src path="${jvmti.test.src}" />
-                    <include name="${testdir}/**/*.java" />
-                </javac>
-            </sequential>
-        </for>
+    <condition property="jvmti.test.src.dirs.list" value="${test.case}">
+        <isset property="test.case"/>
+    </condition>
+    <pathconvert pathsep=","
+                 property="jvmti.test.src.dirs.list" 
+                 refid="jvmti.test.src.dirs.set">
+        <flattenmapper/>
+    </pathconvert>
+
+    <target name="compile-jvmti-tests-java">
+        <compile-java dest="${jvmti.test.class.path}" src="${jvmti.test.src}"/>
     </target>
 
-    <target name="compile-jvmti-tests-native"
-        depends="compile-jvmti-tests-prepare, init_component">
+    <target name="compile-jvmti-tests-native" depends="init_component">
         <mkdir dir="${jvmti.test.native.path}" />
 
         <for list="${jvmti.test.src.dirs.list}" param="directory"
              delimiter=",">
             <sequential>
-                <var name="outputdir" unset="true" />
-                <basename property="outputdir" file="@{directory}" />
-                <echo message="## Compiling JVMTI natives in: @{directory}" />
+                <var name="outputdir" value="@{directory}" />
+                <echo message="## Compiling JVMTI natives : @{directory}" />
                 <mkdir dir="${jvmti.test.native.path}/${outputdir}" />
                 <cc name="${build.cxx}"
                     debug="true"
@@ -76,14 +56,14 @@
                     multithreaded="true"
                     link="shared"
                     outfile="${jvmti.test.native.path}/${outputdir}/${outputdir}">
-                    <includepath path="${build.deploy.dir}/jdk/include" />
+                    <includepath path="${test.jdk.home}/include" />
                     <select os="lnx">
                         <linkerarg value="-lstdc++" />
                     </select>
                     <select os="win">
                         <compilerarg value="/EHsc" />
                     </select>
-                    <fileset dir="@{directory}">
+                    <fileset dir="${jvmti.test.src}/${outputdir}">
                         <include name="**/*.cpp" />
                     </fileset>
                 </cc>
@@ -95,96 +75,47 @@
                     </and>
                 </condition>
 
-                <antcall target="jvmti.embed.manifest" />
+                <runtarget target="jvmti.embed.manifest" />
             </sequential>
         </for>
     </target>
 
     <target name="jvmti.embed.manifest" if="add.manifest">
-        <echo message="Adding manifest to ${jvmti.test.native.path}/${outputdir}/${outputdir}${shlib.suffix}" />
-        <exec executable="mt.exe">
-            <arg value="-nologo" />
-            <arg value="-manifest" />
-            <arg value="${jvmti.test.native.path}/${outputdir}/${outputdir}${shlib.suffix}${manifest.suffix}" />
-            <arg value="-outputresource:${jvmti.test.native.path}/${outputdir}/${outputdir}${shlib.suffix};#2" />
-        </exec>
+        <embed-manifest lib="${jvmti.test.native.path}/${outputdir}/${outputdir}${shlib.suffix}" />
     </target>
 
     <target name="pre-jvmti-test" depends="compile-jvmti-tests-java,
                                            compile-jvmti-tests-native">
-        <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>
-                ==============================================
-                Please set the classpath of junit as follows:
-                build.bat -Djunit.jar=%JUNIT_HOME% test
-                ==============================================
-                </echo>
-                <fail message="JVMTI tests misconfigured" />
-            </then>
-        </if>
-
-        <delete quiet="true" dir="${jvmti.test.dir}/reports" />
-        <mkdir dir="${jvmti.test.dir}/reports" />
+        <prepare-test-run test-dir="${jvmti.test.dir}"/>
+        <delete file="${jvmti.test.summary}" quiet="true"/>
     </target>
 
     <target name="run-jvmti-tests">
         <propertycopy property="mode.name" from="${jvmti.tests.mode}.name" override="on"/>       
         <propertycopy property="mode.switch" from="${jvmti.tests.mode}.switch" override="on"/>
+        <property name="report.dir" 
+            location="${jvmti.test.dir}/reports/${jvmti.tests.mode}"/>
+        <mkdir dir="${report.dir}" />
+
         <echo>
         ==================================
         Run JVMTI tests using ${mode.name}
         ==================================
         </echo>
-        <property name="exclude.file" location="./excludes/exclude.drlvm_jvmti.${hy.platform}.${jvmti.tests.mode}" />
-        <if>
-            <available file="${exclude.file}" />
-            <then>                  
-                  <property name="jvmti.exclude.file.${jvmti.tests.mode}.present" value="true" />
-                  <loadfile property="foo" srcFile="${exclude.file}"/>
-                  <echo>
-Using exclude file = ${exclude.file}   
-        
-${foo}
-                  </echo>
-            </then>
-        </if>
-
-        <property name="report.dir" 
-            location="${jvmti.test.dir}/reports/${jvmti.tests.mode}"/>
-        <mkdir dir="${report.dir}" />
-
-        <for list="${jvmti.test.src.dirs.list}" param="directory"
-             delimiter=",">
 
+        <take-xlist name="exclude.file" file="./excludes/exclude.drlvm_jvmti.${hy.platform}.${jvmti.tests.mode}"/>
+        
+        <for list="${jvmti.test.src.dirs.list}" param="directory">
             <sequential>
-                <var name="testname" unset="true" />
-                <basename property="testname" file="@{directory}" />
+                <var name="testname" value="@{directory}"/>
                 <echo message="Running ${testname}" />
                 <junit fork="yes"
                        forkmode="perTest"
                        failureproperty="${testname}.failed"
+                       haltonfailure="${test.failfast}"
                        timeout="${test.timeout}"
-                       jvm="${build.deploy.dir}/jdk/jre/bin/java">
-                    <jvmarg value="-XX:-vm.assert_dialog" />
-                    <select os="win">
-                        <jvmarg
-                        value="-agentpath:${jvmti.test.native.path}/${testname}/${testname}.dll"
-                        />
-                    </select>
-                    <select os="lnx">
-                        <jvmarg
-                        value="-agentpath:${jvmti.test.native.path}/${testname}/lib${testname}.so"
-                        />
-                    </select>
+                       jvm="${test.jvm.exe}">
+                    <jvmarg value="-agentpath:${jvmti.test.native.path}/${testname}/${shlib.prefix}${testname}${shlib.suffix}"/>
                     <jvmarg line="${mode.switch} ${test.vmargs}" />
                     <formatter type="brief"/>
                     <formatter type="xml" />
@@ -192,14 +123,14 @@
                     <batchtest todir="${report.dir}">
                         <fileset dir="${jvmti.test.src}" >
                             <include name="**/${testname}.java"/>
-                            <excludesfile name="${exclude.file}" if="jvmti.exclude.file.${jvmti.tests.mode}.present"/>
+                            <excludesfile name="${exclude.file}" if="exclude.file"/>
                         </fileset>
                     </batchtest>
                 </junit>
                 <if>
                     <isset property="${testname}.failed" />
                     <then>
-                        <echo file="${build.semi.dir}/jvmti.test.failed" message="${testname} failed on ${mode.name}${line.separator}" append="true"/>
+                        <echo file="${jvmti.test.summary}" message="${testname} failed on ${mode.name}${line.separator}" append="true"/>
                     </then>
                 </if>
 
@@ -208,7 +139,6 @@
     </target>
   
     <target name="jvmti.test" depends="pre-jvmti-test">
-        <delete file="${build.semi.dir}/jvmti.test.failed" failonerror="false" />
         <for list="${test.mode}" param="mode" trim="true">
             <sequential>
                 <if>
@@ -225,7 +155,7 @@
             </sequential>
         </for>
 
-        <available property="test.failed" file="${build.semi.dir}/jvmti.test.failed" />
-        <fail unless="run.all.tests" if="test.failed" message="Some tests failed"/>
+        <available property="test.failed" file="${jvmti.test.summary}" />
+        <fail unless="run.all.tests" if="test.failed" message="Some jvmti tests failed"/>
     </target>
 </project>

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?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/kernel.test.xml Fri Sep  7 04:31:06 2007
@@ -17,23 +17,28 @@
 -->
 <project name="KERNEL TESTS">
 
+    <import file="test.common.xml"/>
+    
     <property name="kernel.test.javasrc" location="${build.VM.home}/tests/kernel" />
-    <property name="kernel.test.dir" location="${build.semi.dir}/kernel.tests"/>
+    <property name="kernel.test.dir" location="${base.test.dir}/kernel.tests"/>
+    <property name="kernel.test.summary" location="${kernel.test.dir}/status.txt"/>
     <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}/jdk/jre/bin/java"/>
-    <property file="test.properties"/>
-
     <target name="kernel.test" 
         depends="compile-kernel-test, run-kernel-test, report-kernel-test, check-kernel-test"/>
     
-    <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="${test.mode}" param="mode"
-            trim="true" keepgoing="${kernel.test.continue}">
+    <target name="run-kernel-test">
+        <prepare-test-run test-dir="${kernel.test.dir}"/>
+        <delete file="${kernel.test.summary}" quiet="true"/>
+        
+        <echo>
+        ==================================
+        Tested JVM: ${test.jvm.exe}
+        ==================================
+        </echo>
+        
+        <for list="${test.mode}" param="mode" trim="true">
             <sequential>
                 <antcall target="-run-kernel-test-batch"> 
                     <param name="kernel.mode" value="@{mode}" />
@@ -41,115 +46,72 @@
             </sequential>
         </for>
     </target>
-   
+    
     <target name="report-kernel-test">
         <for list="${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>
+                <gen-test-report dir="${kernel.test.dir}/reports/@{mode}.mode"/>
             </sequential>
         </for>
     </target>
 
     <target name="check-kernel-test">
-        <loadfile property="kernel.test.summary" 
-            srcFile="${kernel.test.dir}/reports/summary"/>
+        <loadfile property="kernel.test.summary.txt" 
+            srcFile="${kernel.test.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="${kernel.test.summary.txt}"/>
         <echo message="${line.separator}"/>
-        <echo>Please find detailed results under ${kernel.test.dir}/reports directory.</echo>
+        <echo>Please find detailed results under ${kernel.test.dir}${file.separator}reports directory.</echo>
         
         <condition property="test.failed">
-            <contains string="${kernel.test.summary}" substring="FAILED" />
+            <contains string="${kernel.test.summary.txt}" substring="FAILED" />
         </condition>
         <fail unless="run.all.tests" if="test.failed" 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}" 
-            source="1.5" target="1.5" debug="true">
-        </javac>
-        <mkdir dir="${test.class.path}" />
-        <javac srcdir="${kernel.test.javasrc}" 
-            destdir="${test.class.path}" 
-            source="1.5" target="1.5" debug="true">
-        </javac>
+        <compile-java src="${kernel.test.javasrc}/../kernel_resources" 
+            dest="${test.resource.path}"/>
+        <compile-java src="${kernel.test.javasrc}" 
+            dest="${test.class.path}"/>
         <delete quiet="true" dir="${test.class.path}/notfound" />
     </target>
     
-    <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"/>
-        <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
-                ==============================================
-        </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"/>
+        <propertycopy property="kernel.mode.switch" from="${kernel.mode}.switch" override="on"/>        
+        <property name="report.dir"
+            location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
+        <mkdir dir="${report.dir}" />
+
         <echo>
         ==================================
-        Run kernel tests using ${kernel.mode.name}
+        Run kernel tests using ${kernel.mode.name} 
         ==================================
         </echo>
-        <property name="exclude.file" location="./excludes/exclude.drlvm_kernel.${hy.platform}.${kernel.mode}" />
-        <if>
-            <available file="${exclude.file}" />
-            <then>
-                  <property name="kernel.exclude.file.${kernel.mode}.present" value="true" />
-                  <loadfile property="foo" srcFile="${exclude.file}"/>
-                  <echo>
-Using exclude file = ${exclude.file}   
-        
-${foo}
-                  </echo>
-            </then>
-        </if>
-        
-        <property name="report.dir"
-            location="${kernel.test.dir}/reports/${kernel.mode}.mode"/>
-        <mkdir dir="${report.dir}" />
         
+        <take-xlist name="exclude.file" file="./excludes/exclude.drlvm_kernel.${hy.platform}.${kernel.mode}"/>
+
         <junit fork="yes" failureproperty="kernel.failed"
             filtertrace="no" printsummary="on" showoutput="off"
-            haltonfailure="${kernel.test.failfast}"
+            haltonfailure="${test.failfast}"
             forkmode="${kernel.test.forkmode}" 
             timeout="${test.timeout}"
             jvm="${test.jvm.exe}">
 
-            <jvmarg line="-XX:-vm.assert_dialog ${kernel.mode.switch} ${test.vmargs}" />
+            <jvmarg line="${kernel.mode.switch} ${test.vmargs}" />
             <jvmarg value="-Dtest.resource.path=${test.resource.path}"/>
             <jvmarg value="-Xbootclasspath/a:${junit.jar}${path.separator}${test.class.path}" />
             <formatter type="xml"/>
             <batchtest todir="${report.dir}" unless="test.case">
                 <fileset dir="${kernel.test.javasrc}"> 
-                   <!-- <patternset refid="kernel.test.java.pattern"/> -->
                     <include name="org/apache/harmony/**/*Test.java" />
                     <include name="java/lang/**/*Test*.java" />
-                    <excludesfile name="${exclude.file}" if="kernel.exclude.file.${kernel.mode}.present" />
-                    
+                    <excludesfile name="${exclude.file}" if="exclude.file" />
                 </fileset>
             </batchtest>
             <test name="${test.case}" todir="${report.dir}" if="test.case" />
@@ -159,7 +121,7 @@
             <isset property="kernel.failed" />
         </condition>
 
-        <concat append="on" destfile="${kernel.test.dir}/reports/summary" 
+        <concat append="on" destfile="${kernel.test.summary}" 
             >      ${kernel.mode.name} ${kernel.status}${line.separator}</concat>
     </target>
 </project>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml Fri Sep  7 04:31:06 2007
@@ -17,9 +17,8 @@
 
 <project name="REGRESSION TESTS RUN" default="do-regression-testing">
     
-    <property name="jvm.under.test" value="${build.deploy.dir}/jdk/jre/bin/java"/>
-    <property name="reg.test.timeout" value="600000" />
-    <property name="reg.test.halt.on.error" value="false"/>
+    <import file="test.common.xml"/>
+    
     <!-- Mark used by custom test launchers for test failure notification -->
     <property name="reg.test.failed.mark" value="-=@@@ Reg Test Failed @@@=-"/>
 
@@ -28,28 +27,14 @@
     </target>
 
     <target name="launch-tests">
+        <prepare-test-run test-dir="${reg.test.dir}"/>
         <echo>
-=====================================
-DRLVM Regression Testing on platform: ${hy.platform}
-=====================================
+        =====================================
+        Tested JVM: ${test.jvm.exe}
+        =====================================
         </echo>
 
-        <property name="exclude.list.file" 
-                  location="${reg.test.src}/excludes/exclude.${hy.platform}"/>
-
-        <!-- Check up exclude list to use -->
-        <condition property="exclude.list" value="${exclude.list.file}">
-            <and>
-                <!-- don't look into xlist if we're 
-                     checking particular regression -->
-                <not>
-                    <isset property="test.case"/>
-                </not>
-                <!-- use this xlist, if it is available for 
-                     this platform configuration -->
-                <available file="${exclude.list.file}"/>
-            </and>
-        </condition>
+        <take-xlist name="exclude.list" file="${reg.test.src}/excludes/exclude.${hy.platform}"/>
 
         <!-- Choose regression tests to execute.
              Use 
@@ -104,12 +89,7 @@
     </target>
 
     <target name="make-report">
-        <junitreport todir="${reg.test.dir}/reports">
-            <fileset dir="${reg.test.dir}/reports">
-                <include name="TEST*-*.xml"/>
-            </fileset>
-            <report format="frames" todir="${reg.test.dir}/reports/html"/>
-        </junitreport>
+        <gen-test-report dir="${reg.test.dir}/reports"/>
         <echo message="========================================"/>
         <echo message="Regression testing report was stored in:"/>
         <echo message="========================================"/>
@@ -169,10 +149,10 @@
         <attribute name="vmarg" default=""/>
         <element name="junit-element" optional="true"/>
         <sequential>
-            <junit jvm="${jvm.under.test}"
+            <junit jvm="${test.jvm.exe}"
                    fork="yes"
                    haltonfailure="false"
-                   haltonerror="${reg.test.halt.on.error}"
+                   haltonerror="${test.failfast}"
                    printsummary="withOutAndErr"
                    dir="${basedir}"
                    failureproperty="reg.test.errors"
@@ -211,7 +191,7 @@
                 <junit-element>
                     <jvmti-junit-element/>
                     <jvmarg
-                        value="-agentpath:${reg.test.2launch.native.path}/${lib.prefix}@{agent}${lib.suffix}"
+                        value="-agentpath:${reg.test.2launch.native.path}/${shlib.prefix}@{agent}${shlib.suffix}"
                         />
                 </junit-element>
             </run-junit-test>
@@ -228,7 +208,7 @@
         <element name="java-element" optional="true"/>
         <sequential>
             <echo message="Running regression test: @{test}"/>
-            <java jvm="${jvm.under.test}"
+            <java jvm="${test.jvm.exe}"
                   classname="@{test}"
                   resultproperty="@{test}.res.code"
                   output="${reg.test.dir}/reports/@{test}.txt"

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.xml Fri Sep  7 04:31:06 2007
@@ -19,34 +19,15 @@
     <import file="${basedir}/targets/reg.test.run.xml"/>
     
     <property name="reg.test.src" location="${basedir}/../../src/test/regression"/>
-    <property name="reg.test.dir" location="${build.semi.dir}/reg.tests"/>
+    <property name="reg.test.dir" location="${base.test.dir}/reg.tests"/>
     <property name="reg.test.class.path" location="${reg.test.dir}/classes"/>
     <property name="reg.test.native.path" location="${reg.test.dir}/native"/>
-    <property name="jasmin.jar" location="./tmp/jasmin.jar"/>
     <property name="reg.test.package" value="org.apache.harmony.drlvm.tests.regression"/>
     
     <propertyregex property="reg.test.unpackage" 
         input="${reg.test.package}" regexp="\." replace="/"/>
 
-    <if> <!-- Set up os specific settings - library suffix and prefix -->
-        <os family="windows"/>
-        <then>
-            <property name="lib.prefix" value=""/>
-            <property name="lib.suffix" value=".dll"/>
-        </then>
-        <elseif>
-            <os family="unix"/>
-            <then>
-                <property name="lib.prefix" value="lib"/>
-                <property name="lib.suffix" value=".so"/>
-            </then>
-        </elseif>
-        <else>
-            <fail>Is not designed for this platform!</fail>
-        </else>
-    </if>
-
-    <target name="compile-reg-tests-prepare" depends="">
+    <target name="compile-reg-tests-prepare">
         <mkdir dir="${reg.test.class.path}" />
         <mkdir dir="${reg.test.native.path}" />
 
@@ -86,7 +67,7 @@
         <pathconvert pathsep=" "
                      property="reg.test.src.jasmin.list"
                      refid="reg.test.src.jasmin.set"/>
-       
+        <ensure-resource name="jasmin.jar"/>
         <java jar="${jasmin.jar}" fork="true" outputproperty="jasmin-reg-out" errorproperty="jasmin-reg-err">
             <arg line="-d ${reg.test.class.path}"/>
             <arg line="${reg.test.src.jasmin.list}"/>
@@ -97,12 +78,8 @@
 
     <target name="compile-reg-tests-java"
             depends="compile-reg-tests-prepare, compile-reg-tests-j">
-        <javac srcdir="${reg.test.src}"
-               includes="**/*.java"
-               destdir="${reg.test.class.path}"
-               source="1.5" target="1.5" 
-               debug="true"
-               verbose="no" listfiles="no">
+        <ensure-resource name="vmmagic.jar"/>
+        <compile-java src="${reg.test.src}" dest="${reg.test.class.path}">
             <depend targetdir="${reg.test.class.path}">
                 <mapper>
                     <chainedmapper>
@@ -118,9 +95,9 @@
             </depend>
             <classpath>
                 <pathelement path="${java.class.path}/"/>
-                <fileset dir="${build.VMMAGIC.home}" includes="vmmagic-20070207.jar" />
+                <fileset file="${vmmagic.jar}" />
             </classpath>
-        </javac>
+        </compile-java>
     </target>
 
     <target name="compile-reg-tests-native" depends="compile-reg-tests-prepare">
@@ -135,7 +112,7 @@
                                 <replacestring from="\" to="/"/>
                             </filtermapper>
                             <regexpmapper from="(H\d\d*)/([^/]+)\.c.?.?$$" 
-                                          to="\1/${lib.prefix}\2${lib.suffix}"/>
+                                          to="\1/${shlib.prefix}\2${shlib.suffix}"/>
                         </chainedmapper>
                         </mapper>
                     </depend>
@@ -167,7 +144,7 @@
                     link="shared"
                     outfile="${reg.test.native.path}/${outfile}"
                     objdir="${objdir}">
-                    <includepath path="${build.deploy.dir}/jdk/include" />
+                    <includepath path="${test.jdk.home}/include" />
                     <!--select os="lnx">
                         <linkerarg value="-lstdc++" />
                     </select-->
@@ -180,39 +157,16 @@
                     </and>
                 </condition>
 
-                <antcall target="reg.embed.manifest" />
+                <runtarget target="reg.embed.manifest" />
             </sequential>
         </for>
     </target>
 
     <target name="reg.embed.manifest" if="add.manifest">
-        <echo message="Adding manifest to ${reg.test.native.path}/${outfile}${shlib.suffix}" />
-        <exec executable="mt.exe">
-            <arg value="-nologo" />
-            <arg value="-manifest" />
-            <arg value="${reg.test.native.path}/${outfile}${shlib.suffix}${manifest.suffix}" />
-            <arg value="-outputresource:${reg.test.native.path}/${outfile}${shlib.suffix};#2" />
-        </exec>
-    </target>
-
-    <target name="pre-reg-test" depends="compile-reg-tests-java, compile-reg-tests-native">
-        <delete quiet="true" dir="${reg.test.dir}/reports" />
-        <mkdir dir="${reg.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"/>
-        <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
-                ==============================================
-        </fail>
+        <embed-manifest lib="${reg.test.native.path}/${outfile}${shlib.suffix}" />
     </target>
 
-    <target name="reg.test" depends="pre-reg-test, do-regression-testing" />
+    <target name="reg.test" depends="compile-reg-tests-java, 
+        compile-reg-tests-native, do-regression-testing" />
     
 </project>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml Fri Sep  7 04:31:06 2007
@@ -15,15 +15,15 @@
     limitations under the License.
 -->
 <project name="SMOKE TESTS">
+
+    <import file="test.common.xml"/>
+
     <property name="smoke.test.src" location="${build.VM.home}/tests/smoke" />
-    <property name="smoke.test.class.path" location="${build.dir}/_smoke.tests/classes" />
-    <property name="smoke.test.native.path" location="${build.dir}/_smoke.tests/natives" />
-    <property file="test.properties"/>
-
-    <patternset id="smoke.test.java.pattern">
-        <include name="**/*.java"/>
-        <exclude name="**/Logger.java"/>
-    </patternset>
+    <property name="smoke.test.dir" location="${base.test.dir}/smoke.tests"/>
+    <property name="smoke.test.summary" location="${base.test.dir}/smoke.test.failed"/>
+    <property name="smoke.test.class.path" location="${smoke.test.dir}/classes" />
+    <property name="smoke.test.native.path" location="${smoke.test.dir}/natives" />
+
     <patternset id="smoke.test.pattern">
         <include name="**/*.class"/>
         <exclude name="**/*$*.class"/>
@@ -40,27 +40,17 @@
     </target>
 
     <target name="smoke.test" depends="clean, compile.smoke.test, java_test_smoke, build_report">
-        <available property="test.failed" file="${build.semi.dir}/smoke.test.failed" />
+        <available property="test.failed" file="${smoke.test.summary}" />
         <fail unless="run.all.tests" if="test.failed"/>
     </target>
 
     <target name="clean">
-        <delete quiet="true" file="${build.semi.dir}/smoke.test.failed"/>
-        <delete quiet="true" dir="${build.dir}/_smoke.tests/reports" />
+        <delete quiet="true" file="${smoke.test.summary}"/>
+        <delete quiet="true" dir="${smoke.test.dir}/reports" />
     </target>
 
-    <target name="compile.smoke.test" depends="compile.smoke.test.java, compile.smoke.test.native" />
-
-    <target name="compile.smoke.test.java" depends="init_component">
-        <mkdir dir="${smoke.test.class.path}" />
-        <javac includeJavaRuntime="yes" srcdir="${smoke.test.src}" 
-                destdir="${smoke.test.class.path}" 
-                target="${javac.target}" debug="${java.debug.option}">
-            <patternset refid="smoke.test.java.pattern" />
-            <bootclasspath>
-                <fileset dir="${java.home}" includes="**/*.jar" />
-            </bootclasspath>
-        </javac>
+    <target name="compile.smoke.test" depends="compile.smoke.test.native">
+        <compile-java src="${smoke.test.src}" dest="${smoke.test.class.path}" />
     </target>
 
 
@@ -86,7 +76,7 @@
                     multithreaded="true"
                     link="shared"
                     outfile="${smoke.test.native.path}/${outputdir}/${outputfile}">
-                    <includepath path="${build.deploy.dir}/jdk/include" />
+                    <includepath path="${test.jdk.home}/include" />
                     <select os="lnx">
                         <linkerarg value="-lstdc++" />
                     </select>
@@ -100,35 +90,25 @@
                     </and>
                 </condition>
 
-                <antcall target="smoke.embed.manifest" />
+                <runtarget target="smoke.embed.manifest" />
             </sequential>
         </for>
     </target>
 
     <target name="smoke.embed.manifest" if="add.manifest">
-        <echo message="Adding manifest to ${smoke.test.native.path}/${outputdir}/${outputfile}${shlib.suffix}" />
-        <exec executable="mt.exe">
-            <arg value="-nologo" />
-            <arg value="-manifest" />
-            <arg value="${smoke.test.native.path}/${outputdir}/${outputfile}${shlib.suffix}${manifest.suffix}" />
-            <arg value="-outputresource:${smoke.test.native.path}/${outputdir}/${outputfile}${shlib.suffix};#2" />
-        </exec>
-    </target>
-
-    <target name="jar.smoke.tests" depends="compile.smoke.test">
-        <jar jarfile="${build.dir}/_smoke.tests/">
-            <fileset dir="${smoke.test.class.path}" includes="**/*.class" />
-        </jar>
+        <embed-manifest lib="${smoke.test.native.path}/${outputdir}/${outputfile}${shlib.suffix}" />
     </target>
+    
     <target name="java_test_smoke">
-        <mkdir dir="${build.dir}/_smoke.tests/reports" />
+        <mkdir dir="${smoke.test.dir}/reports" />
         <path id="java.class.path">
             <pathelement location="${smoke.test.class.path}" />
-            <fileset dir="${build.deploy.dir}/jdk/jre/lib" includes="*.jar" />
         </path>
-        <condition property="test.continue" value="true" else="false">
-            <isset property="run.all.tests"/>
-        </condition>
+        <echo>
+        ==================================
+        Tested JVM: ${test.jvm.exe}
+        ==================================
+        </echo>
         <for list="${test.mode}" param="mode" trim="true">
             <sequential>
                 <antcall target="java_test_smoke_with_jit_or_interpreter"> 
@@ -139,19 +119,8 @@
     </target>
 
     <target name="build_report">
-        <property name="smoke.tests.report.dir" location="${build.dir}/_smoke.tests/reports/html"/>
-        <delete dir="${smoke.tests.report.dir}" />
-        <mkdir dir="${smoke.tests.report.dir}" />
-        <junitreport todir="${smoke.tests.report.dir}">
-            <fileset dir="${build.dir}/_smoke.tests/reports">
-                <include name="*.xml"/>
-            </fileset>
-            <report format="frames" todir="${smoke.tests.report.dir}"/>
-        </junitreport>
-
-        <!-- use this property just to get the slashes to display right in the echo -->
-        <property name="display-location" location="${smoke.tests.report.dir}/index.html"/>
-        <echo message="The test report is in ${display-location}"/>
+        <gen-test-report dir="${smoke.test.dir}/reports"/>
+        <echo message="The test report is in ${smoke.test.dir}/reports"/>
     </target>
 
     <target name="java_test_smoke_with_jit_or_interpreter">
@@ -171,28 +140,22 @@
         Smoke tests on ${mode.name}
         ==================================
         </echo>
-        <property name="exclude.file" location="./excludes/exclude.drlvm_smoke.${hy.platform}.${mode.id}" />
-        <if>
-            <available file="${exclude.file}" />
-            <then>
-                  <property name="smoke.exclude.file.${mode.id}.present" value="true" />
-                  <loadfile property="foo" srcFile="${exclude.file}"/>
-                  <echo>
-Using exclude file = ${exclude.file}   
         
-${foo}
-                  </echo>
-            </then>
-        </if>
+        <take-xlist name="exclude.file" file="./excludes/exclude.drlvm_smoke.${hy.platform}.${mode.id}"/>
+
+        <!-- TODO: to allow using package name for test.case, need to convert it to path
+        <propertyregex property="test.file" override="yes" global="true"
+            input="${test.case}" regexp="(\.|\\)" replace="/"/-->
+
         <for param="test">
             <fileset dir="${smoke.test.src}">
-               <!--  <patternset refid="smoke.test.java.pattern" /> -->
-                <include name="**/*.java"/>
-                <!-- <exclude name="**/Logger.java"/> -->
-                <excludesfile name="${exclude.file}" if="smoke.exclude.file.${mode.id}.present" />
-
+                <include name="**/*.java" unless="test.case"/>
+                <include name="${test.case}" if="test.case"/>
+                <excludesfile name="${exclude.file}" if="exclude.file" />
             </fileset>
             <sequential>
+                <!-- unset res.code variable to use it for next run-->
+                <var name="res.code" unset="true"/>
                 <var name="outdir" unset="true" />
                 <var name="tmp.outdir" unset="true" />
 
@@ -216,163 +179,82 @@
                         </condition>
                     </sequential>
                 </for>
-                <condition property="@{test}.is.golden" value="true">
-                    <contains string="${file.keywords}" substring="golden" />
-                </condition>
                 <if>
-                    <not>
-                        <isset property="@{test}.is.excluded" />
-                    </not>
+                    <or>
+                        <isset property="test.case"/>
+                        <not><isset property="@{test}.is.excluded" /></not>
+                    </or>
                     <then>
-                        <!--
-                                    Run smoke test @{test} on DRLVM.
-                        -->
-                        <condition property="executable.postfix" value=".exe">
-                            <isset property="if.win" />
-                        </condition>
-                        <property name="executable.postfix" value="" />
-
                         <echo message="Running test : ${class.name}" />
+                        <var name="test.report" value="${smoke.test.dir}/reports/${class.name}_${mode.id}"/>
 
                         <java newenvironment="yes"
-                            dir="${build.deploy.dir}/jdk/jre/bin"
-                            output="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.out"
+                            dir="${test.jre.home}/bin"
                             classname="${class.name}"
                             fork="true"
-                            jvm="${build.deploy.dir}/jdk/jre/bin/java${executable.postfix}"
-                            error="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.out.err"
+                            jvm="${test.jvm.exe}"
+                            output="${test.report}.out"
+                            error="${test.report}.out.err"
                             resultproperty="res.code"
                             timeout="${test.timeout}" >
-                            <jvmarg line="-XX:-vm.assert_dialog ${mode.switch} ${test.vmargs}" />
+                            <jvmarg line="${mode.switch} ${test.vmargs}" />
                             <jvmarg value="-Djava.library.path=${smoke.test.native.path}/${outdir}" />
                             <jvmarg value="-classpath" />
                             <jvmarg value="${smoke.test.class.path}" />
-                            <env key="JAVA_HOME" value="${build.deploy.dir}/jdk/jre" />
-                            <env key="LD_LIBRARY_PATH" value="${build.deploy.dir}/jdk/jre/bin:${env.LD_LIBRARY_PATH}" />
+                            <env key="JAVA_HOME" value="${test.jre.home}" />
+                            <env key="LD_LIBRARY_PATH" value="${test.jre.home}/bin:${env.LD_LIBRARY_PATH}" />
                         </java>
 
-                        <!-- load the test output file to the property - will be used later -->
-                        <loadfile property="@{test}.out" srcFile="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.out" />
-                        <!--
-                                    Run smoke test @{test} on JAVA_HOME's JVM.
-                                    If ${keywords} contains "golden" we have to run the test twice:
-                                    on JAVA_HOME's JVM and on the DRLVM. To compare outputs.
-                        -->
-                        <if>
-                            <isset property="@{test}.is.golden" />
-                            <then>
-                                <condition property="java.executable" value="${env.JAVA_HOME}/bin/java${executable.postfix}">
-                                    <available file="${env.JAVA_HOME}/bin/java${executable.postfix}" />
-                                </condition>
-                                <property name="java.executable" value="${env.JAVA_HOME}/bin/java${executable.postfix}" />
-                                <java output="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.golden" classname="${class.name}" fork="true" jvm="${java.executable}" error="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.golden.err">
-                                    <jvmarg value="-classpath" />
-                                    <jvmarg value="${java.path.property}" />
-                                    <env key="LD_LIBRARY_PATH" value="${env.JAVA_HOME}/bin:${env.LD_LIBRARY_PATH}" />
-                                </java>
-                                <!-- load the test output file to the property - will be used later -->
-                                <loadfile property="@{test}.golden" srcFile="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.golden" />
-                            </then>
-                        </if>
-                        <!-- Handling the test output (or outputs in "golden" case) -->
-                        <if>
-                            <isset property="@{test}.is.golden" />
-                            <then>
-                                <!-- compare JAVA_HOME's JVM output and DRLVM's output -->
-                                <condition property="@{test}.is.passed">
-                                    <equals arg1="${@{test}.golden}" arg2="${@{test}.out}" />
-                                </condition>
-                            </then>
-                            <else>
-                                <!-- whether DRLVM's output contains PASS and doesn't FAIL -->
-                                <condition property="@{test}.is.passed">
+                        <loadfile property="@{test}.out" srcFile="${test.report}.out" />
+                        <loadfile property="@{test}.err" srcFile="${test.report}.out.err" />
+                        <!-- loadfile does not define the property if file is empty -->
+                        <property name="@{test}.out" value=""/>
+                        <property name="@{test}.err" value=""/>
+
+                        <!-- whether DRLVM's output contains PASS and doesn't FAIL -->
+                        <condition property="@{test}.is.passed" value="true" else="false">
+                            <and>
+                                <contains string="${@{test}.out}" substring="PASS" casesensitive="false" />
+                                <not>
+                                    <contains string="${@{test}.out}" substring="FAIL" casesensitive="false" />
+                                </not>
+
+                                <!-- the return code must be checked -->
+                                <or>
+                                    <!-- it must be '0' in general -->
+                                    <equals arg1="${res.code}" arg2="0" />
+
+                                    <!-- some tests passes w/ non-'0' code -->
                                     <and>
-                                        <contains string="${@{test}.out}" substring="PASS" casesensitive="false" />
-                                        <not>
-                                            <contains string="${@{test}.out}" substring="FAIL" casesensitive="false" />
-                                        </not>
-
-                                        <!-- the return code must be checked -->
-                                        <or>
-                                            <!-- it must be '0' in general -->
-                                            <equals arg1="${res.code}" arg2="0" />
-
-                                            <!-- some tests passes w/ non-'0' code -->
-                                            <and>
-                                                <equals arg1="${class.name}" arg2="init.ErrorInInitializer" />
-                                                <equals arg1="${res.code}" arg2="1" />
-                                            </and>
-                                            <and>
-                                                <equals arg1="${class.name}" arg2="shutdown.TestFatalError" />
-                                                <equals arg1="${res.code}" arg2="1" />
-                                            </and>
-                                            <and>
-                                                <equals arg1="${class.name}" arg2="shutdown.TestInterrupt" />
-                                                <equals arg1="${res.code}" arg2="130" />
-                                            </and>
-                                        </or>
+                                        <equals arg1="${class.name}" arg2="init.ErrorInInitializer" />
+                                        <equals arg1="${res.code}" arg2="1" />
                                     </and>
-                                </condition>
-                            </else>
-                        </if>
+                                    <and>
+                                        <equals arg1="${class.name}" arg2="shutdown.TestFatalError" />
+                                        <equals arg1="${res.code}" arg2="1" />
+                                    </and>
+                                    <and>
+                                        <equals arg1="${class.name}" arg2="shutdown.TestInterrupt" />
+                                        <equals arg1="${res.code}" arg2="130" />
+                                    </and>
+                                </or>
+                            </and>
+                        </condition>
+                        <to-junit-xml xml="${test.report}.xml"
+                            suite="${class.name}_${mode.id}" test="${mode.name}" status="${@{test}.is.passed}"
+                            out="${@{test}.out}" err="${@{test}.err}"/>
+
                         <if>
-                            <isset property="@{test}.is.passed" />
+                            <istrue value="${@{test}.is.passed}" />
                             <then>
                                 <echo message=" PASSED : ${class.name}" />
-
-                                <!-- create xml-file with test's results -->
-<echo file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="0" name="@@@@@" tests="1" time="0.01">
-<testcase classname="@@@@@" name="test" time="0.1"/>
-<system-out><![CDATA[@out]!]></system-out>
-<system-err><![CDATA[@err]!]></system-err>
-</testsuite>]]> 
-</echo>
-                                <replace file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml" token="@@@@@" value="${class.name}_${mode.id}" /> 
                             </then>
                             <else>
                                 <echo message="*** FAILED **** : ${class.name} (${res.code} res code)" />
-                                <echo message="*** FAILED **** : ${class.name} on ${mode.name}${line.separator}" file="${build.semi.dir}/smoke.test.failed" append="true"/>
-
-                                <!-- create xml-file with test's results -->
-<echo file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="0" failures="1" name="@@@@@" tests="1" time="0.01">
-<testcase classname="@@@@@" name="test" time="0.1"><error message="FAILED"/></testcase>
-<system-out><![CDATA[@out]!]></system-out>
-<system-err><![CDATA[@err]!]></system-err>
-</testsuite>]]> 
-</echo>
-                                <replace file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml" token="@@@@@" value="${class.name}_${mode.id}" /> 
-                            </else>
-                        </if>
-
-                        <!-- unset res.code variable to use it for next run-->
-                        <var name="res.code" unset="true"/>
-
-                        <!-- grab System.out to xml-file -->
-                        <loadfile property="@{test}.tmp.out" srcFile="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.out" />
-                        <if>
-                            <isset property="@{test}.tmp.out" />
-                            <then>
-                                <replace file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml" token="@out]!" value="${@{test}.tmp.out}]" />
-                            </then>
-                            <else>
-                                <replace file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml" token="@out]!" value="]" />
+                                <echo message="*** FAILED **** : ${class.name} on ${mode.name}${line.separator}" file="${smoke.test.summary}" append="true"/>
                             </else>
                         </if>
                         
-                        <!-- grab System.err to xml-file -->
-                        <loadfile property="@{test}.tmp.err" srcFile="${build.dir}/_smoke.tests/reports/${class.name}_${mode.id}.out.err" />
-                        <if>
-                            <isset property="@{test}.tmp.err" />
-                            <then>
-                                <replace file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml" token="@err]!" value="${@{test}.tmp.err}]" />
-                            </then>
-                            <else>
-                                <replace file="${build.dir}/_smoke.tests/reports/TEST-${class.name}_${mode.id}.xml" token="@err]!" value="]" />
-                            </else>
-                        </if>
-
                     </then>
                     <else>
                         <propertycopy override="true" property="exclude.reason" from="@{test}.is.excluded" />
@@ -381,6 +263,7 @@
                 </if>
             </sequential>
         </for>
-        <echo message="Please find test classes and results at ${build.dir}/_smoke.tests/" />
+        <echo message="Please find test classes and results at ${smoke.test.dir}/reports" />
     </target>
+    
 </project>

Added: harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml?rev=573547&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml (added)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml Fri Sep  7 04:31:06 2007
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+     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="Shared test utilities">
+
+    <property name="test.hdk.home" location="${build.deploy.dir}"/>
+    <property name="hdk.lib.dir" location="${test.hdk.home}/lib"/>
+    <property name="hdk.include.dir" location="${test.hdk.home}/include"/>
+    <property name="test.jdk.home" location="${test.hdk.home}/jdk"/>
+    <property name="test.jre.home" location="${test.jdk.home}/jre"/>
+    <property name="test.jvm.exe" location="${test.jre.home}/bin/java"/>
+    <property name="base.test.dir" location="${build.semi.dir}/../tests"/>
+    <property file="test.properties"/>
+    
+    <property name="jasmin.jar" location="${basedir}/tmp/jasmin.jar"/>
+    <property name="vmmagic.jar" location="${test.hdk.home}/jdk/jre/lib/boot/vmmagic-20070207.jar"/>
+    
+    <macrodef name="compile-java">
+        <attribute name="src"/>
+        <attribute name="dest"/>
+        <element name="javac-elements" implicit="yes" optional="yes"/>
+        <sequential>
+            <mkdir dir="@{dest}" />
+            <javac srcdir="@{src}" destdir="@{dest}" 
+                target="${hy.javac.target}" source="${hy.javac.source}" 
+                compiler="${hy.javac.compiler}" debug="${hy.javac.debug}">
+                <include name="**/*.java"/>
+                <javac-elements/>
+            </javac>
+        </sequential>
+    </macrodef>
+    
+    <macrodef name="embed-manifest">
+        <attribute name="lib"/>
+        <sequential>
+	        <echo message="Adding manifest to @{lib}" />
+	        <exec executable="mt.exe">
+	            <arg value="-nologo" />
+	            <arg value="-manifest" />
+	            <arg value="@{lib}${manifest.suffix}" />
+	            <arg value="-outputresource:@{lib};#2" />
+	        </exec>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="ensure-resource">
+        <attribute name="name"/>
+        <sequential>
+	        <fail>
+	        <condition>
+                <not><and>
+                    <isset property="@{name}"/>
+	                <available file="${@{name}}"/>
+	            </and></not>
+	        </condition>
+	        
+            ==============================================
+            The @{name} is not found at ${@{name}}
+            Please specify the location as follows:
+            build.bat -D@{name}=path test
+            ==============================================
+	        </fail>
+        </sequential>        
+    </macrodef>
+    
+    <macrodef name="prepare-test-run">
+        <attribute name="test-dir"/>
+        <sequential>
+	        <delete quiet="true" dir="@{test-dir}/reports" />
+	        <mkdir dir="@{test-dir}/reports" />       
+	
+	        <property name="junit.jar" 
+	            location="${external.dep.CLASSLIB}/depends/jars/junit_3.8.2/junit.jar"/>
+	        <ensure-resource name="junit.jar"/>
+        </sequential>        
+    </macrodef>
+    
+    <macrodef name="take-xlist">
+        <attribute name="file" description="expected X-list location" />
+        <attribute name="name" description="property to set for the X-list location" />
+        <sequential>
+            <if>
+                <and>
+                	<available file="@{file}"/>
+                	<not><isset property="test.case"/></not>
+                </and>
+                <then>
+                    <property name="@{name}" location="@{file}"/>
+                    <loadfile property="@{file}.content" srcFile="@{file}"/>
+                    <property name="@{file}.content" value="&lt;empty>"/>
+                    <echo>
+    Using exclude file = ${@{name}} :
+            
+${@{file}.content}
+                    </echo>
+                </then>
+            </if>
+        </sequential>
+    </macrodef>
+    
+    <macrodef name="gen-test-report">
+        <attribute name="dir" />
+        <sequential>
+            <if>
+                <not><isset property="skip.report"/></not>
+                <then>
+                    <junitreport todir="@{dir}">
+                        <fileset dir="@{dir}">
+                            <include name="*.xml" />
+                            <exclude name="TESTS-TestSuites.xml"/>
+                        </fileset>
+                        <report format="frames" todir="@{dir}/html" />
+                    </junitreport>
+                </then>
+            </if>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="to-junit-xml">
+        <attribute name="xml" description="name of xml file"/>
+        <attribute name="suite" description="classname of suite"/>
+        <attribute name="test" default="test" description="testcase name"/>
+        <attribute name="status" description="Boolean value"/>
+        <attribute name="out" default="" description="test output"/>
+        <attribute name="err" default="" description="test error"/>
+        <attribute name="time" default="0.01" description="test execution time"/>
+        <sequential>
+            <echo file="@{xml}"><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
+            <testsuite errors="0" failures="@F@" name="@SUITE@" tests="1" time="@TIME@">
+                <testcase classname="@SUITE@" name="@NAME@" time="@TIME@">@MSG@</testcase>
+                <system-out><![CDATA[@out]!]></system-out>
+                <system-err><![CDATA[@err]!]></system-err>
+            </testsuite>]]> 
+            </echo>
+            <condition property="@{xml}.failed" value="0" else="1">
+                <istrue value="@{status}"/>
+            </condition>
+            <condition property="@{xml}.message" value="" else="&lt;failure message='FAILED'/>">
+                <istrue value="@{status}"/>
+            </condition>
+            <condition property="@{xml}.out" value="]" else="@{out}]">
+                <length string="@{out}" trim="true" length="0"/>
+            </condition>
+            <condition property="@{xml}.err" value="]" else="@{err}]">
+                <length string="@{err}" trim="true" length="0"/>
+            </condition>
+
+            <replace file="@{xml}" token="@SUITE@" value="@{suite}" />
+            <replace file="@{xml}" token="@NAME@" value="@{test}" />
+            <replace file="@{xml}" token="@TIME@" value="@{time}" />            
+            <replace file="@{xml}" token="@F@" value="${@{xml}.failed}" />
+            <replace file="@{xml}" token="@MSG@" value="${@{xml}.message}" />
+            <replace file="@{xml}" token="@out]!" value="${@{xml}.out}" />
+            <replace file="@{xml}" token="@err]!" value="${@{xml}.err}" />
+        </sequential>
+    </macrodef>
+    
+</project>

Propchange: harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/unit.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/unit.test.xml?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/unit.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/unit.test.xml Fri Sep  7 04:31:06 2007
@@ -15,40 +15,45 @@
     limitations under the License.
 -->
 <project name="UNIT TESTS">
+    
+    <import file="test.common.xml"/>
+    
+    <property name="unit.test.dir" location="${base.test.dir}/unit.tests"/>
+    <property name="unit.test.classes" location="${unit.test.dir}/classes"/>
+
     <target name="unit.test" depends="java_test_unit" />
     <target name="java_test_unit" depends="init_component">
         <if>
             <isreference refid="unit.test.javasrc" />
             <then>
-                <mkdir dir="${build.dir}/_unit.tests/classes" />
-                <javac classpath="${build.junit.jar}" destdir="${build.dir}/_unit.tests/classes">
+                <mkdir dir="${unit.test.classes}" />
+                <javac classpath="${build.junit.jar}" destdir="${unit.test.classes}">
                     <src refid="unit.test.javasrc" />
                     <patternset refid="unit.test.java.pattern" />
                     <bootclasspath>
                         <path id="java.classpath">
-                            <pathelement location="${build.deploy.dir}/jdk/jre/lib"/>
+                            <pathelement location="${test.jre.home}/lib"/>
                         </path>
                     </bootclasspath>
                 </javac>
-                <mkdir dir="${build.dir}/_unit.tests/report" />
-                <junit printsummary="true" haltonfailure="no"
-                       fork="yes" forkmode="once" jvm="${build.deploy.dir}/jdk/jre/bin/java.exe" failureproperty="some.unit.test.is.failed">
-                    <jvmarg value="-Xbootclasspath/p:${build.dir}/_unit.tests/classes;${build.junit.jar}" />
+                <prepare-test-run test-dir="${unit.test.dir}"/>
+                <junit printsummary="true" 
+                    haltonfailure="${test.failfast}"
+                    timeout="${test.timeout}"
+                    fork="yes" forkmode="once" 
+                    jvm="${test.jvm.exe}" 
+                    failureproperty="test.failed">
+                    
+                    <jvmarg value="-Xbootclasspath/p:${unit.test.classes}${path.separator}${junit.jar}" />
                     <formatter type="plain" usefile="true" />
-                    <batchtest todir="${build.dir}/_unit.tests/report">
-                        <fileset dir="${build.dir}/_unit.tests/classes" includes="**/*">
-<!--                            <patternset refid="unit.test.pattern" /> -->
+                    <batchtest todir="${unit.test.dir}/report">
+                        <fileset dir="${unit.test.classes}" includes="**/*">
                         </fileset>
                     </batchtest>
                 </junit>
 
-                <condition property="result.message" value="SOME TESTS FAILED!">
-                    <istrue value="${some.unit.test.is.failed}"/>
-                </condition>
-                <property name="result.message" value="" />
-
-                <echo message="Please find test classes and results at ${build.dir}/_unit.tests/" />
-                <echo message="${result.message}"/>
+                <echo message="Please find test classes and results at ${unit.test.dir}" />
+                <fail unless="run.all.tests" if="test.failed" message="Some unit tests failed"/>
             </then>
         </if>
     </target>

Modified: harmony/enhanced/drlvm/trunk/build/make/test.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/test.properties?rev=573547&r1=573546&r2=573547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/test.properties (original)
+++ harmony/enhanced/drlvm/trunk/build/make/test.properties Fri Sep  7 04:31:06 2007
@@ -22,7 +22,12 @@
 #
 #  time limit to complete test run
 #  in units of milliseconds
-test.timeout=3600000
+test.timeout=1800000
+
+# per single jvmti test
+jvmti.test.timeout=180000
+# per single regression test
+reg.test.timeout=600000
 
 # --------------------------------------------
 #
@@ -31,7 +36,7 @@
 # determines if tests should continue on failure
 # valid values are "off" and "on"
 #
-kernel.test.failfast=off
+test.failfast=off
 
 # --------------------------------------------
 #
@@ -49,7 +54,7 @@
 #
 #  additional arguments for vm to run tests
 #
-test.vmargs=
+test.vmargs=-XX:-vm.assert_dialog
 
 #--------------------------------------------
 #
@@ -83,8 +88,11 @@
 # ECLIPSE_HOME environment variable points to existing Eclipse installation
  
 eclipse.mirror=http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops/R-3.2.1-200609210945
+eclipse-3.3.mirror=http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops/R-3.3-200706251500
 eclipse.win.x86.url=${eclipse.mirror}/eclipse-SDK-3.2.1-win32.zip
+#eclipse.win.x86.url=${eclipse-3.3.mirror}/eclipse-SDK-3.3-win32.zip
 eclipse.win.x86_64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-win32-x86_64.zip
+#eclipse.win.x86_64.url=${eclipse-3.3.mirror}/eclipse-SDK-3.3-win32-x86_64.zip
 eclipse.win.ia64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-win32-ia64.zip
 eclipse.linux.x86.url=${eclipse.mirror}/eclipse-SDK-3.2.1-linux-gtk.tar.gz
 eclipse.linux.x86_64.url=${eclipse.mirror}/eclipse-SDK-3.2.1-linux-gtk-x86_64.tar.gz



Mime
View raw message