Moved swconfigapps content under oss repository.
<!-- Build file for the com.symbian.smt.gui.test plug-in PDE unit test fragment -->
<project name="com.symbian.smt.gui.test" default="help" basedir=".">
<property name="plugin.dir" location="${basedir}"/>
<property name="projects.dir" location="${basedir}/.."/>
<property file="${projects.dir}/project.properties"/>
<property name="plugin.name" value="com.symbian.smt.gui.test"/>
<property name="plugin.version" value="1.0.0"/>
<property name="plugin.under.test.version" value="1.1.1"/>
<property name="properties.plugin.under.test.version" value="1.1.1"/>
<property name="test.eclipse.dir" location="c:/opt/eclipse-for-pde-unit-tests"/>
<property name="target.dir" location="${projects.dir}/target"/>
<property name="published.plugins.dir" location="${target.dir}/plugins"/>
<property name="src.dir" location="${plugin.dir}/src"/>
<property name="test.dir" location="${plugin.dir}/src"/>
<property name="plugin.target.dir" location="${plugin.dir}/target"/>
<property name="reports.dir" location="${plugin.target.dir}/reports"/>
<property name="classes.dir" location="${plugin.target.dir}/classes"/>
<property name="test.reports.dir" location="${reports.dir}/test"/>
<property name="pde.test.utils.version" value="1.0.0"/>
<path id="build.class.path">
<pathelement location="${published.plugins.dir}/com.symbian.smt.gui_${plugin.under.test.version}.jar"/>
<fileset dir="${test.eclipse.dir}/plugins">
<include name="org.eclipse.core.runtime_*.jar"/>
<include name="org.eclipse.equinox.common_*.jar"/>
<include name="org.eclipse.ui.workbench_*.jar"/>
<include name="org.eclipse.jface_*.jar"/>
<include name="org.eclipse.swt_*.jar"/>
<include name="org.eclipse.swt.win32.win32.x86_*.jar"/>
<include name="org.junit_3*/**/junit.jar"/>
<include name="org.eclipse.equinox.preferences_3.2*.jar"/>
<include name="org.eclipse.core.resources_3.4*.jar"/>
<include name="org.eclipse.ui.ide_3.4*.jar"/>
<include name="org.eclipse.core.jobs_3.4*.jar"/>
</fileset>
</path>
<path id="pde.test.listener.class.path">
<path refid="build.class.path"/>
<pathelement location="${published.plugins.dir}/com.symbian.pde.test.utils_${pde.test.utils.version}.jar"/>
<fileset dir="${test.eclipse.dir}/plugins">
<include name="org.apache.ant_*/**/ant.jar"/>
<include name="org.apache.ant_*/**/ant-junit.jar"/>
<include name="org.eclipse.jdt.junit_*.jar"/>
<include name="org.eclipse.debug.core_*.jar"/>
<include name="org.eclipse.osgi_*.jar"/>
<include name="org.eclipse.core.resources_*.jar"/>
<include name="org.eclipse.swt_*.jar"/>
</fileset>
</path>
<path id="pde.test.port.locator.class.path">
<pathelement location="${published.plugins.dir}/com.symbian.pde.test.utils_${pde.test.utils.version}.jar"/>
<fileset dir="${test.eclipse.dir}/plugins">
<include name="org.junit_3*/**/junit.jar"/>
</fileset>
</path>
<path id="equinox.launcher.class.path">
<fileset dir="${test.eclipse.dir}/plugins">
<include name="org.eclipse.equinox.launcher_*.jar"/>
</fileset>
</path>
<target name="build">
<mkdir dir="${classes.dir}"/>
<javac srcdir="${test.dir}" destdir="${classes.dir}" debug="${debug}" deprecation="${deprecation}" classpathref="build.class.path" includeantruntime="false"/>
<antcall target="create_eclipse_plugin"/>
<copy todir="${published.plugins.dir}" file="${plugin.target.dir}/${plugin.name}_${plugin.version}.jar" overwrite="true"/>
</target>
<target name="create_eclipse_plugin">
<property file="${plugin.dir}/build.properties"/> <!-- Load bin.includes property from plugin's eclipse build.properties file -->
<delete file="${plugin.target.dir}/${plugin.name}_${plugin.version}.jar"/>
<zip destfile="${plugin.target.dir}/${plugin.name}_${plugin.version}.jar">
<zipfileset dir="." includes="${bin.includes}"/>
<zipfileset dir="${classes.dir}"/>
</zip>
</target>
<target name="test" depends="build, pde_test, generate_report, check_results"/>
<target name="pde_test">
<delete>
<fileset dir="${test.eclipse.dir}/plugins" includes="com.symbian.smt.gui*.jar"/>
<fileset dir="${test.eclipse.dir}/plugins" includes="com.symbian.pde.test.utils*.jar"/>
</delete>
<!-- Load plugin and pde tests plugin fragment into test eclipse installation -->
<copy todir="${test.eclipse.dir}/plugins" overwrite="true">
<fileset dir="${published.plugins.dir}"/>
</copy>
<delete file="pde_test_port.properties"/> <!-- properties file generated by PDETestPortLocator class in com.symbian.pde.test.utils -->
<java classname="com.symbian.pde.test.utils.PDETestPortLocator" fork="yes" classpathref="pde.test.port.locator.class.path"/>
<waitfor maxwait="10" maxwaitunit="second" checkevery="100" checkeveryunit="millisecond">
<available file="pde_test_port.properties"/>
</waitfor>
<property file="pde_test_port.properties"/>
<echo message="Using port ${pde.test.port} for listening to PDE Test run"/>
<parallel>
<daemons>
<antcall target="run_pde_test_listener"/>
</daemons>
<sequential>
<sleep seconds="5"/> <!-- Give the listener a few seconds to start up -->
<antcall target="run_pde_tests"/>
</sequential>
</parallel>
<delete>
<fileset dir="${test.eclipse.dir}/plugins" includes="com.symbian.smt.gui*.jar"/>
<fileset dir="${test.eclipse.dir}/plugins" includes="com.symbian.pde.test.utils*.jar"/>
</delete>
<mkdir dir="${test.reports.dir}"/>
<move todir="${test.reports.dir}">
<fileset dir=".">
<include name="**/TEST-*.xml"/>
</fileset>
</move>
</target>
<target name="run_pde_test_listener">
<java classname="com.symbian.pde.test.utils.PDETestResultsCollector" fork="yes" classpathref="pde.test.listener.class.path">
<arg line="${plugin.name} ${pde.test.port}"/>
</java>
</target>
<target name="run_pde_tests">
<property name="test.classes.list" value="com.symbian.smt.gui.smtwidgets.ModelControlWidgetTest"/>
<property name="test.classes.list" value="com.symbian.smt.gui.wizard.NewSMTProjectWizardTest"/>
<property name="test.classes.list" value="com.symbian.smt.gui.wizard.NewProjectWizardTabbedPropertiesTest"/>
<property name="test.classes.list" value="com.symbian.smt.gui.smtwidgets.resources.ResourceFileSelectionValidatorTest"/>
<mkdir dir="${test.reports.dir}/output/ws"/>
<java dir="${plugin.dir}" classname="org.eclipse.equinox.launcher.Main" fork="yes" classpathref="equinox.launcher.class.path">
<arg line="-application org.eclipse.pde.junit.runtime.uitestapplication -data ${test.reports.dir}/output/ws -dev bin -clean -port ${pde.test.port} -testpluginname com.symbian.smt.gui -classnames ${test.classes.list}"/>
</java>
</target>
<target name="generate_report">
<junitreport todir="${test.reports.dir}">
<fileset dir="${test.reports.dir}">
<include name="TEST-*.xml" />
</fileset>
<report todir="${test.reports.dir}" />
</junitreport>
</target>
<target name="check_results">
<loadfile srcfile="${test.reports.dir}/overview-summary.html" property="full.results.summary"/> <!-- works if you load 2 times ?? -->
<loadfile srcfile="${test.reports.dir}/overview-summary.html" property="results.summary">
<filterchain>
<headfilter lines="30" />
<linecontains>
<contains value="%</td>" />
</linecontains>
</filterchain>
</loadfile>
<condition property="tests.passed">
<contains string="${results.summary}" substring="100.00%" />
</condition>
<fail message="FAILED - some tests failed - see ${test.reports.dir}/index.html for more details" unless="tests.passed" />
<echo message="SUCCESS - all tests passed - see ${test.reports.dir}/index.html for more details" />
</target>
<target name="clean">
<delete file="pde_test_port.properties"/>
<delete dir="${plugin.dir}/bin"/>
<delete dir="${plugin.target.dir}"/>
</target>
<target name="help">
<echo>
This is the ant build file for the com.symbian.smt.gui.test PDE Tests.
Usage:
Target Description
============== ==============================================
[default] Displays this message.
build Builds the source and creates the plugin jar.
clean Cleans all the build and generated artefacts.
test Builds and runs the PDE JUnit tests and generates a report.
</echo>
</target>
</project>