buildframework/helium/tools/quality/conflict-checker.ant.xml
author Bob Rosenberg <bob.rosenberg@nokia.com>
Mon, 13 Sep 2010 13:52:18 +0100
changeset 656 88e01c8f013e
parent 628 7c4a911dc066
child 645 b8d81fa19e7d
permissions -rw-r--r--
Fix merging bug where downstream items somtimes got ignored if they appear after an upstream-only item. Also, reduce the severity of the validation error if a tech-domain is not recognised on a non-Foundation package.

<?xml version="1.0" encoding="UTF-8"?>
<!-- 
============================================================================ 
Name        : conflict-checker.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:

============================================================================
-->
<!--* @package quality -->
<project name="quality.conflict-checker" xmlns:hlm="http://www.nokia.com/helium">
    <description>
        Analyse the content created from two different components.
    </description>

    <!-- Default name of the build duplicates log file.
    @type string
    @scope private
    -->
    <property name="build.duplicates.log" location="${temp.build.dir}/${build.id}_build_duplicates.xml" />
    
    <!-- Check, is it required to run build duplicates -->
    <condition property="run.build.duplicates">
        <not>
            <or>
                <equals arg1="${build.system}" arg2="sbs" />
                <equals arg1="${build.system}" arg2="sbs-ec" />
            </or>
        </not>
    </condition>

    <!--
        This macro extract the list of files generated/exported several time from different component 
        during the build . It uses the output of "abld -what" commands to extract the information.
        The output is an XML file that can be transform to anything using XSLT of FMPP.
        e.g:
        <pre>
        <hlm:checkBuildDuplicatesMacro output="${build.duplicates.log}">
               <fileset dir="${build.log.dir}">
                <include name="${build.id}.*_compile.log"/>
                <include name="${build.id}.what.cmaker.log"/>
                <exclude name="${build.id}.*_output_build.log"/>
            </fileset>
        </hlm:checkBuildDuplicatesMacro>
        </pre>
    -->
    <scriptdef name="checkBuildDuplicatesMacro" language="jython" uri="http://www.nokia.com/helium">
        <attribute name="output" />
        <element name="fileset" type="fileset" />
        <![CDATA[
import integration.ant
integration.ant.check_build_duplicates_task(project, self, attributes, elements)
        ]]>
    </scriptdef>
   
    <!-- Parse all the build log and extract files that are generated/exported
        several times.
    -->
    <target name="integration-build-duplicates" if="run.build.duplicates">
        <hlm:checkBuildDuplicatesMacro output="${build.duplicates.log}">
            <fileset dir="${compile.log.dir}">
                <include name="${build.id}.*_compile.log" />
                <include name="${build.id}.what.cmaker.log" />
                <exclude name="${build.id}.*_output_build.log" />
            </fileset>
        </hlm:checkBuildDuplicatesMacro>
    </target>

    <!-- Render the build duplicates xml file into an HTML output. -->
    <target name="render-build-duplicates" depends="integration-build-duplicates" if="run.build.duplicates">
        <fmpp sourceFile="${helium.dir}/tools/common/templates/integration/build-duplicates.html.ftl" outputFile="${build.log.dir}/${build.id}_build-duplicates.html">
            <freemarkerLinks expandProperties="yes">
                            macro: ${helium.dir}/tools/common/templates/macro
                        </freemarkerLinks>
            <data expandProperties="yes">
                            doc: xml(${build.duplicates.log})
                            ant: antProperties()
                        </data>
        </fmpp>
    </target>

</project>