|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <!-- |
|
3 ============================================================================ |
|
4 Name : ebs.ant.xml |
|
5 Part of : Helium |
|
6 |
|
7 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
8 All rights reserved. |
|
9 This component and the accompanying materials are made available |
|
10 under the terms of the License "Eclipse Public License v1.0" |
|
11 which accompanies this distribution, and is available |
|
12 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
13 |
|
14 Initial Contributors: |
|
15 Nokia Corporation - initial contribution. |
|
16 |
|
17 Contributors: |
|
18 |
|
19 Description: |
|
20 |
|
21 ============================================================================ |
|
22 --> |
|
23 <project name="compile.ebs" xmlns:hlm="http://www.nokia.com/helium"> |
|
24 <description> |
|
25 EBS compilation targets. |
|
26 </description> |
|
27 <!-- Find a free port to use for EBS client server communication. --> |
|
28 <target name="find-freeport" > |
|
29 <hlm:python outputproperty="ebs.port.number"> |
|
30 import ant |
|
31 import socket |
|
32 mySocket = socket.socket ( socket.AF_INET, socket.SOCK_STREAM ) |
|
33 mySocket.bind ( ( '127.0.0.1', 0 ) ) |
|
34 host, port = mySocket.getsockname() |
|
35 print port |
|
36 mySocket.close() |
|
37 </hlm:python> |
|
38 <echo> Using port number ${ebs.port.number}</echo> |
|
39 <hlm:assertPropertySet property="ebs.port.number" message="Property not defined: ebs.port.number" /> |
|
40 </target> |
|
41 |
|
42 |
|
43 <!-- Executes compilation of a System Definition configuration using Symbian EBS tools. --> |
|
44 <target name="compile-ebs" if="build.system.ebs" depends="set-arm-version"> |
|
45 <hlm:assertFileExists file="${genxml.output.file}"/> |
|
46 <hlm:compileEbsMacro input="${genxml.output.file}" log="${build.log.dir}/${build.id}.${sysdef.configuration}_compile.log" /> |
|
47 <!-- calculate below only if metadata is enabled, error is calculated before the signal is being sent.--> |
|
48 <hlm:calculateErrorsFromLog logfile="${build.log.dir}/${build.id}.${sysdef.configuration}_compile.log" /> |
|
49 </target> |
|
50 |
|
51 |
|
52 <!-- Executes compilation of a System Definition configuration using |
|
53 Symbian EBS tools, driven directly from Ant. --> |
|
54 <target name="compile-ebs-ant" if="build.system.ebs-ant" depends="set-arm-version,find-freeport"> |
|
55 <script language="jython" setbeans="false"> |
|
56 threads = project.getProperty("number.of.threads") |
|
57 client_list = ','.join([str(i) for i in range(1, int(threads) + 1)]) |
|
58 project.setProperty("build.clients", client_list) |
|
59 </script> |
|
60 <hlm:assertPropertySet property="build.clients" message="Property not defined: build.clients" /> |
|
61 <parallel> |
|
62 <for list="${build.clients}" param="client" parallel="true"> |
|
63 <sequential> |
|
64 <preset.exec executable="perl" dir="${build.drive}/"> |
|
65 <arg value="epoc32/tools/build/buildclient.pl"/> |
|
66 <arg line="-d localhost:${ebs.port.number} -w 2 -c client_@{client} -e 1 "/> |
|
67 </preset.exec> |
|
68 </sequential> |
|
69 </for> |
|
70 <preset.exec executable="perl" dir="${build.drive}/" failonerror="true"> |
|
71 <arg value="epoc32/tools/build/buildserver.pl"/> |
|
72 <arg line="-d ${genxml.output.file} -p ${ebs.port.number} -l ${build.log.dir}/${build.id}.${sysdef.configuration}_compile.log"/> |
|
73 </preset.exec> |
|
74 </parallel> |
|
75 </target> |
|
76 |
|
77 </project> |