Author: nickboldt
Date: 2010-01-28 00:16:09 -0500 (Thu, 28 Jan 2010)
New Revision: 19972
Added:
trunk/bpel/releng/custom-library.xml
Modified:
trunk/bpel/releng/testing.properties
Log:
commit custom library file and new properties for running tests
Added: trunk/bpel/releng/custom-library.xml
===================================================================
--- trunk/bpel/releng/custom-library.xml (rev 0)
+++ trunk/bpel/releng/custom-library.xml 2010-01-28 05:16:09 UTC (rev 19972)
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+<project name="Library" default="usage" basedir=".">
+
+ <target name="usage">
+ <echo message="Please refer to the testframework.html in org.eclipse.test for
instructions on usage." />
+ </target>
+
+ <target name="init">
+ <!--
+ Parameters:
+ (Mandatory)
+ data-dir - the directory for Eclipse to write its data
+ plugin-name - the name of the plugin to test
+ classname - the name of the test class
+
+ (Optional - overrides defaults set in script)
+ vmargs - a string containing arguments to pass to the VM.
+ extraVMargs - allows separate setting of VM args from separate caller.
+ timeout - overrides default test timeout value (in milliseconds).
+ test-output - overrides default output file produced from test run.
+ plugin-path - path to root of plug-in
+ useEclipseExe - property setting forces test to launch via eclipse executable.
+ junit-report-output - output directory for junit reports produced for specified
classname.
+ -->
+
+ <tstamp>
+ <format property="TIMENOW" pattern="HHmmssSSSS"/>
+ </tstamp>
+ <!--property setting useEclipseExe launches tests using the eclipse
executable-->
+ <condition property="launchTarget" value="eclipse-test">
+ <isset property="useEclipseExe" />
+ </condition>
+ <!--default launch target for launching tests-->
+ <property name="launchTarget" value="java-test" />
+ <property name="formatter"
value="org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter"/>
+
+ <!--default heap sizes when running performance tests-->
+ <condition property="vmargs" value=" -Xms256M -Xmx512M">
+ <equals arg1="${test.target}" arg2="performance" />
+ </condition>
+ <property name="extraVMargs" value=""/>
+ <property name="plugin-path" value="" />
+ <property name="timeout" value="7200000" />
+ <property name="test-output"
value="${eclipse-home}/${classname}.xml" />
+ <property name="junit-report-output"
value="${eclipse-home}/results" />
+ <mkdir dir="${junit-report-output}"/>
+ </target>
+
+ <target name="core-test" description="Eclipse application used to
launch HEADLESS plugin tests." depends="init">
+ <antcall target="${launchTarget}">
+ <param name="application"
value="org.eclipse.test.coretestapplication"/>
+ </antcall>
+ </target>
+
+ <target name="ui-test" description="Eclipse application used to launch
UI plugin tests." depends="init">
+ <antcall target="${launchTarget}">
+ <param name="application"
value="org.eclipse.test.uitestapplication"/>
+ </antcall>
+ </target>
+
+ <target name="java-test">
+ <!--default vm args-->
+ <property name="vmargs" value=" -Xms40m -Xmx348m"/>
+
+ <!--set default jvm to use for testing-->
+ <property name="jvm" value="${java.home}/bin/java" />
+
+ <echo message="Running ${classname}. Result file:
${junit-report-output}/${classname}.xml."/>
+ <echo>vmargs=${vmargs}, extraVMargs=${extraVMargs}, Xflags=${Xflags},
Dflags=${Dflags}</echo>
+ <java fork="true" dir="." timeout="${timeout}"
jvm="${jvm}" logError="true"
+ classname="org.eclipse.core.launcher.Main"
output="${junit-report-output}/${classname}.txt">
+ <classpath>
+ <fileset dir="${eclipse-home}/plugins">
+ <include name="org.eclipse.equinox.launcher_*.jar"/>
+ </fileset>
+ </classpath>
+ <arg line="-application ${application}"/>
+ <arg line="-data ${data-dir}"/>
+ <arg line="formatter=${formatter},${test-output}"/>
+ <arg line="-testPluginName ${plugin-name}"/>
+ <arg line="-className ${classname}"/>
+ <arg line="-os ${os}"/>
+ <arg line="-ws ${ws}"/>
+ <arg line="-arch ${arch}"/>
+ <arg line="-consolelog"/>
+ <arg line="-vmargs ${vmargs} ${extraVMargs} ${Xflags} ${Dflags}
-DPLUGIN_PATH=${plugin-path}"/>
+ </java>
+ <antcall target="collect-results" />
+ </target>
+
+ <target name="eclipse-test" description="Runs the specified classname
as a plug-in test.">
+ <property name="vmargs" value="-Xms256m -Xmx512m"/>
+
+ <!--use -consolelog if launching a headless test-->
+ <condition property="consolelog" value="-consolelog">
+ <equals arg1="${application}"
arg2="org.eclipse.test.coretestapplication"/>
+ </condition>
+ <property name="consolelog" value="" />
+
+ <!--
+ vm selection priority:
+ 1. user-specified java executable via outer Ant property setting of "jvm".
+ 2. java executable on path.
+ -->
+ <condition property="test-vm" value="-vm ${jvm}">
+ <isset property="jvm" />
+ </condition>
+ <property name="test-vm" value="" />
+
+ <!--ensure executable has execute permission-->
+ <chmod file="${eclipse-home}/eclipse" perm="ugo+rx"/>
+
+
+ <echo message="Running ${classname}. Result file:
${junit-report-output}/${classname}.xml."/>
+ <echo>vmargs=${vmargs}, extraVMargs=${extraVMargs}, Xflags=${Xflags},
Dflags=${Dflags}</echo>
+ <exec executable="${eclipse-home}/eclipse" dir="${eclipse-home}"
timeout="${timeout}" logError="true" failonerror="false"
output="${junit-report-output}/${classname}.txt">
+ <arg line="-data ${data-dir}"/>
+ <arg line="${test-vm}"/>
+ <arg line="-application ${application}"/>
+ <arg line="formatter=${formatter},${test-output}"/>
+ <arg line="-testPluginName ${plugin-name}"/>
+ <arg line="-className ${classname}"/>
+ <arg line="-nosplash"/>
+ <arg line="--launcher.suppressErrors"/>
+ <arg line="${consolelog}"/>
+ <arg line="-vmargs ${vmargs} ${extraVMargs} ${Xflags} ${Dflags}
-DPLUGIN_PATH=${plugin-path}"/>
+ </exec>
+ <antcall target="collect-results" />
+ </target>
+
+ <target name="collect-results">
+ <dirname property="output-dir" file="${test-output}"/>
+ <basename property="output-file-name"
file="${test-output}"/>
+ <junitreport todir="${junit-report-output}"
tofile="${classname}.xml">
+ <fileset dir="${output-dir}">
+ <include name="${output-file-name}"/>
+ </fileset>
+ </junitreport>
+
+ <xslt
style="${eclipse-home}/dropins/eclipse/plugins/org.eclipse.test/JUNIT.XSL"
+ basedir="${junit-report-output}"
+ includes="${classname}.result.xml"
+ destdir="${junit-report-output}" />
+
+ <!--save .log content and *.log content from configuration directory-->
+ <concat destfile="${junit-report-output}/${classname}.log">
+ <fileset dir="${eclipse-home}"
includes="${data-dir}/.metadata/*.log"/>
+ <fileset dir="${eclipse-home}"
includes="configuration/*.log"/>
+ </concat>
+ </target>
+
+ <target name="collect">
+ <!--
+ This target can be used to aggragate test runs from multiple test suites into a single
report.
+
+ Parameters to this target:
+ includes - the names of the files to include
+ output-file - the name of the output file to produce
+ -->
+ <junitreport todir="." tofile="${output-file}">
+ <fileset dir=".">
+ <include name="${includes}"/>
+ </fileset>
+ </junitreport>
+ </target>
+
+</project>
+
Property changes on: trunk/bpel/releng/custom-library.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/bpel/releng/testing.properties
===================================================================
--- trunk/bpel/releng/testing.properties 2010-01-28 05:15:01 UTC (rev 19971)
+++ trunk/bpel/releng/testing.properties 2010-01-28 05:16:09 UTC (rev 19972)
@@ -6,6 +6,68 @@
# the test plugin to deviate from default one-suite-per-plugin operation
org.jboss.tools.bpel.ui.test.suite=org.jboss.tools.bpel.ui.test.BpelUIAllTests
-# set different defaults when running these tests
-vmargs=" -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m "
-extraVMargs=" -Xbootclasspath/a:./emma.jar "
+# to use a different library-file than the default from org.eclipse.test/library.xml
+library-file=${relengBuilderDir}/custom-library.xml
+
+# to dump test properties into console log and separate file (for debugging purposes),
set echotestproperties=true
+echotestproperties=true
+
+################################################################################################
+
+#which (sub)project?
+project=${subprojectName}
+
+#target to call in test.xml: runtests-local | runtests-remote
+testTarget=runtests-local
+
+#directory on test machine where automated testing framework will be installed
+# testBase=/tmp/build/N200911122249/testing
+# testDir=/tmp/build/N200911122249/testing/N200911122249
+testDir=${testBase}/${buildLabel}
+
+#name of zip file containing automated testing framework and JUnit test plug-ins
+testFramework=${zipPrefix}-Automated-Tests${incubation}-${buildAlias}.zip
+
+#directory where test scripts are launched
+# executionDir=/tmp/build/N200911122249/testing/N200911122249/testing
+executionDir=${testDir}/testing
+
+#name of Update & Master Zip or runtime/SDK/all-in-one to install and test
+updateZip=${zipPrefix}-Update${incubation}-${buildAlias}.zip
+MasterZip=${zipPrefix}-Master${incubation}-${buildAlias}.zip
+# backup if update zip does not exist
+SDKZip=${zipPrefix}-SDK${incubation}-${buildAlias}.zip
+
+#used by org.eclipse.build.tools/scripts/test.xml; must be set (but no longer used)
+runtime=${zipPrefix}-Update${incubation}-${buildAlias}.zip
+
+# path to java
+vmExecutable=${JAVA_HOME}/bin/java
+
+#hack to override unneeded function in
releng.basebuilder/plugins/org.eclipse.build.tools/scripts/test.xml
+vmUrl=
+vmDest=/dev/null
+vmInstallExecutable=${vmExecutable}
+vmInstallCommand=-version
+
+#eclipse platforms: win32 | linux.motif | linux.gtk | aix.motif | hpux.motif
|solaris.motif
+platform=${baseos}.${basews}
+
+#name of file that captures console output from running JUnit plug-in tests
+consolelog=${baseos}.${basews}_consolelog.txt
+
+#Works with IBM and Sun JDKs, 1.4+
+#name of script to execute
+testExecutable=bash
+
+Xflags= -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
+#see bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=106396 for rationale for
"-Dosgi.bundlefile.limit=100"
+Dflags=-Dosgi.bundlefile.limit=100
+
+#arguments to ${testExecutable} - .sh script + args
+args=${executionDir}/${shell} -vmExecutable ${vmExecutable} -consolelog ${consolelog}
${Xflags} ${Dflags}
+
+# vmargs and extraVMargs are used by library.xml (or your own custom version)
+#vmargs= -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
+#extraVMargs= -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m
+# could also add things like: -Xbootclasspath/a:/path/to/emma.jar ?