Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKetan Padegaonkar2011-03-02 12:57:17 -0500
committerKetan Padegaonkar2011-03-02 20:31:02 -0500
commit4352d34351004ffa641fd72dfb23d12ffbbed747 (patch)
treeb457b8111efe4056b73202df162feb4f0382c1d6
parente65fdbfc827f162b5eeb32eb0078519d77830fcb (diff)
downloadorg.eclipse.swtbot-forms-support.tar.gz
org.eclipse.swtbot-forms-support.tar.xz
org.eclipse.swtbot-forms-support.zip
Add the SWTBot forms (and test plugins) to the test feature and build so that the tests are compiled as part of the regular build.forms-support
-rw-r--r--org.eclipse.swtbot.releng/allElements.xml9
-rw-r--r--org.eclipse.swtbot.releng/build.xml3
-rw-r--r--org.eclipse.swtbot.releng/test-sandbox/org.eclipse.swtbot.forms.finder.test.xml76
-rw-r--r--org.eclipse.swtbot.releng/test-sandbox/test.xml6
-rw-r--r--org.eclipse.swtbot.test/feature.xml17
5 files changed, 110 insertions, 1 deletions
diff --git a/org.eclipse.swtbot.releng/allElements.xml b/org.eclipse.swtbot.releng/allElements.xml
index 459457ac..c78891c3 100644
--- a/org.eclipse.swtbot.releng/allElements.xml
+++ b/org.eclipse.swtbot.releng/allElements.xml
@@ -41,6 +41,11 @@
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
+ <property name="id" value="org.eclipse.swtbot.forms" />
+ </ant>
+
+ <ant antfile="${genericTargets}" target="${target}">
+ <property name="type" value="feature" />
<property name="id" value="org.eclipse.swtbot.test" />
</ant>
@@ -80,4 +85,8 @@
<target name="assemble.org.eclipse.swtbot.ide">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
</target>
+
+ <target name="assemble.org.eclipse.swtbot.forms">
+ <ant antfile="${assembleScriptName}" dir="${buildDirectory}" />
+ </target>
</project>
diff --git a/org.eclipse.swtbot.releng/build.xml b/org.eclipse.swtbot.releng/build.xml
index 13f1cd58..3d9db0ef 100644
--- a/org.eclipse.swtbot.releng/build.xml
+++ b/org.eclipse.swtbot.releng/build.xml
@@ -95,6 +95,7 @@
<!-- list all your features here -->
<include name="${feature.id}/**" />
<include name="${feature.id.test}/**" />
+ <include name="org.eclipse.swtbot.forms/**" />
<include name="org.eclipse.swtbot.eclipse/**" />
<include name="org.eclipse.swtbot.eclipse.test.junit3/**" />
<include name="org.eclipse.swtbot.eclipse.test.junit4/**" />
@@ -114,11 +115,13 @@
<!-- include plugins here -->
<include name="${plugin.prefix}*/**" />
<include name="org.eclipse.swt.examples/**" />
+ <include name="org.eclipse.ui.forms.examples/**" />
<include name="org.apache.*/**" />
<!-- remember to exclude features in case you are using wildcards -->
<exclude name="org.eclipse.swtbot.releng/**" />
<exclude name="${feature.id}/**" />
<exclude name="${feature.id.test}/**" />
+ <exclude name="org.eclipse.swtbot.forms/**" />
<exclude name="org.eclipse.swtbot.eclipse/**" />
<exclude name="org.eclipse.swtbot.eclipse.gef/**" />
<exclude name="org.eclipse.swtbot.eclipse.test.junit3/**" />
diff --git a/org.eclipse.swtbot.releng/test-sandbox/org.eclipse.swtbot.forms.finder.test.xml b/org.eclipse.swtbot.releng/test-sandbox/org.eclipse.swtbot.forms.finder.test.xml
new file mode 100644
index 00000000..05863654
--- /dev/null
+++ b/org.eclipse.swtbot.releng/test-sandbox/org.eclipse.swtbot.forms.finder.test.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<project name="testsuite" default="run" basedir=".">
+ <property name="eclipse-home" value="${basedir}\..\.." />
+ <property name="plugin-under-test" value="org.eclipse.swtbot.forms.finder" />
+ <property name="plugin-name" value="org.eclipse.swtbot.forms.finder.test" />
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.swtbot.eclipse.junit4.headless_${all.buildId}/library.xml"/>
+
+ <property name="build.instrumentation.reports.dir" value="${results.dir}/${plugin-name}/coverage/html" />
+ <property name="build.instrumentation.reports.xml.dir" value="${results.dir}/${plugin-name}/coverage/xml" />
+
+ <property name="cobertura.data.file" value="${basedir}/${plugin-name}.ser" />
+
+ <target name="init">
+ <tstamp />
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml" />
+ </delete>
+ </target>
+
+ <path id="cobertura.classpath">
+ <fileset dir="${build.base}/../externals/libs/cobertura-1.9.4.1">
+ <include name="cobertura.jar" />
+ <include name="lib/**/*.jar" />
+ </fileset>
+ </path>
+
+ <taskdef classpathref="cobertura.classpath" resource="tasks.properties" />
+
+ <target name="instrument">
+ <delete file="${cobertura.data.file}" />
+
+ <cobertura-instrument datafile="${cobertura.data.file}">
+ <fileset dir="${eclipse-home}/plugins">
+ <include name="${plugin-under-test}_${all.buildId}.jar" />
+ </fileset>
+ </cobertura-instrument>
+ </target>
+
+ <target name="suite">
+
+ <condition property="jvmOption" value="-XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts -Dnet.sourceforge.cobertura.datafile=${cobertura.data.file} -Xbootclasspath/p:${build.base}/../externals/libs/cobertura-1.9.4.1/cobertura.jar">
+ <os family="mac" />
+ </condition>
+
+ <property name="jvmOption" value="-Dnet.sourceforge.cobertura.datafile=${cobertura.data.file} -Xbootclasspath/p:${build.base}/../externals/libs/cobertura-1.9.4.1/cobertura.jar" />
+
+
+ <property name="temp-workspace" value="workspace" />
+ <delete dir="${temp-workspace}" quiet="true" />
+
+ <!-- remove junit3 fragment -->
+ <delete dir="${eclipse-home}/plugins/org.eclipse.swtbot.eclipse.junit3.headless_${all.buildId}" />
+ <delete dir="${eclipse-home}/plugins" includes="org.eclipse.swtbot.ant.optional.junit3_${all.buildId}.jar"/>
+
+ <ant target="swtbot-test" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${temp-workspace}" />
+ <property name="testApplication" value="org.eclipse.ui.ide.workbench" />
+ <property name="plugin-name" value="${plugin-name}" />
+ <property name="classname" value="org.eclipse.swtbot.forms.finder.test.AllTests" />
+ <property name="vmargs" value=" -Xms128M -Xmx368M -XX:MaxPermSize=256M ${jvmOption} ${extra.jvm.options}" />
+ </ant>
+ </target>
+
+ <target name="test-coverage">
+ <cobertura-report format="html" destdir="${build.instrumentation.reports.dir}" srcdir="${build.base}/plugins/${plugin-under-test}/src" datafile="${cobertura.data.file}" />
+ <cobertura-report format="xml" destdir="${build.instrumentation.reports.xml.dir}" srcdir="${build.base}/plugins/${plugin-under-test}/src" datafile="${cobertura.data.file}" />
+ </target>
+
+ <target name="run" depends="init, instrument, suite, test-coverage">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="*.xml" />
+ <property name="output-file" value="${plugin-name}.xml" />
+ </ant>
+ </target>
+
+</project> \ No newline at end of file
diff --git a/org.eclipse.swtbot.releng/test-sandbox/test.xml b/org.eclipse.swtbot.releng/test-sandbox/test.xml
index 16e8af5e..4b184963 100644
--- a/org.eclipse.swtbot.releng/test-sandbox/test.xml
+++ b/org.eclipse.swtbot.releng/test-sandbox/test.xml
@@ -279,11 +279,15 @@
<runTests testPlugin="org.eclipse.swtbot.eclipse.finder.test" />
</target>
+ <target name="test-forms">
+ <runTests testPlugin="org.eclipse.swtbot.forms.finder.test" />
+ </target>
+
<target name="test-eclipse-ui">
<runTests testPlugin="org.eclipse.swtbot.eclipse.ui.test" />
</target>
- <target name="all" depends="test-finder, test-generator, test-eclipse-finder, test-eclipse-ui" />
+ <target name="all" depends="test-finder, test-forms, test-eclipse-finder, test-eclipse-ui, test-generator" />
</project>
diff --git a/org.eclipse.swtbot.test/feature.xml b/org.eclipse.swtbot.test/feature.xml
index 746fa24a..8ccf3f5c 100644
--- a/org.eclipse.swtbot.test/feature.xml
+++ b/org.eclipse.swtbot.test/feature.xml
@@ -41,6 +41,10 @@
id="org.eclipse.swtbot.ide"
version="0.0.0"/>
+ <includes
+ id="org.eclipse.swtbot.forms"
+ version="0.0.0"/>
+
<requires>
<import plugin="org.eclipse.swt"/>
<import plugin="org.eclipse.swtbot.swt.finder"/>
@@ -136,4 +140,17 @@
version="0.0.0"
unpack="false"/>
+ <plugin
+ id="org.eclipse.ui.forms.examples"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.swtbot.forms.finder.test"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>

Back to the top