buildframework/helium/tools/compile/coverity.ant.xml
author Zheng Shen <zheng.shen@nokia.com>
Wed, 13 Oct 2010 16:27:55 +0800
changeset 647 53d1ab72f5bc
parent 628 7c4a911dc066
child 645 b8d81fa19e7d
permissions -rw-r--r--
ROM Tools 13.1.0.4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     2
<!-- 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     3
============================================================================ 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     4
Name        : coverity.ant.xml 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     5
Part of     : Helium 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     6
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     8
All rights reserved.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    13
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    14
Initial Contributors:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    16
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    17
Contributors:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    18
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    19
Description:
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    20
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    21
============================================================================
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    22
-->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    23
<project name="compile.coverity" xmlns:hlm="http://www.nokia.com/helium">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    24
    <description>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    25
        code-coverity measure.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    26
    </description>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    27
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    28
    <!-- Coverity property declaration and types defination-->
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    29
    <!--* @property coverity.enabled
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    30
    Value must be set to execute coverity targets.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    31
    @type boolean
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    32
    @editable required
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    33
    @scope public
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    34
    @since 11.0
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    35
    -->
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    36
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    37
    <!--* @property internal.coverity.enabled
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    38
    To run coverity related targets if coverity.enabled set to true.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    39
    @type boolean
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    40
    @scope private
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents: 217
diff changeset
    41
    -->
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    42
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    43
    <!--* @property enabled.coverity 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    44
    Value must be set to execute coverity targets. - deprecated: Start using coverity.enabled property.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    45
    @type boolean
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    46
    @editable required
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    47
    @scope public
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    48
    @deprecated since 11.0
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    49
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    50
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    51
    <!--* @property coverity.commit.defects.enabled
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    52
    Set to true to commit the defects into coverity database.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    53
    @type boolean
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    54
    @editable required
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    55
    @scope public
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    56
    @since 11.0
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    57
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    58
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    59
    <!--* @property internal.coverity.commit.defects.enabled
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    60
    Run the targets to commit the defects into database if coverity.commit.defects.enabled set to true.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    61
    @type boolean
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    62
    @scope private
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    63
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    64
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    65
    <!--* @property coverity.defect.manager.server
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    66
    Coverity defect manager server name or ip address.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    67
    @type string
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    68
    @editable required
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    69
    @scope public
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    70
    @since 11.0 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    71
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    72
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    73
    <!--* @property coverity.defect.manager.port
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    74
    Coverity defect manager server HTTP port or listener port number.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    75
    @type string
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    76
    @editable required
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    77
    @scope public
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    78
    @since 11.0
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    79
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    80
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    81
    <!--* @property coverity.defect.manager.product
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    82
    Coverity defect manager product name to submit the coverity errors.
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    83
    @type string
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    84
    @editable required
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    85
    @scope public
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    86
    @since 11.0
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    87
    -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
    88
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    89
    <!-- coverity output directory location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    90
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    91
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    92
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    93
    <property name="coverity.output.dir" location="${build.output.dir}/coverity"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    94
    <!-- coverity log directory location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    95
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    96
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    97
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    98
    <property name="coverity.log.dir" location="${build.log.dir}/coverity"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
    99
    <!-- coverity link directory location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   100
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   101
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   102
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   103
    <property name="coverity.link.dir" value="${coverity.output.dir}/coveritylink"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   104
    <!-- coverity config directory location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   105
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   106
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   107
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   108
    <property name="coverity.config.dir" value="${coverity.output.dir}/config"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   109
    <!-- coverity analyze directory location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   110
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   111
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   112
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   113
    <property name="coverity.analyze.dir" value="${coverity.link.dir}/analyze"/>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   114
    <!-- coverity intermediate directory location
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   115
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   116
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   117
    -->
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   118
    <property name="coverity.inter.dir" value="${coverity.output.dir}/intermediate"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   119
    <!-- coverity report directory location
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   120
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   121
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   122
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   123
    <property name="coverity.report.dir" value="${coverity.output.dir}/coverity_report_${build.id}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   124
    <!-- coverity report file name
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   125
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   126
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   127
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   128
    <property name="coverity.report.file" value="${build.id}_coverity_build_report.html"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   129
    <!-- coverity summary XML file name
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   130
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   131
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   132
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   133
    <property name="coverity.summary.xml.file" value="${temp.build.dir}/${build.id}_coverity_build_summary.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   134
    <!-- coverity checkers XML file name
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   135
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   136
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   137
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   138
    <property name="coverity.checkers.xml.file" value="${temp.build.dir}/${build.id}_coverity_build_checkers.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   139
    <!-- diamonds coverity report file name
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   140
    @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   141
    @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   142
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   143
    <property name="diamonds.coverity.report.file" value="${temp.build.dir}/${build.id}_coverity_build_report.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   144
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   145
    <!-- set property if coverity is enabled -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   146
    <condition property="internal.coverity.enabled">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   147
        <or>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   148
            <istrue value="${coverity.enabled}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   149
            <istrue value="${enabled.coverity}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   150
        </or>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   151
    </condition>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   152
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   153
    <!-- set property if coverity.commit.defects.enabled is enabled -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   154
    <condition property="internal.coverity.commit.defects.enabled">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   155
        <istrue value="${coverity.commit.defects.enabled}" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   156
    </condition>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   157
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   158
    <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   159
        <isset property="env.NUMBER_OF_PROCESSORS"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   160
        <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   161
            <math result="coverity.no.thread" operand1="${env.NUMBER_OF_PROCESSORS}" operation="*" operand2="2" datatype="int"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   162
        </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   163
        <else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   164
            <!-- Number of parallel coverity emit threads can run.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   165
            @type string
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   166
            @scope private
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   167
            -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   168
            <property name="coverity.no.thread" value="2"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   169
        </else>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   170
    </if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   171
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   172
    <!-- cov-build command options -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   173
    <hlm:coverityoptions id="coverity.build.options">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   174
        <arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   175
        <arg name="--dir" value="${coverity.inter.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   176
        <arg name="--auto-diff" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   177
        <arg name="--preprocess-first" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   178
        <arg name="--record-only" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   179
    </hlm:coverityoptions>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   180
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   181
    <!-- cov-build emit command options -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   182
    <hlm:coverityoptions id="coverity.emit.options">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   183
        <arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   184
        <arg name="--dir" value="${coverity.inter.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   185
        <arg name="--replay" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   186
        <arg name="--replay-processes" value="${coverity.no.thread}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   187
    </hlm:coverityoptions>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   188
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   189
    <!-- cov-config command options -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   190
    <hlm:coverityoptions id="coverity.config.options">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   191
        <hlm:arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   192
        <hlm:arg name="--template" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   193
        <hlm:arg name="--comptype" value="armcc"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   194
        <hlm:arg name="--compiler" value="armcc.exe"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   195
    </hlm:coverityoptions>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   196
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   197
    <!-- cov-analyze command options -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   198
    <hlm:coverityoptions id="coverity.analyze.options">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   199
        <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   200
        <hlm:arg name="--all" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   201
        <hlm:arg name="--symbian" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   202
        <hlm:arg name="--append" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   203
        <hlm:arg name="--enable-callgraph-metrics" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   204
    </hlm:coverityoptions>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   205
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   206
    <!-- To run post coverity steps -->
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   207
    <target name="post-coverity" if="internal.coverity.enabled">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   208
        <mkdir dir="${post.log.dir}"/>
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   209
        <!-- To emit the file into defect database -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   210
        <antcall target="run-coverity-emit"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   211
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   212
        <!-- To analyze the sources file -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   213
        <antcall target="run-coverity-analyze"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   214
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   215
        <!-- To generate the HTML error pages -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   216
        <antcall target="gen-coverity-report"/>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   217
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   218
        <!-- To commit the defects into coverity defect manager. -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   219
        <antcall target="run-commit-defects"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   220
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   221
        <hlm:metadatarecord database="${metadata.dbfile}">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   222
            <hlm:textmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   223
                <fileset casesensitive="false" file="${post.log.dir}/${build.id}_coverity_command_errors.log" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   224
                <metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   225
                    <metadatafilter priority="error" regex=".*" description="coverity error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   226
                </metadatafilterset>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   227
            </hlm:textmetadatainput>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   228
        </hlm:metadatarecord>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   229
        <hlm:metadataCountSeverity severity="ERROR" log="${post.log.dir}/${build.id}_coverity_command_errors.log" database="${metadata.dbfile}" property="coverity.error.total"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   230
        <echo>Coverity command errors: ${coverity.error.total}</echo>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   231
        <hlm:generateBuildStatus file="${post.log.dir}/${build.id}_coverity_command_errors.log" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   232
        <hlm:signalMacro logfile="${post.log.dir}/${build.id}_coverity_command_errors.log" phase="post" signal.input="coveritySignalInput" />
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   233
    </target>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   234
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   235
    <!-- Run coverity configure if the coverity.enabled is set to true -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   236
    <target name="run-coverity-configure" if="internal.coverity.enabled">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   237
        <hlm:coverity command="cov-configure" dir="${build.drive}/">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   238
            <hlm:coverityoptions refid="coverity.config.options"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   239
        </hlm:coverity >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   240
    </target>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   241
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   242
    <!-- Run coverity build with emit options if the coverity.enabled is set to true 
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   243
     re-running the cov-build with replay option will reduce the build time by ~ 20% 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   244
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   245
    <target name="run-coverity-emit" >
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   246
        <hlm:coverity command="cov-build" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" >
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   247
            <hlm:coverityoptions refid="coverity.emit.options"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   248
        </hlm:coverity >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   249
    </target>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   250
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   251
    <!-- Run coverity-analyze if the coverity.enabled is set to true 
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   252
     Sometimes the same file is compiled several times with different command-line options. 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   253
     Due to the inherent difficulty of tracking linkage information, the cov-analyze command cannot automatically determine which files are linked together. 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   254
     To avoid errors in function call resolution (especially in C code, which doesn't have any name mangling), use the cov-link command to get this information. 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   255
     
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   256
     and also
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   257
     
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   258
     working with link files is faster than collecting data from the intermediate directory multiple times
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   259
     
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   260
     So run the cov-link commands and analyze the database using cov-analyze command.
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   261
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   262
    -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   263
    <target name="run-coverity-analyze" >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   264
        <mkdir dir="${coverity.link.dir}"/>
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   265
        <hlm:coverity command="cov-link" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   266
            <hlm:arg name="--dir" value="${coverity.inter.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   267
            <hlm:arg name="--collect" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   268
            <hlm:arg name="-of" value="${coverity.link.dir}/all.link"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   269
        </hlm:coverity >
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   270
        <hlm:coverity command="cov-link" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   271
            <hlm:arg name="--dir" value="${coverity.inter.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   272
            <hlm:arg name="--compile-arg" value="armv5"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   273
            <hlm:arg name="-of" value="${coverity.link.dir}/armv5.link"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   274
            <hlm:arg name="${coverity.link.dir}/all.link" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   275
        </hlm:coverity >
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   276
        <hlm:coverity command="cov-link" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   277
            <hlm:arg name="--dir" value="${coverity.inter.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   278
            <hlm:arg name="--output-dir" value="${coverity.analyze.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   279
            <hlm:arg name="${coverity.link.dir}/armv5.link" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   280
        </hlm:coverity >
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   281
        <hlm:coverity command="cov-analyze" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   282
            <hlm:coverityoptions refid="coverity.analyze.options"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   283
        </hlm:coverity >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   284
    </target>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   285
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   286
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   287
    <!-- Generate coverity report -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   288
    <target name="gen-coverity-report">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   289
        <!-- Read the summary file generated by cov-analyze and generate html file -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   290
        <fmpp sourceFile="${helium.dir}/tools/common/templates/coverity/coverity.summary.html.ftl"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   291
              outputFile="${temp.build.dir}/${build.id}_coverity_build_summary.html">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   292
            <data   expandProperties="yes">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   293
                    ant: antProperties()
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   294
                    covsummary: slicedText (${coverity.analyze.dir}/c/output/summary.txt)
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   295
            </data>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   296
        </fmpp>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   297
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   298
        <!-- To generate summary file for diamonds -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   299
        <fmpp sourceFile="${helium.dir}/tools/common/templates/coverity/coverity.summary.xml.ftl"
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   300
              outputFile="${coverity.summary.xml.file}">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   301
            <data   expandProperties="yes">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   302
                    ant: antProperties()
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   303
                    covsummary: slicedText (${coverity.analyze.dir}/c/output/summary.txt)
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   304
            </data>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   305
        </fmpp>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   306
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   307
        <!-- Run this to get the static html pages -->
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   308
        <hlm:coverity command="cov-format-errors" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   309
            <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   310
            <hlm:arg name="--filesort" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   311
            <hlm:arg name="--functionsort" value=""/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   312
        </hlm:coverity >
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   313
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   314
        <!-- Copy the summary file to resolve the xml load error -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   315
        <copy file="${coverity.analyze.dir}/c/output/errors/summary.xml" tofile="${coverity.checkers.xml.file}" overwrite="true" failonerror="false">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   316
            <filterchain>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   317
                <linecontains negate="true">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   318
                    <contains value="config.dtd"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   319
                </linecontains>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   320
            </filterchain>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   321
        </copy>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   322
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   323
        <!-- Insert summary tags into checkers file -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   324
        <xmltask source="${coverity.checkers.xml.file}"  dest="${diamonds.coverity.report.file}" report="false">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   325
            <insert path="/coverity" file="${coverity.summary.xml.file}"/> 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   326
        </xmltask>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   327
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   328
        <!-- collect all the html files into folder -->        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   329
        <copy todir="${coverity.report.dir}" overwrite="true" failonerror="false">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   330
            <fileset dir="${coverity.analyze.dir}/c/output/errors">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   331
                <exclude name="index.html"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   332
                <exclude name="**/*.xml"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   333
                <exclude name="summary.html"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   334
            </fileset>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   335
        </copy>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   336
        
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   337
        <!-- Concatinate all the html pages to get the final error report page -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   338
        <concat destfile="${coverity.report.dir}/${coverity.report.file}">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   339
            <fileset dir="${temp.build.dir}" includes="${build.id}_coverity_build_summary.html"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   340
            <fileset dir="${coverity.analyze.dir}/c/output/errors" includes="index.html"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   341
        </concat>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   342
    </target>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   343
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   344
    
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   345
    <!-- To get the SBS variable value -->
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   346
    <macrodef name="getSBSVariableValue" uri="http://www.nokia.com/helium">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   347
        <attribute name="variablename"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   348
        <attribute name="outputvar"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   349
        <attribute name="sbsinput"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   350
        <sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   351
            <var name="output.var" unset="true"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   352
            <hlm:getVariableValue name="@{variablename}" property="output.var">
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   353
                <hlm:sbsinput refid="@{sbsinput}" />
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   354
            </hlm:getVariableValue>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   355
            <if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   356
                <and>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   357
                    <isset property="output.var"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   358
                    <matches string="${output.var}" pattern="arm.*"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   359
                </and>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   360
                <then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   361
                    <antcall target="set-arm-version"/>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   362
                </then>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   363
            </if>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   364
            <script language="beanshell"> <![CDATA[
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   365
                curVal=project.getProperty("output.var"); 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   366
                project.setProperty("@{outputvar}",curVal);
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   367
                ]]>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   368
            </script> 
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   369
        </sequential>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   370
    </macrodef>
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   371
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   372
    <!-- To commit the coverity defects into coverity defect manager --> 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   373
    <target name="run-commit-defects" depends="coverity-username,coverity-password" if="internal.coverity.commit.defects.enabled">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   374
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   375
        <!-- Check is the coverity defect manager server and port numbers are set -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   376
        <fail message="FAILED: Coverity defect manager server/IP address is not set. Please set 'coverity.defect.manager.server'. Ex: server.domain.extension or 100.220.530.101" 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   377
            unless="coverity.defect.manager.server"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   378
        <fail message="FAILED: Coverity defect manager HTTP port number is not set. Please set 'coverity.defect.manager.port'." 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   379
            unless="coverity.defect.manager.port"/>        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   380
        <!-- Check is the coverity defect manager server product is set to submit the coverity errors.-->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   381
        <fail message="FAILED: Coverity defect manager product name is not set. Please set 'coverity.defect.manager.product'." 
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   382
            unless="coverity.defect.manager.product"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   383
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   384
        <!-- cov-commit-defects command options -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   385
        <hlm:coverityoptions id="coverity.commit.defects.options">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   386
            <hlm:arg name="--config" value="${coverity.config.dir}/coverity_config.xml"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   387
            <hlm:arg name="--remote" value="${coverity.defect.manager.server}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   388
            <hlm:arg name="--port" value="${coverity.defect.manager.port}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   389
            <hlm:arg name="--user" value="${coverity.username}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   390
            <hlm:arg name="--password" value="${coverity.password}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   391
            <hlm:arg name="--dir" value="${coverity.analyze.dir}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   392
            <hlm:arg name="--product" value="${coverity.defect.manager.product}"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   393
        </hlm:coverityoptions>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   394
        
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   395
        <!-- Run the coverity commit defects command to submit the errors into defect manager -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   396
        <hlm:coverity command="cov-commit-defects" dir="${build.drive}/" error="${post.log.dir}/${build.id}_coverity_command_errors.log" append="true">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   397
            <hlm:coverityoptions refid="coverity.commit.defects.options"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   398
        </hlm:coverity >
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   399
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   400
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   401
    <!-- Retrieve the coverity password from the .netrc file and store it into coverity.password property. -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   402
    <target name="coverity-password" if="internal.coverity.commit.defects.enabled">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   403
        <hlm:netrcPasswordMacro output-prop="coverity.password" result-prop="coverity.password.available" type="coverity"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   404
        <hlm:logreplace regexp="coverity.password"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   405
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   406
    
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   407
    <!-- Retrieve the coverity username from the .netrc file and store it into coverity.username property. -->
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   408
    <target name="coverity-username" if="internal.coverity.commit.defects.enabled">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   409
        <hlm:netrcUsernameMacro output-prop="coverity.username" result-prop="coverity.username.available" type="coverity"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   410
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 587
diff changeset
   411
    
217
0f5e3a7fb6af helium_8.0-r15308
wbernard
parents:
diff changeset
   412
</project>