buildframework/helium/tools/compile/sis.ant.xml
author Iain Williamson <iain.williamson@nokia.com>
Thu, 04 Feb 2010 14:28:13 +0000
branchfix
changeset 187 903b0cf4d64d
parent 1 be27ed110b50
child 179 d8ac696cc51f
permissions -rw-r--r--
Bug 1569 - Making test case skip on Linux while TC doesn't support Linux

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : sis.ant.xml 
Part of     : Helium 

Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved.
This component and the accompanying materials are made available
under the terms of the License "Eclipse Public License v1.0"
which accompanies this distribution, and is available
at the URL "http://www.eclipse.org/legal/epl-v10.html".

Initial Contributors:
Nokia Corporation - initial contribution.

Contributors:

Description:

============================================================================
-->
<project name="compile.sis" xmlns:hlm="http://www.nokia.com/helium">
    <description>Create SIS files.</description>
    
    <!-- Preprocesses the SIS configuration file to insert Ant properties. -->
    <target name="preprocess-sis-config" if="sis.config.file">
        <property name="sis.config.file.parsed" location="${build.output.dir}/sis.cfg.xml.parsed" />
        <copy file="${sis.config.file}" tofile="${sis.config.file.parsed}" overwrite="true">
            <filterchain>
                <expandproperties/>
            </filterchain>
        </copy>
    </target>
    
    
    <!-- Create SIS files. -->
    <target name="sisfiles" depends="preprocess-sis-config" if="sis.config.file">
        <hlm:tempRecordStartMacro name="${build.id}_sisfiles.log"/>        
        <mkdir dir="${build.sisfiles.dir}" />
        <hlm:python>
import configuration
import sis
import os

builder = configuration.NestedConfigurationBuilder(open(r'${sis.config.file.parsed}', 'r'))
configSet = builder.getConfiguration()
configs = configSet.getConfigurations()

prebuilder = sis.SisPreBuilder(configSet)
prebuilder.write(os.path.join(r'${temp.build.dir}', 'sis_build.ant.xml'))
        </hlm:python>
        <ant antfile="${temp.build.dir}/sis_build.ant.xml"/>
        <hlm:tempRecordStopMacro name="${build.id}_sisfiles.log" filterref="filterset.sisfiles"/>
        <hlm:metadatarecord xmlns:hlm="http://www.nokia.com/helium" database="${metadata.dbfile}">
            <hlm:textmetadatainput>
                <fileset casesensitive="false" file="${build.cache.log.dir}/${build.id}_sisfiles.log"/>
                <metadatafilterset refid="filterset.sisfiles"/>
            </hlm:textmetadatainput> 
        </hlm:metadatarecord>
    </target>

</project>