Author: varlax
Date: Mon Oct 8 21:50:45 2007
New Revision: 583047
URL: http://svn.apache.org/viewvc?rev=583047&view=rev
Log:
Untied functional tests from component framework improving stability, clarity and startup
time.
+ minor enhancements for "test2" target (adding reg.test, running everything in parallel if
HW capacity allows).
Removed:
harmony/enhanced/drlvm/trunk/build/make/targets/test.xml
Modified:
harmony/enhanced/drlvm/trunk/build/make/build.xml
harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml
harmony/enhanced/drlvm/trunk/build/make/targets/reg.test.run.xml
harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml
harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml
Modified: harmony/enhanced/drlvm/trunk/build/make/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build.xml?rev=583047&r1=583046&r2=583047&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build.xml Mon Oct 8 21:50:45 2007
@@ -27,11 +27,13 @@
unit.test - builds and runs unit tests for the
designated components
cunit.test - builds and runs cunit tests
+ ehwa.test - runs automated Eclispe HWA scenario
+ kernel.test - builds and runs tests for kernel.classes
smoke.test - builds and runs smoke tests for the
designated components
jvmti.test - builds and runs JVMTI tests
- test - builds and runs unit & smoke tests for the
- designated components
+ test - builds and runs unit & smoke tests
+ test2 - builds and runs all pre-commit tests in parallel
It is possible to specify the components to be built, via the
COMPONENTS property.
@@ -389,42 +391,37 @@
</target>
<!-- Main target for tests run: call unit.test and smoke.test -->
- <target name="test" depends="setup, init, set.target.to.test">
- <condition property="component_to_test" value="vm">
- <equals arg1="${COMPONENTS}" arg2="deploy" />
- <!-- test means smoke test on vm -->
- </condition>
- <property name="component_to_test" value="${COMPONENTS}" />
- <subant buildpath="." antfile="build_component.xml" target="build" inheritall="true"
failonerror="true">
- <property name="_component" value="${component_to_test}" />
- <property name="_target" value="${target}" />
- </subant>
+ <target name="test" depends="init,jvmti.test, cunit.test, smoke.test, kernel.test">
+ <fail if="test.failed" message="Some tests failed"/>
</target>
- <target name="test2" depends="init">
- <property file="test.properties"/>
- <parallel threadsPerProcessor="1" failonany="no">
- <ant antfile="${external.dep.CLASSLIB}/build.xml" inheritAll="no" output="${build.semi.dir}/hut.log">
+ <target name="hut.test" depends="init">
+ <property name="hut.module" value="*"/>
+ <ant antfile="${external.dep.CLASSLIB}/build.xml" inheritAll="no">
<target name="properties"/>
<target name="test"/>
<property name="hy.test.vm.name" value="drl"/>
<property name="test.jre.home" value="${build.deploy.dir}/jdk/jre"/>
<property name="short.report" value="true"/>
- <property name="hy.test.vmargs" value="-XX:-vm.assert_dialog ${test.vmargs}"/>
+ <property name="hy.test.vmargs" value="${test.vmargs}"/>
+ <property name="build.module" value="${hut.module}"/>
</ant>
- <ant antfile="targets/kernel.test.xml" target="kernel.test" output="${build.semi.dir}/kernel.log"/>
- <ant antfile="targets/ehwa.test.xml" target="ehwa" output="${build.semi.dir}/ehwa.log"/>
- <!--ant target="test" output="${build.semi.dir}/test.log"/-->
- <sequential>
- <ant target="cunit.test" output="${build.semi.dir}/cunit.log"/>
- <ant target="smoke.test" output="${build.semi.dir}/smoke.log"/>
- <ant target="jvmti.test" output="${build.semi.dir}/jvmti.log"/>
- </sequential>
- </parallel>
</target>
-
- <target name="set.target.to.test">
- <property name="target" value="test" />
+
+ <target name="test2" depends="init">
+ <property file="test.properties"/>
+ <property name="run.all.tests" value="true"/>
+ <property name="base.test.dir" location="${build.semi.dir}/../tests"/>
+ <parallel threadsPerProcessor="1" failonany="no">
+ <ant target="hut.test" output="${base.test.dir}/hut.log"/>
+ <ant antfile="targets/kernel.test.xml" target="kernel.test" output="${base.test.dir}/kernel.log"/>
+ <ant antfile="targets/ehwa.test.xml" target="ehwa" output="${base.test.dir}/ehwa.log"/>
+ <ant antfile="targets/jvmti.test.xml" target="jvmti.test" output="${base.test.dir}/jvmti.log"/>
+ <ant antfile="targets/smoke.test.xml" target="smoke.test" output="${base.test.dir}/smoke.log"/>
+ <ant antfile="targets/reg.test.xml" target="reg.test" output="${base.test.dir}/reg.log"/>
+ <ant target="cunit.test" output="${base.test.dir}/cunit.log"/>
+ </parallel>
+ <fail if="test.failed" message="Some tests failed"/>
</target>
<!-- Main target to run unit tests -->
@@ -442,11 +439,8 @@
</target>
<!-- Main target to run smoke tests -->
- <target name="smoke.test" depends="setup, init">
- <subant buildpath="." antfile="build_component.xml" target="build" inheritall="true"
failonerror="true">
- <property name="_component" value="vm" />
- <property name="_target" value="smoke.test" />
- </subant>
+ <target name="smoke.test" depends="init">
+ <ant antfile="targets/smoke.test.xml" target="smoke.test"/>
</target>
<!-- Main target to run kernel tests -->
@@ -460,11 +454,8 @@
</target>
<!-- Main target to run jvmti tests /-->
- <target name="jvmti.test" depends="setup, init">
- <subant buildpath="." antfile="build_component.xml" target="build" inheritall="true"
failonerror="true">
- <property name="_component" value="vm" />
- <property name="_target" value="jvmti.test" />
- </subant>
+ <target name="jvmti.test" depends="init">
+ <ant antfile="targets/jvmti.test.xml" target="jvmti.test"/>
</target>
<!-- Main target to run regression test /-->
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=583047&r1=583046&r2=583047&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/jvmti.test.xml Mon Oct 8 21:50:45 2007
@@ -41,7 +41,7 @@
<compile-java dest="${jvmti.test.class.path}" src="${jvmti.test.src}"/>
</target>
- <target name="compile-jvmti-tests-native" depends="init_component">
+ <target name="compile-jvmti-tests-native">
<mkdir dir="${jvmti.test.native.path}" />
<for list="${jvmti.test.src.dirs.list}" param="directory"
@@ -57,12 +57,8 @@
link="shared"
outfile="${jvmti.test.native.path}/${outputdir}/${outputdir}">
<includepath path="${test.jdk.home}/include" />
- <select os="lnx">
- <linkerarg value="-lstdc++" />
- </select>
- <select os="win">
- <compilerarg value="/EHsc" />
- </select>
+ <linkerarg value="-lstdc++" if="is.unix"/>
+ <compilerarg value="/EHsc" if="is.windows"/>
<fileset dir="${jvmti.test.src}/${outputdir}">
<include name="**/*.cpp" />
</fileset>
@@ -144,7 +140,7 @@
<if>
<or>
<equals arg1="@{mode}" arg2="int" />
- <equals arg1="${build.arch}" arg2="ia32" />
+ <isset property="is.x86"/>
</or>
<then>
<antcall target="run-jvmti-tests" >
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=583047&r1=583046&r2=583047&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 Mon Oct 8 21:50:45 2007
@@ -19,7 +19,7 @@
<import file="test.common.xml"/>
- <!-- Mark used by custom test launchers for test failure notification -->
+ <!-- Marker used by custom test launchers for test failure notification -->
<property name="reg.test.failed.mark" value="-=@@@ Reg Test Failed @@@=-"/>
<target name="do-regression-testing"
@@ -167,16 +167,14 @@
<formatter type="brief"/>
<formatter type="xml"/>
</junit>
- <if>
- <isset property="reg.test.custom.launched"/>
- <then>
- <fail message="${reg.test.failed.mark}">
- <condition>
- <istrue value="${reg.test.errors}"/>
- </condition>
- </fail>
- </then>
- </if>
+ <fail message="${reg.test.failed.mark}">
+ <condition>
+ <and>
+ <isset property="reg.test.custom.launched"/>
+ <istrue value="${reg.test.errors}"/>
+ </and>
+ </condition>
+ </fail>
</sequential>
</macrodef>
@@ -207,7 +205,7 @@
<attribute name="args" default=""/>
<element name="java-element" optional="true"/>
<sequential>
- <echo message="Running regression test: @{test}"/>
+ <echo message="Running @{test}"/>
<java jvm="${test.jvm.exe}"
classname="@{test}"
resultproperty="@{test}.res.code"
@@ -238,12 +236,12 @@
<if>
<isfalse value="${@{test}.is.passed}"/>
<then>
- <echo>
-@{test} FAILED! (${@{test}.res.code} exit code)
-See ${reg.test.dir}/reports/@{test}.txt file for details.
- </echo>
+ <echo message="*** FAILED **** : @{test} (${@{test}.res.code} exit
code)"/>
<fail message="${reg.test.failed.mark}"/>
</then>
+ <else>
+ <echo message="PASSED : @{test}"/>
+ </else>
</if>
</sequential>
</macrodef>
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=583047&r1=583046&r2=583047&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/smoke.test.xml Mon Oct 8 21:50:45 2007
@@ -29,15 +29,12 @@
<exclude name="**/*$*.class"/>
</patternset>
- <target name="smoke.test.native.init">
- <fileset id="smoke.test.native.refid"
- dir="${smoke.test.src}">
- <include name="**/*.c"/>
- </fileset>
- <pathconvert property="smoke.test.native.list"
- refid="smoke.test.native.refid" pathsep="," />
-
- </target>
+ <fileset id="smoke.test.native.refid"
+ dir="${smoke.test.src}">
+ <include name="**/*.c"/>
+ </fileset>
+ <pathconvert property="smoke.test.native.list"
+ refid="smoke.test.native.refid" pathsep="," />
<target name="smoke.test" depends="clean, compile.smoke.test, java_test_smoke, build_report">
<available property="test.failed" file="${smoke.test.summary}" />
@@ -54,7 +51,7 @@
</target>
- <target name="compile.smoke.test.native" depends="init_component, smoke.test.native.init">
+ <target name="compile.smoke.test.native">
<mkdir dir="${smoke.test.native.path}" />
<for list="${smoke.test.native.list}" param="full.file.path" delimiter=",">
@@ -77,9 +74,7 @@
link="shared"
outfile="${smoke.test.native.path}/${outputdir}/${outputfile}">
<includepath path="${test.jdk.home}/include" />
- <select os="lnx">
- <linkerarg value="-lstdc++" />
- </select>
+ <!--linkerarg value="-lstdc++" if="is.linux"/-->
<fileset file="@{full.file.path}" />
</cc>
@@ -257,7 +252,6 @@
</condition>
<escape-cdata file="${test.report}.out.err" property="@{test}.msg"/>
- <property name="@{test}.msg" value=""/>
<to-junit-xml xml="${smoke.test.dir}/reports/TEST-${class.name}_${mode.id}.xml"
suite="${class.name}_${mode.id}" test="${mode.name}"
status="${@{test}.is.passed}"
Modified: 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=583047&r1=583046&r2=583047&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/test.common.xml Mon Oct 8 21:50:45 2007
@@ -25,7 +25,14 @@
<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"/>
-
+ <if>
+ <isset property="is.ia64"/>
+ <then>
+ <!-- only default and interpreter modes currently supported on IA64 -->
+ <propertyregex property="test.mode" input="${test.mode}" regexp="(jet|opt|srv)"
replace="" override="on" />
+ </then>
+ </if>
+
<property name="jasmin.jar" location="${basedir}/tmp/jasmin.jar"/>
<property name="vmmagic.jar" location="${test.hdk.home}/jdk/jre/lib/boot/vmmagic-20070207.jar"/>
@@ -35,12 +42,10 @@
<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}">
+ <hy.javac srcdir="@{src}" destdir="@{dest}" >
<include name="**/*.java"/>
<javac-elements/>
- </javac>
+ </hy.javac>
</sequential>
</macrodef>
|