imakerplugin/build.xml
changeset 0 61163b28edca
equal deleted inserted replaced
-1:000000000000 0:61163b28edca
       
     1 <?xml version="1.0" encoding="UTF-8"?>
       
     2 <project name="com.nokia.s60tools.imaker.tests.feature" default="all" basedir=".">
       
     3 	<property file="common.properties" />
       
     4 	<property name="plugin.name"  value="com.nokia.s60tools.imaker.tests"/>
       
     5 	<property name="application"  value="org.eclipse.pde.junit.runtime.uitestapplication"/>
       
     6 	<property name="product"      value="com.nokia.carbide.cpp.product"/>
       
     7 	<property name="class.name"   value="com.nokia.s60tools.imaker.internal.tests.AllTests"/>
       
     8 	<property name="plugin.dir"   value="${eclipse.home}/plugins"/>
       
     9 	<property name="output.dir"   value="${basedir}/output"/>
       
    10 	<property name="output.ws"    value="c:/temp/ws"/>
       
    11 		
       
    12 	<property name="os"                 value="win32"/>
       
    13 	<property name="ws"                 value="win32"/>
       
    14 	<property name="arch"               value="x86"/>
       
    15 	<property name="version"            value="3"/>
       
    16 	<property name="testLoaderClass"    value="org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader"/>
       
    17 	<property name="loaderpluginname"   value="org.eclipse.jdt.junit.runtime"/>
       
    18 
       
    19 	<path id="build.class.path">
       
    20         <fileset dir="${eclipse.home}/plugins">
       
    21             <include name="org.eclipse.core.runtime_*.jar"/>
       
    22             <include name="org.eclipse.equinox.common_*.jar"/>
       
    23             <include name="org.eclipse.ui.workbench_*.jar"/>
       
    24             <include name="org.eclipse.jface_*.jar"/>
       
    25             <include name="org.eclipse.swt_*.jar"/>
       
    26             <include name="org.eclipse.swt.win32.win32.x86_*.jar"/>
       
    27             <include name="org.junit_3.*/**/junit.jar"/>
       
    28         </fileset>
       
    29     </path>
       
    30 	
       
    31 	<path id="pde.test.port.locator.class.path">
       
    32         <pathelement location="${eclipse.home}/plugins/pde.test.utils_3.3.0.jar"/>
       
    33         <fileset dir="${eclipse.home}/plugins">
       
    34             <include name="org.junit_3.*/**/junit.jar"/>
       
    35         </fileset>
       
    36     </path>
       
    37 
       
    38     <path id="pde.test.listener.class.path">
       
    39         <path refid="build.class.path"/>
       
    40         <pathelement location="${eclipse.home}/plugins/pde.test.utils_3.3.0.jar"/>
       
    41         <fileset dir="${eclipse.home}/plugins">
       
    42             <include name="org.apache.ant_*/**/ant.jar"/>
       
    43             <include name="org.apache.ant_*/**/ant-junit.jar"/>
       
    44             <include name="org.eclipse.jdt.junit_*.jar"/>
       
    45             <include name="org.eclipse.debug.core_*.jar"/>
       
    46             <include name="org.eclipse.osgi_*.jar"/>
       
    47             <include name="org.eclipse.core.resources_*.jar"/>
       
    48             <include name="org.eclipse.swt_*.jar"/>
       
    49             <include name="org.eclipse.equinox.preferences_*.jar"/>
       
    50         </fileset>
       
    51     </path>
       
    52 
       
    53     <path id="equinox.launcher.class.path">
       
    54         <fileset dir="${plugin.dir}">
       
    55             <include name="org.eclipse.equinox.launcher_*.jar"/>
       
    56         </fileset>
       
    57     </path>
       
    58 	
       
    59 	<target name="init">
       
    60 		<property name="feature.temp.folder" value="${basedir}/feature.temp.folder"/>
       
    61 		<delete dir="${plugin.lib}"/>
       
    62 		<delete dir="${plugin.dist.dir}"/>
       
    63 		<mkdir dir="${plugin.lib}"/>
       
    64 		<mkdir dir="${plugin.dist.dir}"/>
       
    65 	</target>
       
    66 
       
    67 	<target name="all.plugins" depends="init">
       
    68 		<ant antfile="build.xml" dir="com.nokia.s60tools.imaker" target="${target}">
       
    69 			<property name="arch" value="x86"/>
       
    70 			<property name="ws" value="win32"/>
       
    71 			<property name="os" value="win32"/>
       
    72 		</ant>
       
    73 		<ant antfile="build.xml" dir="com.nokia.s60tools.imaker.doc.user" target="${target}">
       
    74 			<property name="arch" value="x86"/>
       
    75 			<property name="ws" value="win32"/>
       
    76 			<property name="os" value="win32"/>
       
    77 		</ant>
       
    78 		<ant antfile="build.xml" dir="com.nokia.s60tools.imaker.tests" target="${target}">
       
    79 			<property name="arch" value="x86"/>
       
    80 			<property name="ws" value="win32"/>
       
    81 			<property name="os" value="win32"/>
       
    82 		</ant>
       
    83 	</target>
       
    84 
       
    85 	<target name="all.features">
       
    86 		<ant antfile="build.xml" dir="com.nokia.carbide.extensions.imaker" target="${target}">
       
    87 			<property name="arch" value="x86"/>
       
    88 			<property name="ws" value="win32"/>
       
    89 			<property name="os" value="win32"/>
       
    90 		</ant>
       
    91 	</target>
       
    92 
       
    93 	<target name="build.jars" depends="init" description="Build all the jars for the feature: com.nokia.s60tools.imaker.tests.feature.">
       
    94 		<antcall target="all.children">
       
    95 			<param name="target" value="build.jars"/>
       
    96 		</antcall>
       
    97 	</target>
       
    98 
       
    99 	<target name="build.update.jar" depends="clean, init" description="Build the feature jar of:  for an update site.">
       
   100 		<antcall target="all.plugins">
       
   101 			<param name="target" value="build.update.jar"/>
       
   102 		</antcall>
       
   103 	</target>
       
   104 
       
   105 	<target name="zip.distribution" depends="init" description="Create a zip containing all the plug-ins and features for the feature: com.nokia.s60tools.imaker.tests.feature.">
       
   106 		<antcall target="all.features">
       
   107 			<param name="target" value="zip.distribution"/>
       
   108 		</antcall>
       
   109 	</target>
       
   110 
       
   111 	<target name="clean" depends="init" description="Clean the feature: com.nokia.s60tools.imaker.tests.feature of all the zips, jars and logs created.">
       
   112 		<antcall target="all.plugins">
       
   113 			<param name="target" value="clean"/>
       
   114 		</antcall>
       
   115         <delete>
       
   116 		<!--
       
   117             <fileset dir="${eclipse.home}/configuration" includes="**/*" excludes="config.ini"/>
       
   118 		-->
       
   119             <fileset dir="${eclipse.home}/plugins" includes="com.nokia.s60tools.imaker*.jar"/>
       
   120         </delete>
       
   121 	</target>
       
   122 
       
   123     <target name="run_pde_port_creator">
       
   124         <delete file="pde_test_port.properties"/>
       
   125         <java classname="pde.test.utils.PDETestPortLocator" fork="yes" classpathref="pde.test.port.locator.class.path"/>
       
   126         <waitfor maxwait="10" maxwaitunit="second" checkevery="100" checkeveryunit="millisecond">
       
   127             <available file="pde_test_port.properties"/>
       
   128         </waitfor>
       
   129     </target>
       
   130 
       
   131     <target name="run_pde_test_listener">
       
   132         <java classname="pde.test.utils.PDETestResultsCollector" fork="yes" classpathref="pde.test.listener.class.path">
       
   133             <arg line="${plugin.name} ${pde.test.port}"/>
       
   134         </java>
       
   135     </target>
       
   136 
       
   137     <target name="run_pde_tests">
       
   138         <property name="test.classes.list" value="${class.name}"/>
       
   139 		<delete dir="${output.dir}" quiet="true"/>
       
   140 		<delete dir="${output.ws}"  quiet="true"/>
       
   141         <mkdir dir="${output.dir}"/>
       
   142         <mkdir dir="${output.ws}"/>
       
   143         <java dir="${output.ws}" classname="org.eclipse.equinox.launcher.Main" fork="yes" classpathref="equinox.launcher.class.path">
       
   144             <arg line="-application ${application} -data ${output.ws} -dev bin -clean -port ${pde.test.port} -testpluginname ${plugin.name} -classnames ${class.name} -os ${os} -ws ${ws} -arch ${arch} -version ${version} -testLoaderClass ${testLoaderClass} -loaderpluginname ${loaderpluginname} -product ${product}"/>
       
   145         </java>
       
   146     </target>
       
   147 	
       
   148 	<target name="test" depends="run_pde_port_creator">
       
   149         <property file="pde_test_port.properties"/>
       
   150         <echo message="Using port ${pde.test.port} for listening to PDE Test run"/>	
       
   151 
       
   152 		<parallel>
       
   153             <daemons>
       
   154                 <antcall target="run_pde_test_listener"/>
       
   155             </daemons>
       
   156             <sequential>
       
   157                 <sleep seconds="5"/> <!-- Give the listener a few seconds to start up -->
       
   158                 <antcall target="run_pde_tests"/>
       
   159             </sequential>
       
   160         </parallel>
       
   161 		<copy file="${basedir}/TEST-com.nokia.s60tools.imaker.tests.xml" todir="${eclipse.home}/results"/>
       
   162 	</target>
       
   163 
       
   164 	<target name="all" depends="clean, build.update.jar, zip.distribution, install.jars, test">
       
   165 	</target>
       
   166 	
       
   167 	<target name="install.jars">
       
   168 		<copy todir="${eclipse.home}" overwrite="true">
       
   169 			<fileset dir="${plugin.dist.dir}">
       
   170 				<include name="com.nokia.carbide.extensions.imaker_${plugin.version}.zip"/>
       
   171 			</fileset>	
       
   172 		</copy>
       
   173 		<copy todir="${eclipse.home}/plugins" overwrite="true">
       
   174 			<fileset dir="${plugin.lib}">
       
   175 				<include name="com.nokia.s60tools.imaker.tests*.jar"/>
       
   176 			</fileset>	
       
   177 		</copy>
       
   178 		<unzip src="${eclipse.home}/com.nokia.carbide.extensions.imaker_${plugin.version}.zip"
       
   179 		   dest="${eclipse.home}" overwrite="true">
       
   180 		</unzip>
       
   181 	</target>
       
   182 	
       
   183 </project>