common/build.xml
changeset 604 aa36fa431e3d
parent 603 948baffead3b
child 608 7e37b08f44ce
equal deleted inserted replaced
603:948baffead3b 604:aa36fa431e3d
    87 Insufficient space to run this build to completion. (Was looking for ${sf.drive.space.needed}.) To suppress this check, set the property sf.suppress.drive.space.check to any value.
    87 Insufficient space to run this build to completion. (Was looking for ${sf.drive.space.needed}.) To suppress this check, set the property sf.suppress.drive.space.check to any value.
    88         </fail>
    88         </fail>
    89 
    89 
    90         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
    90         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
    91 
    91 
    92         <if>          
    92         <runtarget target="sf-check-env"/>
    93             <not><isset property="sf.suppress.buildenv.check"/></not>
       
    94             <then>
       
    95                 <echo message="Checking build Environment. To suppress this check set property sf.suppress.buildenv.check to any value"/>
       
    96                 <runtarget target="sf-check-env"/>
       
    97             </then>
       
    98         </if>
       
    99     </target>
    93     </target>
   100         
    94         
   101     <target name="sf-check-env">
    95     <target name="sf-check-env">
   102         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
    96         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
   103         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
    97         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
   108                 <property name="sf.buildenv.location" value="${sf.common.config.dir}/tools"/>
   102                 <property name="sf.buildenv.location" value="${sf.common.config.dir}/tools"/>
   109             </else>
   103             </else>
   110         </if>
   104         </if>
   111         
   105         
   112         <echo message="Build Env against ${sf.buildenv.location}/BuildEnv.xml"/>
   106         <echo message="Build Env against ${sf.buildenv.location}/BuildEnv.xml"/>
   113         <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
   107         <exec executable="perl" dir="${sf.common.config.dir}/tools" resultproperty="sf.checkenv.exit">
   114             <arg value="CheckBuildEnv.pl"/>
   108             <arg value="CheckBuildEnv.pl"/>
   115             <arg value="--xml=${sf.buildenv.location}/BuildEnv.xml"/>
   109             <arg value="--xml=${sf.buildenv.location}/BuildEnv.xml"/>
   116             <arg value="--dbg=${build.log.dir}/BuildEnvironmentCheck.log"/>
   110             <arg value="--dbg=${build.log.dir}/BuildEnvironmentCheck.log"/>
   117             <arg value="--sbs='${sf.spec.sbs.config}'"/>
   111             <arg value="--sbs='${sf.spec.sbs.config}'"/>
   118             <arg value="--tools='${sf.spec.sbs.tools.config}'"/>
   112             <arg value="--tools='${sf.spec.sbs.tools.config}'"/>
   119             <arg value="Common"/>
   113             <arg value="Common"/>
   120         </exec>
   114         </exec>
       
   115         <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/BuildEnvironmentCheck_BRAG.xml" logError="true">
       
   116             <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/>
       
   117             <arg value="--phase=Prebuild"/>
       
   118             <arg value="--step=Build Environment Check"/>
       
   119             <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.BuildEnvironmentCheck.tsv"/>
       
   120             <arg value="${build.log.dir}/BuildEnvironmentCheck.log"/>
       
   121         </exec>
       
   122         <fail>
       
   123             <condition>
       
   124                 <not>
       
   125                     <or>
       
   126                         <equals arg1="sf.checkenv.exit" arg2="0"/>
       
   127                         <isset property="sf.suppress.buildenv.check"/>
       
   128                     </or>
       
   129                 </not>
       
   130             </condition>
       
   131 Build Environment Check failed. To stop this failure aborting the build set property sf.suppress.buildenv.check to any value.
       
   132         </fail>
   121     </target>
   133     </target>
   122     
   134     
   123     <target name="sf-summary" depends="">
   135     <target name="sf-summary" depends="">
   124         <echo>[SF-SUMMARY]</echo>
   136         <echo>[SF-SUMMARY]</echo>
   125         <echo message="Generating build summary"/>
   137         <echo message="Generating build summary"/>