--- a/common/build.postbuild.xml Wed Aug 26 14:40:58 2009 +0100
+++ b/common/build.postbuild.xml Tue Sep 08 13:03:56 2009 +0100
@@ -301,8 +301,8 @@
</fileset>
</path>
<sequential>
- <propertyregex override="yes" property="preprocessedlogfile" input="@{logfile}" regexp=".*[\\/](.*)_compile\.log" replace="\1_compile_preprocessed.log"/>
- <echo message="Preprocessing @{logfile}..."/>
+ <propertyregex override="yes" property="preprocessedlogfile" input="@{logfile}" regexp=".*[\\/](.*)_compile\.log" replace="\1_compile_preprocessed.log"/>
+ <echo message="Preprocessing @{logfile}..."/>
<exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" input="@{logfile}" output="${build.log.dir}/analysis/${preprocessedlogfile}" error="${build.log.dir}/analysis/${build.id}_preprocess.log" append="true">
<arg value="${sf.common.config.dir}/tools/raptor/preprocess_log.pl"/>
</exec>
@@ -318,6 +318,7 @@
</path>
<sequential>
<echo message="Extracting whatlog info from @{whatlogfile}..."/>
+ <echo message="Exec: [${sf.common.config.dir}/tools/raptor] perl ${sf.common.config.dir}/tools/raptor/parse.pl --releaseable --log=@{whatlogfile} --basedir=${build.log.dir} --append"/>
<exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_whatlog.log" append="true">
<arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
<arg value="--releaseable"/>
@@ -337,17 +338,30 @@
</path>
<sequential>
<echo message="Extracting error info from @{raptorlogfile}..."/>
+ <propertyregex override="yes" property="raptorconfig" input="@{raptorlogfile}" regexp=".*[\\/].*__(.*)\.whatlog_(single|multiple)_thread.*" replace="\1" casesensitive="false" defaultValue="noconfig"/>
+ <echo message="Exec: [${sf.common.config.dir}/tools/raptor] perl ${sf.common.config.dir}/tools/raptor/parse.pl --error --warning --unreciped --recipe --config=${raptorconfig} --log=@{raptorlogfile} --basedir=${build.log.dir}/raptorbits --append"/>
<exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
<arg value="${sf.common.config.dir}/tools/raptor/parse.pl"/>
<arg value="--error"/>
<arg value="--warning"/>
+ <arg value="--unreciped"/>
+ <arg value="--recipe"/>
+ <arg value="--config=${raptorconfig}"/>
<arg value="--log=@{raptorlogfile}"/>
<arg value="--basedir=${build.log.dir}/raptorbits"/>
<arg value="--append"/>
</exec>
</sequential>
</for>
- <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
+
+ <echo message="Exec: [${sf.common.config.dir}/tools/raptor] perl ${sf.common.config.dir}/tools/raptor/summarize.pl --raptorbitsdir=${build.log.dir}/raptorbits --outputdir=${build.log.dir}"/>
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/raptor" failonerror="false" output="${build.log.dir}/analysis/${build.id}_raptorparse.log" append="true">
+ <arg value="${sf.common.config.dir}/tools/raptor/summarize.pl"/>
+ <arg value="--raptorbitsdir=${build.log.dir}/raptorbits"/>
+ <arg value="--outputdir=${build.log.dir}"/>
+ </exec>
+
+ <!-- Now iterate through the generated TSVs to sort them and remove duplicates -->
<for param="tsv">
<path>
<fileset dir="${build.log.dir}">
@@ -456,59 +470,11 @@
<fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-run-analysis.xml.ftl" outputFile="${build.drive}/output/logs/sf-run-analysis.xml">
<data expandProperties="yes">
ant: antProperties()
- raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,component,phase,recipe,file,line]})
+ raptor_summary: csv(${build.log.dir}/raptorbits/summary.csv,{separator:',',headers:[category,subcategory,severity,config,component,phase,recipe,file,line]})
files: csv(${build.drive}/output/logs/analysis/tmp_yarp_files.csv,{separator:',',headers:[name,path,localpath]})
</data>
</fmpp>
- </target>
-
- <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
- <delete dir ="${build.drive}/smoketest"/>
- <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
-
- <echo message="INFO Copy smoketest source to EPOCROOT"/>
-
- <copy todir="${build.drive}/smoketest">
- <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
- </copy>
-
- <echo message="INFO Building smoketest"/>
- <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
- <arg value="/c"/>
- <arg value="sbs -b bld.inf -c winscw_udeb.test"/>
- </exec>
-
- <echo message="INFO Creating smoketest testpackage"/>
- <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
- <arg value="smoketest.pl"/>
- </exec>
- <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
-
- <echo message="INFO Updating smoketest package with test info"/>
- <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
- <arg value="ats_specialise_test_drop.pl"/>
- <arg value="--test-drop-name=Smoketest-${build.id}"/>
- <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
- <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
- <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
- <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>
- </exec>
- <!-- Now ready to send to ATS3 -->
- </target>
-
- <target name="sf-send-testpkg" depends="sf-find-ATS-worker-root,sf-make-junction">
- <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
- <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
- <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
- <arg value="ats3_testdrop.pl"/>
- <arg value="--host=${sf.spec.test.host.name}"/>
- <arg value="--username=${sf.spec.test.host.username}"/>
- <arg value="--password=${sf.spec.test.host.password}"/>
- <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
- <arg value="--local-drop-path=${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
- <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
- </exec>
- </target>
+ </target>
<!-- package all logs into zipfile before publish -->
<target name="sf-zip-logs">
@@ -533,104 +499,7 @@
</move>
</then>
</if>
- </target>
-
- <target name="sf-bc-check">
-
- <if><isset property="env.PDT_HOME"/>
- <then>
- <!-- create BC dir -->
- <mkdir dir="${build.log.dir}/BC"/>
-
- <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
- <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
- <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
- <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
- <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
- <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
-
- <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
- </exec>
- <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
- </exec>
- <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
- </exec>
- <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="CURRENT_NAME=${build.id}"/>
- </exec>
- <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="CURRENT_SDK_DIR=${build.drive}"/>
- </exec>
- <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
- </exec>
-
- <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
-
- <if><istrue value="${sf.spec.bccheck.enable.la}"/>
- <then>
- <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
- <arg value="CheckBC.py"/>
- <arg value="${build.log.dir}/BC/bc.config"/>
- <arg value="-la"/>
- <arg value="-f"/>
- <arg value="${sf.spec.bccheck.reportid}"/>
- </exec>
- <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="false" verbose="true"/>
- </then>
- </if>
-
- <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
- <then>
- <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
- <arg value="CheckBC.py"/>
- <arg value="${build.log.dir}/BC/bc.config"/>
- <arg value="-ha"/>
- <arg value="-f"/>
- <arg value="${sf.spec.bccheck.reportid}"/>
- </exec>
- <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="false" verbose="true"/>
- </then>
- </if>
-
- <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
- <then>
- <echo message="INFO Updating bctest package with test info"/>
- <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
- <arg value="ats_specialise_test_drop.pl"/>
- <arg value="--test-drop-name=bctest-${build.id}"/>
- <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
- <arg value="--src=${sf.spec.test.package.location}\..\bctest\bctest.zip"/>
- <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.bccheck.package.name}"/>
- </exec>
- <!-- Now ready to send to ATS3 -->
-
- <antcall target="sf-send-testpkg" inheritAll="false">
- <param name="sf.spec.test.package.name" value="${sf.spec.bccheck.package.name}"/>
- </antcall>
- </then>
- </if>
- </then>
- <else>
- <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
- </else>
- </if>
- </target>
+ </target>
<target name="sf-publish" depends="prep-publish">
<copy todir="${publish.dir}" preservelastmodified="true" failonerror="false">
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/build.test.xml Tue Sep 08 13:03:56 2009 +0100
@@ -0,0 +1,188 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="SF-COMMON-TEST" xmlns:hlm="http://www.nokia.com/helium">
+
+ <target name="sf-find-ATS-worker-root">
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/devices" failonerror="false" outputproperty="sf.spec.test.workerroot">
+ <arg value="-pe"/>
+ <arg value=""m/TEMPDIR=(\S+)/;print $1;s/.*\n//g""/>
+ <arg value="${env.COMPUTERNAME}\EMULATOR_GENERIC_${env.COMPUTERNAME}.properties" />
+ </exec>
+ <echo message="ATS Worker Root = ${sf.spec.test.workerroot}"/>
+ </target>
+
+ <target name ="sf-make-junction" depends="sf-find-ATS-worker-root">
+ <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.epocroot}"/>
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_make_junction.log">
+ <arg value="make_junction.pl"/>
+ <arg value="--link=${sf.spec.test.workerroot}/${sf.spec.test.epocroot}/epoc32"/>
+ <arg value="--target=${build.drive}/epoc32"/>
+ <arg value="--force"/>
+ </exec>
+ </target>
+
+ <target name ="sf-delete-junction" depends="sf-find-ATS-worker-root">
+ <exec executable="junction.exe" dir="${sf.spec.test.workerroot}/${sf.spec.test.epocroot}" failonerror="false" output="${build.log.dir}/ATS_${build.id}_delete_junction.log">
+ <arg value="-d"/>
+ <arg value="epoc32"/>
+ </exec>
+ </target>
+
+<!-- static and dynamic BC Test target -->
+ <target name="sf-bc-check">
+ <if><isset property="env.PDT_HOME"/>
+ <then>
+ <!-- create BC dir -->
+ <mkdir dir="${build.log.dir}/BC"/>
+ <delete file="${build.log.dir}/BC/bc.config" quiet="true"/>
+ <delete file="${build.log.dir}/BC/BBCResults.xsl" quiet="true"/>
+ <delete file="${build.log.dir}/BC/libraries.txt" quiet="true"/>
+ <delete file="${build.log.dir}/BC/libraries_report.xml" quiet="true"/>
+ <delete file="${build.log.dir}/BC/headers.txt" quiet="true"/>
+ <delete file="${build.log.dir}/BC/headers_report.xml" quiet="true"/>
+
+ <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+ <arg value="/c"/>
+ <arg value="echo"/>
+ <arg value="BASELINE_NAME=${sf.spec.bccheck.baseline.name}"/>
+ </exec>
+ <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+ <arg value="/c"/>
+ <arg value="echo"/>
+ <arg value="BASELINE_SDK_DIR=${sf.spec.bccheck.baseline.skd.dir}"/>
+ </exec>
+ <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+ <arg value="/c"/>
+ <arg value="echo"/>
+ <arg value="BASELINE_SDK_S60_VERSION=${sf.spec.bccheck.baseline.s60.version}"/>
+ </exec>
+ <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+ <arg value="/c"/>
+ <arg value="echo"/>
+ <arg value="CURRENT_NAME=${build.id}"/>
+ </exec>
+ <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+ <arg value="/c"/>
+ <arg value="echo"/>
+ <arg value="CURRENT_SDK_DIR=${build.drive}"/>
+ </exec>
+ <exec executable="cmd" output="${build.log.dir}/BC/bc.config" append="true">
+ <arg value="/c"/>
+ <arg value="echo"/>
+ <arg value="CURRENT_SDK_S60_VERSION=${sf.spec.bccheck.current.s60.version}"/>
+ </exec>
+
+ <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/BBCResults.xsl" tofile="${build.log.dir}/BC/BBCResults.xsl" failonerror="false" verbose="true"/>
+
+ <if><istrue value="${sf.spec.bccheck.enable.la}"/>
+ <then>
+ <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/libraries.txt">
+ <arg value="CheckBC.py"/>
+ <arg value="${build.log.dir}/BC/bc.config"/>
+ <arg value="-la"/>
+ <arg value="-f"/>
+ <arg value="${sf.spec.bccheck.reportid}"/>
+ </exec>
+ <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Libraries_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/libraries_report.xml" failonerror="false" verbose="true"/>
+ </then>
+ </if>
+
+ <if><istrue value="${sf.spec.bccheck.enable.ha}"/>
+ <then>
+ <exec executable="python" dir="${sf.spec.pdt.root}/fts/compatibilityanalyser" output="${build.log.dir}/BC/headers.txt">
+ <arg value="CheckBC.py"/>
+ <arg value="${build.log.dir}/BC/bc.config"/>
+ <arg value="-ha"/>
+ <arg value="-f"/>
+ <arg value="${sf.spec.bccheck.reportid}"/>
+ </exec>
+ <copy file="${sf.spec.pdt.root}/fts/compatibilityanalyser/reports/Headers_CompatibilityReport_${sf.spec.bccheck.reportid}.xml" tofile="${build.log.dir}/BC/headers_report.xml" failonerror="false" verbose="true"/>
+ </then>
+ </if>
+
+ <if><istrue value="${sf.spec.bccheck.enable.dynamic}"/>
+ <then>
+ <for param="file">
+ <path>
+ <fileset dir="${sf.spec.test.package.location}/../bctest" includes="*.zip"/>
+ </path>
+ <sequential>
+ <propertyregex override="yes" property="program" input="@{file}" regexp="([^\\/\/]*)$" select="\1"/>
+ <echo message="INFO Updating bctest package with test info"/>
+ <echo message="************ Test drop package name: ${program} " />
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_dynamicbc.log">
+ <arg value="ats_specialise_test_drop.pl"/>
+ <arg value="--test-drop-name=${env.COMPUTERNAME}-bctest-${build.id}_${program}"/>
+ <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
+ <arg value="--src=${sf.spec.test.package.location}/../bctest/${program}"/>
+ <arg value="--dest=${sf.spec.test.package.location}\${env.COMPUTERNAME}-bctest-${build.id}_${program}" />
+ </exec>
+ <!-- Now ready to send to ATS3 -->
+ <echo message="Sending Test drop : ${program} ............" />
+ <antcall target="sf-send-testpkg" inheritAll="false">
+ <param name="sf.spec.test.package.name" value="${env.COMPUTERNAME}-bctest-${build.id}_${program}"/>
+ </antcall>
+
+ </sequential>
+
+ </for>
+ </then>
+ </if>
+ </then>
+ <else>
+ <echo message="WARNING: PDT_HOME not set, I dont know where the BC tools are installed so cannot continue"/>
+ </else>
+ </if>
+ </target>
+
+ <!-- Preparing smoketest package (zip) for sending to ATS3 -->
+
+ <target name="sf-build-smoketestpkg" depends="sf-getenv-tools">
+ <delete dir ="${build.drive}/smoketest"/>
+ <delete file ="${build.log.dir}/ATS_${build.id}_smoketest.log"/>
+
+ <echo message="INFO Copy smoketest source to EPOCROOT"/>
+
+ <copy todir="${build.drive}/smoketest">
+ <fileset dir="${sf.common.config.dir}/tools/ats/smoketest"/>
+ </copy>
+
+ <echo message="INFO Building smoketest"/>
+ <exec executable="cmd" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+ <arg value="/c"/>
+ <arg value="sbs -b bld.inf -c winscw_udeb.test"/>
+ </exec>
+
+ <echo message="INFO Creating smoketest testpackage"/>
+ <exec executable="perl" dir="${build.drive}/smoketest/group" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+ <arg value="smoketest.pl"/>
+ </exec>
+ <copy file="${build.drive}/smoketest/group/smoketest.zip" todir="${sf.spec.test.package.location}"/>
+
+ <echo message="INFO Updating smoketest package with test info"/>
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/" failonerror="false" append="true" output="${build.log.dir}/ATS_${build.id}_smoketest.log">
+ <arg value="ats_specialise_test_drop.pl"/>
+ <arg value="--test-drop-name=Smoketest-${build.id}"/>
+ <arg value="--device-name=GENERIC EMULATOR on ${env.COMPUTERNAME}"/>
+ <arg value="--src=${sf.spec.test.package.location}\smoketest.zip"/>
+ <arg value="--dest=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
+ <arg value="--build-id=http://${sf.spec.publish.diamonds.server}${diamonds.build.id}"/>
+ </exec>
+ <!-- Now ready to send to ATS3 -->
+ </target>
+
+ <!-- Sending testdrop to ATS3 -->
+
+ <target name="sf-send-testpkg" depends="sf-find-ATS-worker-root,sf-make-junction">
+ <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.package.droppath}"/>
+ <echo message="Sending test package ${sf.spec.test.package.name} to ${sf.spec.test.host.name} path ${sf.spec.test.host.droppath}"/>
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_testdrop.log">
+ <arg value="ats3_testdrop.pl"/>
+ <arg value="--host=${sf.spec.test.host.name}"/>
+ <arg value="--username=${sf.spec.test.host.username}"/>
+ <arg value="--password=${sf.spec.test.host.password}"/>
+ <arg value="--local-test-pkg=${sf.spec.test.package.location}\${sf.spec.test.package.name}"/>
+ <arg value="--local-drop-path=${sf.spec.test.workerroot}\${sf.spec.test.package.droppath}"/>
+ <arg value="--host-drop-path=${sf.spec.test.host.droppath}"/>
+ </exec>
+ </target>
+</project>
--- a/common/build.xml Wed Aug 26 14:40:58 2009 +0100
+++ b/common/build.xml Tue Sep 08 13:03:56 2009 +0100
@@ -27,6 +27,8 @@
<property name="build.system" value="${sf.spec.build.system}"/>
<property name="base_release.path" value="${sf.spec.baseline.location}"/>
<property name="base_release.getenv_options" value="${sf.spec.baseline.getenv_options}"/>
+ <property name="ccm.user.password" value="set_to_any_value_to_skip_scm_checks__for_helium_5"/>
+
<if>
<isset property="sf.spec.sbs.numberofjobs"/>
<then>
@@ -45,6 +47,9 @@
<!-- Import functionality distributed into other file(s) -->
<import file="${sf.common.config.dir}/build.postbuild.xml"/>
+
+ <!-- Import test functionality distributed into other file(s) -->
+ <import file="${sf.common.config.dir}/build.test.xml"/>
<!-- setup conditional Helium internal properties -->
<if><istrue value="${sf.spec.sourcesync.usecache}"/>
@@ -55,7 +60,7 @@
<property name="sf.spec.sourcesync.sourcespecdir" value="${sf.project.location}"/>
</else>
</if>
-
+
<!-- conditional import of generated source spec if available -->
<if><available file="${sf.common.config.dir}/generated/source-spec.ant.xml" />
<then>
@@ -80,17 +85,40 @@
</fail>
<tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
- <echo message="Checking build Environment"/>
+
+ <if>
+ <not><isset property="sf.suppress.buildenv.check"/></not>
+ <then>
+ <echo message="Checking build Environment. To suppress this check set property sf.suppress.buildenv.check to any value"/>
+ <runtarget target="sf-check-env"/>
+ </then>
+ </if>
+
+ </target>
+
+ <target name="sf-check-env">
+
+ <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
+ <if><available file="${sf.project.location}/BuildEnv.xml"/>
+ <then>
+ <property name="sf.buildenv.location" value="${sf.project.location}"/>
+ </then>
+ <else>
+ <property name="sf.buildenv.location" value="${sf.common.config.dir}/tools"/>
+ </else>
+ </if>
+
+ <echo message="Build Env against ${sf.buildenv.location}/BuildEnv.xml"/>
<exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
<arg value="CheckBuildEnv.pl"/>
- <arg value="--xml=BuildEnv.xml"/>
+ <arg value="--xml=${sf.buildenv.location}/BuildEnv.xml"/>
<arg value="--dbg=${build.log.dir}/BuildEnvironmentCheck.log"/>
<arg value="--sbs='${sf.spec.sbs.config}'"/>
<arg value="--tools='${sf.spec.sbs.tools.config}'"/>
<arg value="Common"/>
</exec>
</target>
-
+
<target name="sf-build-all" depends="sf-prebuild,sf-build-noprep,sf-postbuild">
<echo>[SF-BUILD-ALL]</echo>
</target>
@@ -168,22 +196,32 @@
<delete file="${build.drive}/output/build/canonical_system_definition_${sysdef.configuration}_temp.xml"/>
</target>
- <target name="sf-prebuild">
+ <target name="sf-prebuild" depends="sf-prep,sf-prebuild-announce,sf-diamonds-tag-build,sf-record-proj-conf-bom,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
+
+ <target name="sf-prebuild-announce">
<echo>[SF-PREBUILD]</echo>
-
- <if>
- <istrue value="${sf.spec.publish.enable}"/>
- <then>
- <runtarget target="diamonds"/>
- <runtarget target="sf-diamonds-tag-build"/>
- </then>
- </if>
-
+ </target>
+
+ <target name="sf-diamonds-tag-build">
+ <if>
+ <istrue value="${sf.spec.publish.enable}"/>
+ <then>
+ <echo>[SF-DIAMONDS-TAG-BUILD]</echo>
+ <runtarget target="diamonds"/>
+ <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-tag-build.xml.ftl" outputFile="${build.drive}/output/logs/sf-tag-build.xml">
+ <data expandProperties="yes">
+ ant: antProperties()
+ </data>
+ </fmpp>
+ </then>
+ </if>
+ </target>
+
+ <target name="sf-record-proj-conf-bom">
<!-- create BOM dir -->
<mkdir dir="${build.drive}/output/logs/BOM"/>
- <!-- record project and config information in BOM files -->
- <delete file="${build.drive}/output/logs/BOM/config.csv" quiet="true"/>
+ <!-- record config and project information in BOM files -->
<exec executable="hg" dir="${sf.config.dir}" outputproperty="sf.job.bom.config.repo">
<arg value="showconfig"/>
<arg value="paths.default"/>
@@ -197,12 +235,8 @@
<arg value="-i"/>
</exec>
<echo message="dir ${sf.config.dir} : revision ${sf.job.bom.config.rev}:${sf.job.bom.config.checksum}"/>
- <exec executable="cmd" output="${build.drive}/output/logs/BOM/config.csv" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="${sf.job.bom.config.repo},sf-config,${sf.job.bom.config.rev}:${sf.job.bom.config.checksum}"/>
- </exec>
- <delete file="${build.drive}/output/logs/BOM/project.csv" quiet="true"/>
+ <echo message="${sf.job.bom.config.repo},sf-config,${sf.job.bom.config.rev}:${sf.job.bom.config.checksum}" file="${build.drive}/output/logs/BOM/config.csv"/>
+
<exec executable="hg" dir="${sf.project.location}" outputproperty="sf.job.bom.project.repo">
<arg value="showconfig"/>
<arg value="paths.default"/>
@@ -216,24 +250,18 @@
<arg value="-i"/>
</exec>
<echo message="dir ${sf.project.location} : revision ${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
- <exec executable="cmd" output="${build.drive}/output/logs/BOM/project.csv" append="true">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}"/>
- </exec>
+ <echo message="${sf.job.bom.project.repo},build/config,${sf.job.bom.project.rev}:${sf.job.bom.project.checksum}" file="${build.drive}/output/logs/BOM/project.csv"/>
+ </target>
+ <target name="sf-getenvs">
<!-- tools baseline must come before epoc baseline to allow clean listing -->
+ <touch file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
<if>
<istrue value="${sf.spec.toolsbaseline.enable}" />
<then>
<!-- record toolsbaseline information in BOM file -->
- <delete file="${build.drive}/output/logs/BOM/toolsbaseline.txt" quiet="true"/>
- <exec executable="cmd" output="${build.drive}/output/logs/BOM/toolsbaseline.txt">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="${sf.spec.toolsbaseline.location}"/>
- </exec>
+ <echo message="${sf.spec.toolsbaseline.location}" file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
<!-- wrapper around preparation-getenv but with diff params -->
<runtarget target="sf-getenv-tools"/>
@@ -244,33 +272,30 @@
<arg value="${build.drive}/epoc32"/>
</exec>
</then>
- <else>
- <!-- record fact that no tools baseline used. required by diamondize-bom -->
- <touch file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
- </else>
</if>
+
+ <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
<if>
<istrue value="${sf.spec.baseline.enable}" />
<then>
-
<!-- record baseline information in BOM file -->
- <delete file="${build.drive}/output/logs/BOM/baseline.txt" quiet="true"/>
- <exec executable="cmd" output="${build.drive}/output/logs/BOM/baseline.txt">
- <arg value="/c"/>
- <arg value="echo"/>
- <arg value="${sf.spec.baseline.location}"/>
- </exec>
+ <echo message="${sf.spec.baseline.location}" file="${build.drive}/output/logs/BOM/baseline.txt"/>
<!-- run internal target preparation-getenv -->
<runtarget target="preparation-getenv"/>
-
</then>
- <else>
- <!-- record fact that no baseline used. required by diamondize-bom -->
- <touch file="${build.drive}/output/logs/BOM/baseline.txt"/>
- </else>
</if>
+ </target>
+ <target name="sf-getenv-tools">
+ <antcall target="preparation-getenv" inheritAll="false">
+ <param name="base_release.path" value="${sf.spec.toolsbaseline.location}"/>
+ <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
+ </antcall>
+ </target>
+
+ <target name="sf-syncsource">
+ <touch file="${build.log.dir}/BOM/sources.csv"/>
<if>
<istrue value="${sf.spec.sourcesync.enable}" />
<then>
@@ -278,33 +303,7 @@
<runtarget target="sf-package-source"/>
<runtarget target="sf-unpack-rnd"/>
</then>
- <else>
- <!-- record fact that no sources.csv used. required by diamondize-bom -->
- <touch file="${build.log.dir}/BOM/sources.csv"/>
- </else>
</if>
- <if>
- <istrue value="${sf.spec.publish.enable}"/>
- <then>
- <runtarget target="sf-diamondize-bom"/>
- </then>
- </if>
- </target>
-
- <target name="sf-diamonds-tag-build">
- <echo>[SF-DIAMONDS-TAG-BUILD]</echo>
- <fmpp sourceFile="${sf.common.config.dir}/diamonds/sf-tag-build.xml.ftl" outputFile="${build.drive}/output/logs/sf-tag-build.xml">
- <data expandProperties="yes">
- ant: antProperties()
- </data>
- </fmpp>
- </target>
-
- <target name="sf-getenv-tools">
- <antcall target="preparation-getenv" inheritAll="false">
- <param name="base_release.path" value="${sf.spec.toolsbaseline.location}"/>
- <param name="base_release.getenv_options" value="${sf.spec.toolsbaseline.getenv_options}"/>
- </antcall>
</target>
<!-- generate dir list using passed location and name
@@ -418,19 +417,24 @@
</target>
<target name="sf-diamondize-bom">
- <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
- outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
- <data expandProperties="yes">
- ant: antProperties()
- config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
- project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
- baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
- toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
- sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,type,rev,sysdef]})
- </data>
- </fmpp>
- <!-- Make a copy in BOM dir -->
- <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
+ <if>
+ <istrue value="${sf.spec.publish.enable}"/>
+ <then>
+ <fmpp sourceFile="${sf.common.config.dir}/templates/build-info.xml.ftl"
+ outputFile="${build.drive}/output/logs/sf-diamondize-bom.xml">
+ <data expandProperties="yes">
+ ant: antProperties()
+ config: csv(${build.drive}/output/logs/BOM/config.csv,{separator:',',headers:[loc,dst,rev]})
+ project: csv(${build.drive}/output/logs/BOM/project.csv,{separator:',',headers:[loc,dst,rev]})
+ baseline: slicedText(${build.drive}/output/logs/BOM/baseline.txt,{trim})
+ toolsbaseline: slicedText(${build.drive}/output/logs/BOM/toolsbaseline.txt,{trim})
+ sources: csv(${build.drive}/output/logs/BOM/sources.csv,{separator:',',headers:[loc,dst,type,rev,sysdef]})
+ </data>
+ </fmpp>
+ <!-- Make a copy in BOM dir -->
+ <copy file="${build.drive}/output/logs/sf-diamondize-bom.xml" tofile="${build.log.dir}/BOM/build-info.xml"/>
+ </then>
+ </if>
</target>
<target name="sf-preprocess-package-config">
@@ -483,35 +487,7 @@
<arg value="-y"/> <!-- Need to unpack in overwrite mode, due to TEF -->
<arg value="${build.drive}/output/zips/bin*.zip"/>
</exec>
- </target>
-
- <target name="sf-find-ATS-worker-root">
- <exec executable="perl" dir="${sf.common.config.dir}/tools/ats/devices" failonerror="false" outputproperty="sf.spec.test.workerroot">
- <arg value="-pe"/>
- <arg value=""m/TEMPDIR=(\S+)/;print $1;s/.*\n//g""/>
- <arg value="${env.COMPUTERNAME}\EMULATOR_GENERIC_${env.COMPUTERNAME}.properties" />
- </exec>
- <echo message="ATS Worker Root = ${sf.spec.test.workerroot}"/>
- </target>
-
- <target name ="sf-make-junction" depends="sf-find-ATS-worker-root">
-
- <mkdir dir="${sf.spec.test.workerroot}/${sf.spec.test.epocroot}"/>
-
- <exec executable="perl" dir="${sf.common.config.dir}/tools/ats" failonerror="false" output="${build.log.dir}/ATS_${build.id}_make_junction.log">
- <arg value="make_junction.pl"/>
- <arg value="--link=${sf.spec.test.workerroot}/${sf.spec.test.epocroot}/epoc32"/>
- <arg value="--target=${build.drive}/epoc32"/>
- <arg value="--force"/>
- </exec>
- </target>
-
- <target name ="sf-delete-junction" depends="sf-find-ATS-worker-root">
- <exec executable="junction.exe" dir="${sf.spec.test.workerroot}/${sf.spec.test.epocroot}" failonerror="false" output="${build.log.dir}/ATS_${build.id}_delete_junction.log">
- <arg value="-d"/>
- <arg value="epoc32"/>
- </exec>
- </target>
+ </target>
</project>
--- a/common/common_props.ant.xml Wed Aug 26 14:40:58 2009 +0100
+++ b/common/common_props.ant.xml Tue Sep 08 13:03:56 2009 +0100
@@ -17,6 +17,9 @@
<property name="sf.spec.pdt.root" value="${env.PDT_HOME}"/> <!-- e.g. C:\Symbian\Tools\PDT_1.0\ -->
<property name="sf.spec.sbs.config" value="armv5"/>
+
+ <!-- sbs -t param -->
+ <property name="sf.spec.sbs.retry.limit" value="5"/>
<!-- When not set -j option is to: 2 X NUMBER_OF_PROCESSORS
<property name="sf.spec.sbs.numberofjobs" value="2"/>
@@ -92,10 +95,10 @@
<property name="sf.spec.test.package.droppath" value="TestDrops"/>
<!-- BC check properties -->
- <property name="sf.spec.bccheck.enable" value="false"/>
+ <property name="sf.spec.bccheck.enable" value="true"/>
<property name="sf.spec.bccheck.enable.la" value="true"/>
<property name="sf.spec.bccheck.enable.ha" value="true"/>
- <property name="sf.spec.bccheck.enable.dynamic" value="true"/>
+ <property name="sf.spec.bccheck.enable.dynamic" value="false"/>
<property name="sf.spec.bccheck.baseline.name" value="symbian1"/>
<property name="sf.spec.bccheck.baseline.skd.dir" value="\\v800008\builds01\releases\installed\s60_5th_sdk_installed"/>
<property name="sf.spec.bccheck.baseline.s60.version" value="5.1"/>
--- a/common/templates/zip.cfg.xml.ftl.template Wed Aug 26 14:40:58 2009 +0100
+++ b/common/templates/zip.cfg.xml.ftl.template Tue Sep 08 13:03:56 2009 +0100
@@ -37,58 +37,61 @@
<config name="rnd" abstract="true">
<set name="grace.filters" value="rnd" />
</config>
+ <config name="misc" abstract="true">
+ <set name="grace.filters" value="misc" />
+ </config>
</config>
<config name="src-by-layer" abstract="true">
<set name="grace.metadata" value="false" />
<set name="root.dir" value="${build.output.dir}/zips"/>
<set name="archives.dir" value="${build.output.dir}/zips/release" />
<!-- Zips of zips for SFL code -->
- <config>
+ <config name="sfl-adaptation">
<set name="name" value="src_sfl_adaptation"/>
<set name="include" value="src_sfl_adaptation_*.zip"/>
</config>
- <config>
+ <config name="sfl-app">
<set name="name" value="src_sfl_app"/>
<set name="include" value="src_sfl_app_*.zip"/>
</config>
- <config>
+ <config name="sfl-mw">
<set name="name" value="src_sfl_mw"/>
<set name="include" value="src_sfl_mw_*.zip"/>
</config>
- <config>
+ <config name="sfl-os">
<set name="name" value="src_sfl_os"/>
<set name="include" value="src_sfl_os_*.zip"/>
</config>
- <config>
+ <config name="sfl-ostools">
<set name="name" value="src_sfl_ostools"/>
<set name="include" value="src_sfl_ostools_*.zip"/>
</config>
- <config>
+ <config name="sfl-tools">
<set name="name" value="src_sfl_tools"/>
<set name="include" value="src_sfl_tools_*.zip"/>
</config>
<!-- Zips of zips for OSS code -->
- <config>
+ <config name="oss-adaptation">
<set name="name" value="src_oss_adaptation"/>
<set name="include" value="src_oss_adaptation_*.zip"/>
</config>
- <config>
+ <config name="oss-app">
<set name="name" value="src_oss_app"/>
<set name="include" value="src_oss_app_*.zip"/>
</config>
- <config>
+ <config name="oss-mw">
<set name="name" value="src_oss_mw"/>
<set name="include" value="src_oss_mw_*.zip"/>
</config>
- <config>
+ <config name="oss-os">
<set name="name" value="src_oss_os"/>
<set name="include" value="src_oss_os_*.zip"/>
</config>
- <config>
+ <config name="oss-ostools">
<set name="name" value="src_oss_ostools"/>
<set name="include" value="src_oss_ostools_*.zip"/>
</config>
- <config>
+ <config name="oss-tools">
<set name="name" value="src_oss_tools"/>
<set name="include" value="src_oss_tools_*.zip"/>
</config>
--- a/common/tools/populateziptemplate.pl Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/populateziptemplate.pl Tue Sep 08 13:03:56 2009 +0100
@@ -70,8 +70,7 @@
my $xml = XML::Simple->new();
my $zipConfig = $xml->XMLin($template, keyattr => $keyAttr);
my @allRndFiles;
-
-my $failures = 0;
+my $miscCount = 0;
# For each package in CSV...
foreach my $package (@packages)
@@ -142,8 +141,23 @@
}
else
{
- warn "Cannot determine license for '$package->{source}'\n";
- $failures++;
+ (my $dest2 = $package->{dst}) =~ s{[\\/]}{_slash_}g;
+ push @{$zipConfig->{config}->{config}->{src}->{config}->{misc}->{config}},
+ {
+ set =>
+ [
+ {
+ name => "name",
+ value=> "src_misc_$dest2"."_$miscCount",
+ },
+ {
+ name => "include",
+ value => "$package->{dst}/**",
+ },
+ ]
+ };
+ $miscCount++;
+ warn "Warning: Cannot determine license for '$package->{source}' - it will be packaged as 'src_misc_$dest2"."_$miscCount'\n";
}
}
@@ -158,4 +172,3 @@
print $fh @allRndFiles;
close $fh;
-exit($failures);
--- a/common/tools/raptor/RaptorCommon.pm Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/RaptorCommon.pm Tue Sep 08 13:03:56 2009 +0100
@@ -14,22 +14,8 @@
package RaptorCommon;
-our $CATEGORY_GENERAL = 'general';
-
-our $CATEGORY_RAPTORERROR = 'raptor_error';
-our $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION = 'cannot_process_schema_version';
-our $CATEGORY_RAPTORERROR_NOBLDINFFOUND = 'no_bld_inf_found';
-our $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file';
-our $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors';
-our $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version';
-
-our $CATEGORY_RAPTORWARNING = 'raptor_warning';
-our $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2 = 'missing_enable_abiv2_mode';
-
-our $SEVERITY_UNKNOWN = 'unknown';
our $SEVERITY_CRITICAL = 'critical';
our $SEVERITY_MAJOR = 'major';
-our $SEVERITY_NORMAL = 'normal';
our $SEVERITY_MINOR = 'minor';
sub init
@@ -48,7 +34,7 @@
my ($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line) = @_;
open(SUMMARY, ">>$::basedir/summary.csv");
- print SUMMARY "$category,$subcategory,$severity,$component,$phase,$recipe,$file,$line\n";
+ print SUMMARY "$category,$subcategory,$severity,$::raptor_config,$component,$phase,$recipe,$file,$line\n";
close(SUMMARY);
}
--- a/common/tools/raptor/RaptorError.pm Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/RaptorError.pm Tue Sep 08 13:03:56 2009 +0100
@@ -36,51 +36,57 @@
$buildlog_error_status->{on_chars} = 'RaptorError::on_chars_buildlog_error';
my $filename = '';
+my $failure_item = 0;
my $characters = '';
-my $category = $RaptorCommon::CATEGORY_RAPTORERROR;
+my $CATEGORY_RAPTORERROR = 'raptor_error';
+my $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION = 'cannot_process_schema_version';
+my $CATEGORY_RAPTORERROR_NOBLDINFFOUND = 'no_bld_inf_found';
+my $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file';
+my $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors';
+my $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version';
sub process
{
my ($text, $component, $phase, $recipe, $file, $line) = @_;
- my $severity = $RaptorCommon::SEVERITY_UNKNOWN;
+ my $category = $CATEGORY_RAPTORERROR;
+ my $severity = '';
+ my $subcategory = '';
if ($text =~ m,Cannot process schema version .* of file,)
{
$severity = $RaptorCommon::SEVERITY_CRITICAL;
- my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION;
+ $subcategory = $CATEGORY_RAPTORERROR_CANNOTPROCESSSCHEMAVERSION;
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
elsif ($text =~ m,No bld\.inf found at,)
{
$severity = $RaptorCommon::SEVERITY_MAJOR;
- my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_NOBLDINFFOUND;
+ $subcategory = $CATEGORY_RAPTORERROR_NOBLDINFFOUND;
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
elsif ($text =~ m,Can't find mmp file,)
{
- $severity = $RaptorCommon::SEVERITY_NORMAL;
- my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_CANTFINDMMPFILE;
+ $severity = $RaptorCommon::SEVERITY_MINOR;
+ $subcategory = $CATEGORY_RAPTORERROR_CANTFINDMMPFILE;
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
elsif ($text =~ m,The make-engine exited with errors,)
{
$severity = $RaptorCommon::SEVERITY_CRITICAL;
- my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS;
+ $subcategory = $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS;
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
elsif ($text =~ m,tool .* from config .* did not return version .* as required,)
{
$severity = $RaptorCommon::SEVERITY_CRITICAL;
- my $subcategory = $RaptorCommon::CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION;
+ $subcategory = $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION;
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
else # log everything by default
{
- $severity = $RaptorCommon::SEVERITY_NORMAL;
- my $subcategory = '';
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
}
@@ -89,7 +95,7 @@
{
RaptorCommon::init();
- $filename = "$::basedir/errors.txt";
+ $filename = "$::basedir/raptor_error.txt";
if (!-f$filename)
{
print "Writing errors file $filename\n";
@@ -100,7 +106,6 @@
sub on_start_buildlog_error
{
- open(FILE, ">>$filename");
}
sub on_chars_buildlog_error
@@ -118,17 +123,31 @@
{
#print "on_end_buildlog_error\n";
- print FILE $characters if ($characters =~ m,[^\s^\r^\n],);
- print FILE "\n" if ($characters !~ m,[\r\n]$, );
- close(FILE);
+ $characters =~ s,^[\r\n]*,,;
+ $characters =~ s,[\r\n]*$,,;
- # get the line number - not really optimized
- my $linecount = 0;
- open(FILE, "$filename");
- for ($linecount = 0; <FILE>; $linecount++) { }
- close(FILE);
+ if ($characters =~ m,[^\s^\r^\n],)
+ {
+ if ($failure_item == 0 and -f "$filename")
+ {
+ open(FILE, "$filename");
+ {
+ local $/ = undef;
+ my $filecontent = <FILE>;
+ $failure_item = $1 if ($filecontent =~ m/.*---failure_item_(\d+)/s);
+ }
+ close(FILE);
+ }
+
+ $failure_item++;
- process($characters, '', '', '', "errors.txt", $linecount);
+ open(FILE, ">>$filename");
+ print FILE "---failure_item_$failure_item\---\n";
+ print FILE "$characters\n\n";
+ close(FILE);
+
+ process($characters, '', '', '', "raptor_error.txt", $failure_item);
+ }
$characters = '';
}
--- a/common/tools/raptor/RaptorInfo.pm Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/RaptorInfo.pm Tue Sep 08 13:03:56 2009 +0100
@@ -42,7 +42,7 @@
{
my ($text) = @_;
- my $severity = $RaptorCommon::SEVERITY_UNKNOWN;
+ my $severity = '';
if ($text =~ m,unmatchable,)
{
--- a/common/tools/raptor/RaptorRecipe.pm Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/RaptorRecipe.pm Tue Sep 08 13:03:56 2009 +0100
@@ -21,70 +21,92 @@
our $reset_status = {};
my $buildlog_status = {};
my $buildlog_recipe_status = {};
+my $buildlog_recipe_status_status = {};
$reset_status->{name} = 'reset_status';
$reset_status->{next_status} = {buildlog=>$buildlog_status};
$buildlog_status->{name} = 'buildlog_status';
$buildlog_status->{next_status} = {recipe=>$buildlog_recipe_status};
+$buildlog_status->{on_start} = 'RaptorRecipe::on_start_buildlog';
+$buildlog_status->{on_end} = 'RaptorRecipe::on_end_buildlog';
$buildlog_recipe_status->{name} = 'buildlog_recipe_status';
-$buildlog_recipe_status->{next_status} = {};
+$buildlog_recipe_status->{next_status} = {status=>$buildlog_recipe_status_status};
$buildlog_recipe_status->{on_start} = 'RaptorRecipe::on_start_buildlog_recipe';
$buildlog_recipe_status->{on_end} = 'RaptorRecipe::on_end_buildlog_recipe';
$buildlog_recipe_status->{on_chars} = 'RaptorRecipe::on_chars_buildlog_recipe';
-my $characters = '';
+$buildlog_recipe_status_status->{name} = 'buildlog_recipe_status_status';
+$buildlog_recipe_status_status->{next_status} = {};
+$buildlog_recipe_status_status->{on_start} = 'RaptorRecipe::on_start_buildlog_recipe_status';
+
+
+my $filename = '';
+my $failure_item = 0;
+
my $recipe_info = {};
-my $category = $RaptorCommon::CATEGORY_RAPTORRECIPE;
+my $characters = '';
+
+my $CATEGORY_RECIPEFAILURE = 'recipe_failure';
+my $CATEGORY_RECIPEFAILURE_ARMCC_CANNOTOPENSOURCEINPUTFILE = 'armcc_cannot_open_source_input_file';
+my $CATEGORY_RECIPEFAILURE_ARMLINK_COULDNOTOPENFILE = 'armlink_could_not_open_file';
+my $CATEGORY_RECIPEFAILURE_ELF2E32_COULDNOTOPENFILE = 'elf2e32_could_not_open_file';
sub process
{
- my ($text) = @_;
+ my ($text, $component, $phase, $recipe, $file, $line) = @_;
+
+ my $category = $CATEGORY_RECIPEFAILURE;
+ my $severity = '';
+ my $subcategory = '';
- my $severity = $RaptorCommon::SEVERITY_UNKNOWN;
-
- if ($text =~ m,Cannot process schema version .* of file,)
+ if ($text =~ m,Error: #5: cannot open source input file .*: No such file or directory,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MAJOR;
+ my $subcategory = $CATEGORY_RECIPEFAILURE_ARMCC_CANNOTOPENSOURCEINPUTFILE;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,Fatal error: L6002U: Could not open file .*: No such file or directory,)
{
- $severity = $RaptorCommon::SEVERITY_CRITICAL;
-
- #dump_recipe($category, $severity, $text);
- print "$category, $severity, $text\n";
+ $severity = $RaptorCommon::SEVERITY_MAJOR;
+ my $subcategory = $CATEGORY_RECIPEFAILURE_ARMLINK_COULDNOTOPENFILE;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,elf2e32 : Error: E1001: Could not open file : .*.,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MAJOR;
+ my $subcategory = $CATEGORY_RECIPEFAILURE_ELF2E32_COULDNOTOPENFILE;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
+ else # log everything by default
+ {
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+}
+
+sub on_start_buildlog
+{
+ #print FILE "line,layer,component,name,armlicence,platform,phase,code,bldinf,mmp,target,source,\n";
+
+ RaptorCommon::init();
}
sub on_start_buildlog_recipe
{
my ($el) = @_;
- $recipe_info = {};
- $characters = '';
+ #print "on_start_buildlog_recipe\n";
- my $attrstring = '';
- my $bldinf = '';
+ $recipe_info = {};
my $attributes = $el->{Attributes};
for (keys %{$attributes})
{
- if ($attributes->{$_}->{'LocalName'} eq 'bldinf')
- {
- $bldinf = $attributes->{$_}->{'Value'};
- }
-
- $attrstring .= "$attributes->{$_}->{'LocalName'}}='$attributes->{$_}->{'Value'}' ";
-
+ $recipe_info->{$attributes->{$_}->{'LocalName'}} = $attributes->{$_}->{'Value'};
+ #print "$_ -> $attributes->{$_}->{'Value'}\n";
}
-
- if ($bldinf eq '')
- {
- print "WARNING: recipe tag with no bldinf attribute. Associating to package unknown/unknown\n";
- $bldinf = "/sf/unknown/unknown/group/bld.inf";
- }
-
- $recipe_info->{bldinf} = $bldinf;
-
- $characters = "<recipe $attrstring>\n";
}
sub on_chars_buildlog_recipe
@@ -98,30 +120,88 @@
#print "characters is now -->$characters<--\n";
}
+sub on_start_buildlog_recipe_status
+{
+ my ($el) = @_;
+
+ my $attributes = $el->{Attributes};
+ for (keys %{$attributes})
+ {
+ if ($attributes->{$_}->{'LocalName'} eq 'code')
+ {
+ $recipe_info->{$attributes->{$_}->{'LocalName'}} = $attributes->{$_}->{'Value'};
+ }
+ elsif ($attributes->{$_}->{'LocalName'} eq 'exit')
+ {
+ $recipe_info->{$attributes->{$_}->{'LocalName'}} = $attributes->{$_}->{'Value'};
+ }
+ elsif ($attributes->{$_}->{'LocalName'} eq 'attempt')
+ {
+ $recipe_info->{$attributes->{$_}->{'LocalName'}} = $attributes->{$_}->{'Value'};
+ }
+ }
+}
+
sub on_end_buildlog_recipe
{
- #print "on_end_buildlog_recipe\n";
-
- $characters .= "\n</recipe>\n";
-
- my $normalized = lc($recipe_info->{bldinf});
- $normalized =~ s,^[A-Za-z]:,,;
- $normalized =~ s,[\\],/,g;
-
- $normalized =~ m,^/sf/([^/]+)/([^/]+)/,;
- my $layer = $1;
- my $package = $2;
-
- mkdir("$::basedir/recipes");
- mkdir("$::basedir/recipes/$layer");
- mkdir("$::basedir/recipes/$layer/$package");
-
- my $filename = "$::basedir/recipes/$layer/$package/recipes.txt";
-
- print "Writing recipes file $filename\n" if (!-f$filename);
- open(FILE, ">>$filename");
- print FILE $characters;
- close(FILE);
+ if ($recipe_info->{exit} =~ /failed/)
+ {
+ # normalize bldinf path
+ $recipe_info->{bldinf} = lc($recipe_info->{bldinf});
+ $recipe_info->{bldinf} =~ s,^[A-Za-z]:,,;
+ $recipe_info->{bldinf} =~ s,[\\],/,g;
+
+ my $package = '';
+ if ($recipe_info->{bldinf} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ {
+ $package = $1;
+ $package =~ s,/,_,;
+ }
+ else
+ {
+ print "WARNING: can't understand bldinf attribute of recipe: $recipe_info->{bldinf}. Won't dump to failed recipes file.\n";
+ }
+
+ $characters =~ s,^[\r\n]*,,;
+ $characters =~ s,[\r\n]*$,,;
+
+ if ($package)
+ {
+ $filename = "$::basedir/$package.txt";
+ if (!-f$filename)
+ {
+ print "Writing recipe file $filename\n";
+ open(FILE, ">$filename");
+ close(FILE);
+ }
+
+ if ($failure_item == 0 and -f "$filename")
+ {
+ open(FILE, "$filename");
+ {
+ local $/ = undef;
+ my $filecontent = <FILE>;
+ $failure_item = $1 if ($filecontent =~ m/.*---failure_item_(\d+)/s);
+ }
+ close(FILE);
+ }
+
+ $failure_item++;
+
+ open(FILE, ">>$filename");
+ print FILE "---failure_item_$failure_item\---\n";
+ print FILE "$characters\n\n";
+ close(FILE);
+ }
+
+ process($characters, $recipe_info->{bldinf}, $recipe_info->{phase}, $recipe_info->{name}, "$package.txt", $failure_item);
+ }
+
+ $characters = '';
+}
+
+sub on_end_buildlog
+{
}
--- a/common/tools/raptor/RaptorUnreciped.pm Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/RaptorUnreciped.pm Tue Sep 08 13:03:56 2009 +0100
@@ -33,30 +33,154 @@
$buildlog_subtag_status->{name} = 'buildlog_subtag_status';
$buildlog_subtag_status->{next_status} = {};
+$buildlog_subtag_status->{on_start} = 'RaptorUnreciped::on_start_buildlog_subtag';
+$buildlog_subtag_status->{on_end} = 'RaptorUnreciped::on_end_buildlog_subtag';
+
+my $filename = '';
+my $failure_item = 0;
my $characters = '';
+my $store_chars = 1;
+
+my $CATEGORY_RAPTORUNRECIPED = 'raptor_unreciped';
+my $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET = 'no_rule_to_make_target';
+my $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS = 'target_not_remade_for_errors';
+my $CATEGORY_RAPTORUNRECIPED_NOTHINGTOBEDONEFOR = 'nothing_to_be_done_for';
+my $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET = 'ignoring_old_commands_for_target';
+my $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET = 'overriding_commands_for_target';
+
+sub process
+{
+ my ($text, $component, $phase, $recipe, $file, $line) = @_;
+
+ my $category = $CATEGORY_RAPTORUNRECIPED;
+ my $severity = '';
+ my $subcategory = '';
+
+ if ($text =~ m,make\.exe: \*\*\* No rule to make target,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MAJOR;
+ my $subcategory = $CATEGORY_RAPTORUNRECIPED_NORULETOMAKETARGET;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,make\.exe: Target .* not remade because of errors,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MINOR;
+ my $subcategory = $CATEGORY_RAPTORUNRECIPED_TARGETNOTREMADEFORERRORS;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,: warning: ignoring old commands for target,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MINOR;
+ my $subcategory = $CATEGORY_RAPTORUNRECIPED_IGNORINGOLDCOMMANDSFORTARGET;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,: warning: overriding commands for target,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MINOR;
+ my $subcategory = $CATEGORY_RAPTORUNRECIPED_OVERRIDINGCOMMANDSFORTARGET;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,make\.exe: Nothing to be done for .*,)
+ {
+ $severity = $RaptorCommon::SEVERITY_MINOR;
+ my $subcategory = $CATEGORY_RAPTORUNRECIPED_NOTHINGTOBEDONEFOR;
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+ elsif ($text =~ m,^(true|false)$,)
+ {
+ # don't dump
+ }
+ else # log everything by default
+ {
+ RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
+ }
+}
sub on_start_buildlog
{
- my $filename = "$::basedir/unreciped.txt";
- print "Writing unreciped file $filename\n" if (!-f$filename);
- open(FILE, ">>$filename");
+ RaptorCommon::init();
+
+ $filename = "$::basedir/raptor_unreciped.txt";
+ if (!-f$filename)
+ {
+ print "Writing unreciped file $filename\n";
+ open(FILE, ">$filename");
+ close(FILE);
+ }
}
sub on_chars_buildlog
{
my ($ch) = @_;
- my $characters = $ch->{Data};
+ #print "on_chars_buildlog\n";
+
+ if ($store_chars)
+ {
+ $characters .= $ch->{Data};
+
+ #print "characters is now -->$characters<--\n";
+ }
+}
+
+sub on_end_buildlog_subtag
+{
+ $store_chars = 1;
+}
+
+sub process_characters
+{
+ #print "process_characters\n";
+
+ $characters =~ s,^[\r\n]*,,;
+ $characters =~ s,[\r\n]*$,,;
+
+ #print "characters is -->$characters<--\n";
- print FILE $characters if ($characters =~ m,[^\s^\r^\n],);
+ my @lines = split(/[\r\n]/, $characters);
+ for my $line (@lines)
+ {
+ if ($line =~ m,[^\s^\r^\n],)
+ {
+ #print "dumping chars\n";
+
+ if ($failure_item == 0 and -f "$filename")
+ {
+ open(FILE, "$filename");
+ {
+ local $/ = undef;
+ my $filecontent = <FILE>;
+ $failure_item = $1 if ($filecontent =~ m/.*---failure_item_(\d+)/s);
+ }
+ close(FILE);
+ }
+
+ $failure_item++;
+
+ open(FILE, ">>$filename");
+ print FILE "---failure_item_$failure_item\---\n";
+ print FILE "$line\n\n";
+ close(FILE);
+
+ process($line, '', '', '', "raptor_unreciped.txt", $failure_item);
+ }
+ }
- #print "characters is now -->$characters<--\n";
+ $characters = '';
+ $store_chars = 0;
+}
+
+sub on_start_buildlog_subtag
+{
+ #print "on_start_buildlog_subtag\n";
+
+ process_characters();
}
sub on_end_buildlog
{
- close(FILE);
+ process_characters();
}
--- a/common/tools/raptor/RaptorWarning.pm Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/RaptorWarning.pm Tue Sep 08 13:03:56 2009 +0100
@@ -36,27 +36,29 @@
$buildlog_warning_status->{on_chars} = 'RaptorWarning::on_chars_buildlog_warning';
my $filename = '';
+my $failure_item = 0;
my $characters = '';
-my $category = $RaptorCommon::CATEGORY_RAPTORWARNING;
+my $CATEGORY_RAPTORWARNING = 'raptor_warning';
+my $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2 = 'missing_enable_abiv2_mode';
sub process
{
my ($text, $component, $phase, $recipe, $file, $line) = @_;
- my $severity = $RaptorCommon::SEVERITY_UNKNOWN;
+ my $category = $CATEGORY_RAPTORWARNING;
+ my $severity = '';
+ my $subcategory = '';
if ($text =~ m,missing flag ENABLE_ABIV2_MODE,)
{
- $severity = $RaptorCommon::SEVERITY_NORMAL;
- my $subcategory = $RaptorCommon::CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2;
+ $severity = $RaptorCommon::SEVERITY_MINOR;
+ my $subcategory = $CATEGORY_RAPTORWARNING_MISSINGFLAGABIV2;
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
else # log everything by default
{
- $severity = $RaptorCommon::SEVERITY_NORMAL;
- my $subcategory = '';
RaptorCommon::dump_fault($category, $subcategory, $severity, $component, $phase, $recipe, $file, $line);
}
}
@@ -65,7 +67,7 @@
{
RaptorCommon::init();
- $filename = "$::basedir/warnings.txt";
+ $filename = "$::basedir/raptor_warning.txt";
if (!-f$filename)
{
print "Writing warnings file $filename\n";
@@ -93,17 +95,31 @@
{
#print "on_end_buildlog_warning\n";
- print FILE $characters if ($characters =~ m,[^\s^\r^\n],);
- print FILE "\n" if ($characters !~ m,[\r\n]$, );
- close(FILE);
+ $characters =~ s,^[\r\n]*,,;
+ $characters =~ s,[\r\n]*$,,;
- # get the line number - not really optimized
- my $linecount = 0;
- open(FILE, "$filename");
- for ($linecount = 0; <FILE>; $linecount++) { }
- close(FILE);
+ if ($characters =~ m,[^\s^\r^\n],)
+ {
+ if ($failure_item == 0 and -f "$filename")
+ {
+ open(FILE, "$filename");
+ {
+ local $/ = undef;
+ my $filecontent = <FILE>;
+ $failure_item = $1 if ($filecontent =~ m/.*---failure_item_(\d+)/s);
+ }
+ close(FILE);
+ }
+
+ $failure_item++;
- process($characters, '', '', '', "warnings.txt", $linecount);
+ open(FILE, ">>$filename");
+ print FILE "---failure_item_$failure_item\---\n";
+ print FILE "$characters\n\n";
+ close(FILE);
+
+ process($characters, '', '', '', "raptor_warning.txt", $failure_item);
+ }
$characters = '';
}
--- a/common/tools/raptor/parse.pl Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/raptor/parse.pl Tue Sep 08 13:03:56 2009 +0100
@@ -13,6 +13,8 @@
# Run the raptor parsers
use strict;
+use FindBin;
+use lib $FindBin::Bin;
use RaptorReleaseable;
use RaptorError;
use RaptorWarning;
@@ -32,6 +34,7 @@
my $unreciped_module = 0;
my $recipe_module = 0;
our $basedir = '';
+our $raptor_config = '';
my $append = 0;
my $help = 0;
GetOptions((
@@ -42,7 +45,8 @@
'info!' => \$info_module,
'unreciped!' => \$unreciped_module,
'recipe!' => \$recipe_module,
- 'basedir:s' => \$basedir,
+ 'basedir=s' => \$basedir,
+ 'config=s' => \$raptor_config,
'append!' => \$append,
'help!' => \$help
));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/raptor/summarize.pl Tue Sep 08 13:03:56 2009 +0100
@@ -0,0 +1,311 @@
+# Copyright (c) 2009 Symbian Foundation Ltd
+# 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:
+# Symbian Foundation Ltd - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# Generate an HTML summary of the Raptor build from the output of the raptor parser
+
+use strict;
+use FindBin;
+use lib $FindBin::Bin;
+use Getopt::Long;
+
+my $raptorbitsdir = 0;
+my $outputdir = '.';
+my $help = 0;
+GetOptions((
+ 'raptorbitsdir=s' => \$raptorbitsdir,
+ 'outputdir=s' => \$outputdir,
+ 'help!' => \$help
+));
+
+$help = 1 if (!$raptorbitsdir);
+
+if ($help)
+{
+ print "Generate an HTML summary of the Raptor build from a summary.csv file\n";
+ print "Usage: perl summarize.pl --raptorbitsdir=DIR [--outputdir=DIR]\n";
+ exit(0);
+}
+
+$outputdir = "$outputdir/html";
+
+system("rd /S /Q $outputdir") if (-d $outputdir);
+mkdir ($outputdir);
+
+my $raptor_errors = {};
+my $raptor_warnings = {};
+my $raptor_unreciped = {};
+my $general_failures_num_by_severity = {};
+my $general_failures_by_category_severity = {};
+my $recipe_failures_num_by_severity = {};
+my $recipe_failures_by_package_severity = {};
+#my $severities = {};
+my @severities = ('critical', 'major', 'minor', 'unknown');
+
+# READ SUMMARY.CSV FILE
+my $csv_file = "$raptorbitsdir/summary.csv";
+my $csv_linenum = 0;
+open(CSV, $csv_file);
+while(<CSV>)
+{
+ $csv_linenum ++;
+ my $line = $_;
+
+ if ($line =~ /([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)/)
+ {
+ my $failure = {};
+ $failure->{category} = $1;
+ $failure->{subcategory} = $2;
+ $failure->{severity} = $3;
+ $failure->{config} = $4;
+ $failure->{component} = $5;
+ $failure->{phase} = $6;
+ $failure->{recipe} = $7;
+ $failure->{file} = $8;
+ $failure->{linenum} = $9;
+
+ my $failure_package = '';
+
+ if (!$failure->{category})
+ {
+ print "WARNING: summary line without a category at $csv_file line $csv_linenum. Skipping\n";
+ next;
+ }
+
+ if ($failure->{category} =~ m,^recipe_failure$,i and !$failure->{component})
+ {
+ print "WARNING: recipe_failure with component field empty at $csv_file line $csv_linenum. Skipping\n";
+ next;
+ }
+ if ($failure->{component})
+ {
+ if ($failure->{component} =~ m,/((os|mw|app|tools|ostools|adaptation)/[^/]*),)
+ {
+ $failure_package = $1;
+ }
+ else
+ {
+ print "WARNING: summary line with wrong component path at $csv_file line $csv_linenum. Skipping\n";
+ next;
+ }
+ }
+
+ $failure->{subcategory} = 'uncategorized' if (!$failure->{subcategory});
+ $failure->{severity} = 'unknown' if (!$failure->{severity});
+
+ # populate severities dynamically.
+ #$severities->{$failure->{severity}} = 1;
+
+ # put failure items into their category container
+ if ($failure->{category} =~ /^raptor_(error|warning|unreciped)$/i)
+ {
+ $general_failures_num_by_severity->{$failure->{category}} = {} if (!defined $general_failures_num_by_severity->{$failure->{category}});
+ my $general_failure = $general_failures_num_by_severity->{$failure->{category}};
+
+ if (!defined $general_failure->{$failure->{severity}})
+ {
+ $general_failure->{$failure->{severity}} = 1;
+ }
+ else
+ {
+ $general_failure->{$failure->{severity}} ++;
+ }
+
+ $general_failures_by_category_severity->{$failure->{category}} = {} if (!defined $general_failures_by_category_severity->{$failure->{category}});
+ $general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}} = [] if (!defined $general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}});
+ push(@{$general_failures_by_category_severity->{$failure->{category}}->{$failure->{severity}}}, $failure);
+ }
+ elsif ($failure->{category} =~ /^recipe_failure$/i)
+ {
+ $recipe_failures_num_by_severity->{$failure_package} = {} if (!defined $recipe_failures_num_by_severity->{$failure_package});
+ my $package_failure = $recipe_failures_num_by_severity->{$failure_package};
+
+ if (!defined $package_failure->{$failure->{severity}})
+ {
+ $package_failure->{$failure->{severity}} = 1;
+ }
+ else
+ {
+ $package_failure->{$failure->{severity}} ++;
+ }
+
+ $recipe_failures_by_package_severity->{$failure_package} = {} if (!defined $recipe_failures_by_package_severity->{$failure_package});
+ $recipe_failures_by_package_severity->{$failure_package}->{$failure->{severity}} = [] if (!defined $recipe_failures_by_package_severity->{$failure_package}->{$failure->{severity}});
+ push(@{$recipe_failures_by_package_severity->{$failure_package}->{$failure->{severity}}}, $failure);
+ }
+ }
+ else
+ {
+ print "WARNING: line does not match expected format at $csv_file line $csv_linenum. Skipping\n";
+ }
+}
+close(CSV);
+
+# PRINT HTML SUMMARY
+my $aggregated_html = "$outputdir/index.html";
+open(AGGREGATED, ">$aggregated_html");
+print AGGREGATED "RAPTOR BUILD SUMMARY<br/>\n";
+
+print AGGREGATED "<br/>GENERAL FAILURES<br/>\n";
+print AGGREGATED "<table border='1'>\n";
+my $tableheader = "<tr><th>category</th>";
+for (@severities) { $tableheader .= "<th>$_</th>"; }
+$tableheader .= "</tr>";
+print AGGREGATED "$tableheader\n";
+for my $category (keys %{$general_failures_num_by_severity})
+{
+ print_category_specific_summary($category, $general_failures_by_category_severity->{$category});
+ my $categoryline = "<tr><td><a href='$category.html'>$category</a></td>";
+ for (@severities)
+ {
+ my $failuresbyseverity = 0;
+ $failuresbyseverity = $general_failures_num_by_severity->{$category}->{$_} if (defined $general_failures_num_by_severity->{$category}->{$_});
+ $categoryline .= "<td>$failuresbyseverity</td>";
+ }
+ $categoryline .= "</tr>";
+ print AGGREGATED "$categoryline\n";
+}
+print AGGREGATED "</table>\n";
+print AGGREGATED "<br/>\n";
+
+print AGGREGATED "<br/>PACKGE-SPECIFIC FAILURES<br/>\n";
+print AGGREGATED "<table border='1'>\n";
+$tableheader = "<tr><th>package</th>";
+for (@severities) { $tableheader .= "<th>$_</th>"; }
+$tableheader .= "</tr>";
+print AGGREGATED "$tableheader\n";
+for my $package (keys %{$recipe_failures_num_by_severity})
+{
+ print_package_specific_summary($package, $recipe_failures_by_package_severity->{$package});
+ my $packagesummaryhtml = $package;
+ $packagesummaryhtml =~ s,/,_,;
+ $packagesummaryhtml .= ".html";
+ my $packageline = "<tr><td><a href='$packagesummaryhtml'>$package</a></td>";
+ for (@severities)
+ {
+ my $failuresbyseverity = 0;
+ $failuresbyseverity = $recipe_failures_num_by_severity->{$package}->{$_} if (defined $recipe_failures_num_by_severity->{$package}->{$_});
+ $packageline .= "<td>$failuresbyseverity</td>";
+ }
+ $packageline .= "</tr>";
+ print AGGREGATED "$packageline\n";
+}
+print AGGREGATED "</table>\n";
+close(AGGREGATED);
+
+translate_detail_files_to_html();
+
+
+sub print_category_specific_summary
+{
+ my ($category, $failures_by_severity) = @_;
+
+ my $filenamebase = $category;
+ $filenamebase =~ s,/,_,;
+
+ open(SPECIFIC, ">$outputdir/$filenamebase.html");
+ print SPECIFIC "FAILURES FOR CATEGORY $category<br/>\n";
+
+ for my $severity (@severities)
+ {
+ if (defined $failures_by_severity->{$severity})
+ {
+ print SPECIFIC "<br/>".uc($severity)."<br/>\n";
+ print SPECIFIC "<table border='1'>\n";
+ # $subcategory, $severity, $component, $phase, $recipe, $file, $line
+ my $tableheader = "<tr><th>category</th><th>configuration</th><th>log snippet</th></tr>";
+ print SPECIFIC "$tableheader\n";
+
+ for my $failure (@{$failures_by_severity->{$severity}})
+ {
+ my $failureline = "<tr><td>$failure->{subcategory}</td>";
+ $failureline .= "<td>$failure->{config}</td>";
+ $failureline .= "<td><a href='$filenamebase\_failures.html#failure_item_$failure->{linenum}'>item $failure->{linenum}</a></td>";
+ $failureline .= "</tr>";
+ print SPECIFIC "$failureline\n";
+ }
+
+ print SPECIFIC "</table>\n";
+ print SPECIFIC "<br/>\n";
+ }
+ }
+
+ close(SPECIFIC);
+}
+
+sub print_package_specific_summary
+{
+ my ($package, $failures_by_severity) = @_;
+
+ my $filenamebase = $package;
+ $filenamebase =~ s,/,_,;
+
+ open(SPECIFIC, ">$outputdir/$filenamebase.html");
+ print SPECIFIC "FAILURES FOR PACKAGE $package<br/>\n";
+
+ for my $severity (@severities)
+ {
+ if (defined $failures_by_severity->{$severity})
+ {
+ print SPECIFIC "<br/>".uc($severity)."<br/>\n";
+ print SPECIFIC "<table border='1'>\n";
+ # $subcategory, $severity, $component, $phase, $recipe, $file, $line
+ my $tableheader = "<tr><th>category</th><th>configuration</th><th>component</th><th>phase</th><th>recipe</th><th>log snippet</th></tr>";
+ print SPECIFIC "$tableheader\n";
+
+ for my $failure (@{$failures_by_severity->{$severity}})
+ {
+ my $failureline = "<tr><td>$failure->{subcategory}</td>";
+ $failureline .= "<td>$failure->{config}</td>";
+ $failureline .= "<td>$failure->{component}</td>";
+ $failureline .= "<td>$failure->{phase}</td>";
+ $failureline .= "<td>$failure->{recipe}</td>";
+ $failureline .= "<td><a href='$filenamebase\_failures.html#failure_item_$failure->{linenum}'>item $failure->{linenum}</a></td>";
+ $failureline .= "</tr>";
+ print SPECIFIC "$failureline\n";
+ }
+
+ print SPECIFIC "</table>\n";
+ print SPECIFIC "<br/>\n";
+ }
+ }
+
+ close(SPECIFIC);
+}
+
+sub translate_detail_files_to_html
+{
+ opendir(DIR, $raptorbitsdir);
+ my @failurefiles = readdir(DIR);
+ closedir(DIR);
+ @failurefiles = grep(/\.txt$/, @failurefiles);
+
+ for my $file (@failurefiles)
+ {
+ $file =~ /(.*)\.txt$/;
+ my $filenamebase = $1;
+
+ my $filecontent = '';
+ open(FILE, "$raptorbitsdir/$file");
+ {
+ local $/=undef;
+ $filecontent = <FILE>;
+ }
+ close(FILE);
+
+ $filecontent =~ s,---(failure_item_\d+)---,<a name="$1">---$1---</a>,g;
+ $filecontent = "<pre>$filecontent</pre>";
+
+ open(FILE, ">$outputdir/$filenamebase\_failures.html");
+ print FILE $filecontent;
+ close(FILE);
+ }
+}
--- a/common/tools/summary/brag_script.pl Wed Aug 26 14:40:58 2009 +0100
+++ b/common/tools/summary/brag_script.pl Tue Sep 08 13:03:56 2009 +0100
@@ -8,12 +8,15 @@
# Symbian Foundation Ltd - initial contribution.
#
# Contributors:
-#
+# Arnaud Lenoir
+# Dario Sestito
# Description:
# Generate build summary with BRAG status
use Getopt::Long;
+use strict;
+# Data used for the script
my $buildid = '';
my $basedir = '';
my $help = 0;
@@ -23,33 +26,648 @@
'help!' => \$help
));
+#---------------------------------------------------------------------------------------
+# Files locations
+
+# Command to build a package build
+# F:\Dev\mercurial_local\bootstrap>perl build_package.pl --subproj=3k/mw/serviceapi
+
+#brag_script.pl location
+#F:\Dev\mercurial_local\pkgbuild\common\tools\summary
+# my package log files directory is: F:\fbf_job\serviceapi_3k.T014\output\logs
+# my platform log files directory is: F:\Dev\fbf_job\platform_MCL.PDK-101\output\logs
+
+# F:\fbf_job\serviceapi_3k.T014\output\logs
+# console_bootstrap_d+.txt empty file
+# console_sfbuildall_d+.txt empty file
+# serviceapi_3k.T014_ant_env.log
+
+# F:\fbf_project\serviceapi\sf-config
+# console_sfbuildall_32428.txt
+# console_sfprep_32428.txt
+# console_sfsummary_32428.txt
+
+# F:\Dev\fbf_job\platform_MCL.PDK-101\output\logs
+# platform_MCL.PDK-101_ant_env.log
+# in _ant_env.log
+# Do a search for env.ANT_CMD_LINE_ARGS to find out the type of build done as armv5, winscw, ...
+
+#---------------------------------------------------------------------------------------
+
+
+# If no parameters entered or help selected, display help
$help = 1 if (!$buildid or !$basedir);
if ($help)
{
print "Generate build summary with BRAG status\n";
print "Usage: perl brag_script.pl --buildid=ID --basedir=DIR\n";
+ print "Typical command line from script location: <perl brag_script.pl --buildid=serviceapi_3k.T014 --basedir=F:\\fbf_job>\n";
exit(0);
}
+# End section related to help
+# Determine build number
$buildid =~ /^([^_]*)_([^.]*)\./;
my $project = $1;
my $codeline = $2;
+# Define variable logdir
my $logdir = "$basedir\\$buildid\\output\\logs";
+# General data information
+print "\$builid = $buildid\n";
+print "\$basedir = $basedir\n";
+print "\$logdir = $logdir\n";
+print "\$project = $project\n";
+print "\$codeline = $codeline\n";
+
+open(BUILDSUMMARYHTML, ">$logdir\\build_summary.html"); # !!!!! First time we are accessing the file build_summary.html, therefore create it or replace it, AFTR THAT WE NEED TO APPEND IT ONLY!!!!!
+
+print BUILDSUMMARYHTML "#********** build_summary.html **********#<br/><br/><br/>";
+
+close(BUILDSUMMARYHTML); # Close file build_summary.html
+
+# *****************************************************************************
+# Construction "GENERAL STATUS" page in build_summary.html
+# *****************************************************************************
+
+# Fill html file with buildir data
+open(BUILDSUMMARYHTML, ">>$logdir\\build_summary.html"); # Open build_summary.html in APPEND MODE!
+
+print BUILDSUMMARYHTML "<br/>#************************************************#<br/><br/>";
+print BUILDSUMMARYHTML "<br/>#********** GENERAL STATUS starts here **********#<br/><br/>";
+print BUILDSUMMARYHTML "buildid_val=$buildid<br/>";
+print BUILDSUMMARYHTML "basedir_val=$basedir<br/>";
+print BUILDSUMMARYHTML "logdir_val=$logdir<br/>";
+print BUILDSUMMARYHTML "project_val=$project<br/>";
+print BUILDSUMMARYHTML "codeline_val=$codeline<br/>";
+
+# Calculate the number of files in the directory
opendir(DIR, $logdir);
my @dir_content = readdir(DIR);
close(DIR);
-#my @asSimilarDirs = grep(/^$sBaseName(\.|$)/, @asDirs);
+my $nbfilesinlogdir = scalar(@dir_content);
+print BUILDSUMMARYHTML "nbfilesinlogdir_val=$nbfilesinlogdir<br/>";
+
+# Define what we tried to build (target, winscw, armv5, TOOLS2, platform, package, ...)
+# Information in the file buildid_ant_env.log that can be found in the log directory
+
+# F:\Dev\fbf_job\platform_MCL.PDK-101\output\logs
+# platform_MCL.PDK-101_ant_env.log
+# in _ant_env.log
+# Do a search for env.ANT_CMD_LINE_ARGS to find out the type of build done as armv5, winscw, ...
+
+# Declare any variable that will need to be used globaly otherwise can't be used only between the curly brackets!
+my $antenvlog = "";
+
+#print "$logdir\\$buildid\_ant\_env\.log\n"; # Test to find out that _ and . need backslash up front to work
+my $antenvlogfile = "$logdir\\$buildid\_ant\_env\.log";
+print "$antenvlogfile\n";
+open (ANTENVLOG, "<$antenvlogfile");
+{
+ local $/=undef; # Technic used to get a file in one unique string accessible via a variable
+ $antenvlog = <ANTENVLOG>;
+}
+close(ANTENVLOG); # Close file $buildid_ant_env.log
+
+# List of data to extract from the file $buildid_ant_env.log
+#Fri Aug 14 17:04:54 BST 2009 on the second line of the file
+#base_release.getenv_options=-I tools
+#bom.log=\\\\v800008\\Builds01\\SF_builds\\platform\\builds\\MCL\\platform_MCL.PDK-101/logs/platform_MCL.PDK-101_bom.xml
+#build.family=platform or package ->DONE!!
+#build.id=platform_MCL.PDK-101 ->1st thing done in this script!!
+#build.name=platform or serviceapi ->DONE!!
+#build.number=PDK-101 ->DONE!!
+#build.version=MCL.PDK-101 ->DONE!!
+#core.build.version=MCL ->DONE!!
+#diamonds.host=v800002.ad-sfpd.intra ->DONE!!
+#env.ANT_CMD_LINE_ARGS=-Dhelium.dir "C\:\\Symbian\\Tools\\PDT_1.0\\helium" sf-build -Dbuild.drive m\: -Dsf.spec.job.codeline MCL -Dsf.spec.job.number PDK-101 -Dsf.project.location f\:\\\\Dev\\maintools\\build\\config\\foundation -Dsf.spec.job.rootdir f\:\\\\Dev\\fbf_job -Dsf.spec.sbs.config winscw_udeb.whatlog -Dsf.spec.test.sendpkg.enable false
+#env.COMPUTERNAME=UK-ARNAUDL ->DONE!!
+#env.USERNAME=arnaudl ->DONE!!
+#publish.dir=\\\\v800008\\Builds01\\SF_builds\\platform\\builds\\MCL\\platform_MCL.PDK-101 ->DONE!!
+#sf.spec.sbs.config=winscw ->DONE!!
+#sbs.config=armv5 ->DONE!!
+#sf.spec.baseline.enable=true ->DONE!!
+#sf.spec.baseline.getenv_options=-I tools
+#sf.spec.bccheck.baseline.s60.version=5.1 ->DONE!!
+#sf.spec.bccheck.enable=false ->DONE!!
+#sf.spec.build.target=all ->DONE!!
+#sf.spec.build.testcode.enable=false ->DONE!!
+#sf.spec.job.codeline=MCL ->Information already available under another name
+#sf.spec.job.number=PDK-101 ->Information already available under another name
+#sf.spec.sourcesync.enable=true ->DONE!!
+#sf.spec.test.epocroot=D\:\\ATS3\\winscw_smoketest
+#sf.spec.test.host.name=v800005 ->DONE!!
+#sf.spec.toolsbaseline.getenv_options=-i emu
+#user.country=GB ->Any use????
+
+
+# Data extraction
+# Type of Line to read is: "env.COMPUTERNAME=UK-ARNAUDL" with a end of line \\n character
+
+# env.COMPUTERNAME=UK-ARNAUDL
+if ($antenvlog =~ /env\.COMPUTERNAME=([^=]*)\n/)
+{
+ print "Computer name is: $1\n";
+ print BUILDSUMMARYHTML "computername_val=$1<br/>";
+}
+else
+{
+ print "Computer name is unknown\n";
+ print BUILDSUMMARYHTML "computername_val=?<br/>";
+}
+
+#env.USERNAME=arnaudl
+if ($antenvlog =~ /env\.USERNAME=([^=]*)\n/)
+{
+ print "User name is: $1\n";
+ print BUILDSUMMARYHTML "username_val=$1<br/>";
+}
+else
+{
+ print "user name is unknown\n";
+ print BUILDSUMMARYHTML "username_val=?<br/>";
+}
+
+#build.family=platform or package
+if ($antenvlog =~ /build\.family=([^=]*)\n/)
+{
+ print "Build family is: $1\n";
+ print BUILDSUMMARYHTML "buildfamily_val=$1<br/>";
+}
+else
+{
+ print "Build family is unknow\n";
+ print BUILDSUMMARYHTML "buildfamily_val=?<br/>";
+}
+
+#build.name=platform or serviceapi
+if ($antenvlog =~ /build\.name=([^=]*)\n/)
+{
+ print "Build name is: $1\n";
+ print BUILDSUMMARYHTML "buildname_val=$1<br/>";
+}
+else
+{
+ print "Build name is unknow\n";
+ print BUILDSUMMARYHTML "buildname_val=?<br/>";
+}
+
+#diamonds.host=v800002.ad-sfpd.intra - Define the server used
+if ($antenvlog =~ /diamonds\.host=([^=]*)\n/)
+{
+ print "Build server used is: $1\n";
+ print BUILDSUMMARYHTML "buildserver_val=$1<br/>";
+}
+else
+{
+ print "Build server used is unknown\n";
+ print BUILDSUMMARYHTML "buildserver_val=?<br/>";
+}
-my $nfiles = scalar(@dir_content);
+#build.version=MCL.PDK-101
+if ($antenvlog =~ /build\.version=([^=]*)\n/)
+{
+ print "Build version is: $1\n";
+ print BUILDSUMMARYHTML "buildversion_val=$1<br/>";
+}
+else
+{
+ print "Build version is unknown\n";
+ print BUILDSUMMARYHTML "buildversion_val=?<br/>";
+}
+
+#build.number=PDK-101
+if ($antenvlog =~ /build\.number=([^=]*)\n/)
+{
+ print "Build number is: $1\n";
+ print BUILDSUMMARYHTML "buildnumber_val=$1<br/>";
+}
+else
+{
+ print "Build number is unknown\n";
+ print BUILDSUMMARYHTML "buildnumber_val=?<br/>";
+}
+
+#core.build.version=MCL
+if ($antenvlog =~ /core\.build\.version=([^=]*)\n/)
+{
+ print "Core build version is: $1\n";
+ print BUILDSUMMARYHTML "corebuildversion_val=$1<br/>";
+}
+else
+{
+ print "Core build version is unknown\n";
+ print BUILDSUMMARYHTML "corebuildversion_val=?<br/>";
+}
+
+#publish.dir=\\\\v800008\\Builds01\\SF_builds\\platform\\builds\\MCL\\platform_MCL.PDK-101
+if ($antenvlog =~ /publish\.dir=([^=]*)\n/)
+{
+ print "Publish directory is: $1\n";
+ print BUILDSUMMARYHTML "publishdir_val=$1<br/>";
+}
+else
+{
+ print "Publish directory is unknown\n";
+ print BUILDSUMMARYHTML "publishdir_val=?<br/>";
+}
+
+#sf.spec.baseline.enable=true
+if ($antenvlog =~ /sf\.spec\.baseline\.enable=([^=]*)\n/)
+{
+ print "Baseline retrieval enabled?:: $1\n";
+ print BUILDSUMMARYHTML "baselineretrievalen_val=$1<br/>";
+}
+else
+{
+ print "Baseline retrieval status is unknown\n";
+ print BUILDSUMMARYHTML "baselineretrievalen_val=?<br/>";
+}
+
+#sf.spec.sourcesync.enable=true
+if ($antenvlog =~ /sf\.spec\.sourcesync\.enable=([^=]*)\n/)
+{
+ print "Source code sync enabled?: $1\n";
+ print BUILDSUMMARYHTML "sourcecodesyncen_val=$1<br/>";
+}
+else
+{
+ print "Source code sync status is unknown\n";
+ print BUILDSUMMARYHTML "sourcecodesyncen_val=?<br/>";
+}
+
+#sf.spec.build.testcode.enable=false
+# Smoke tests????? SALT tests????
+if ($antenvlog =~ /sf\.spec\.build\.testcode\.enable=([^=]*)\n/)
+{
+ print "Tests execution enabled?: $1\n";
+ print BUILDSUMMARYHTML "testexecutionen_val=$1<br/>";
+}
+else
+{
+ print "Tests execution status is unknown\n";
+ print BUILDSUMMARYHTML "testexecutionen_val=?<br/>";
+}
+
+#sf.spec.test.host.name=v800005
+if ($antenvlog =~ /sf\.spec\.test\.host\.name=([^=]*)\n/)
+{
+ print "Tests host server is: $1\n";
+ print BUILDSUMMARYHTML "testhostserver_val=$1<br/>";
+}
+else
+{
+ print "Tests host server is unknown\n";
+ print BUILDSUMMARYHTML "testhostserver_val=?<br/>";
+}
+
+#sf.spec.bccheck.enable=false
+if ($antenvlog =~ /sf\.spec\.bccheck\.enable=([^=]*)\n/)
+{
+ print "BCC check enabled?: $1\n";
+ print BUILDSUMMARYHTML "bccchecken_val=$1<br/>";
+}
+else
+{
+ print "BCC check status is unknown\n";
+ print BUILDSUMMARYHTML "bccchecken_val=?<br/>";
+}
+
+#sf.spec.bccheck.baseline.s60.version=5.1
+if ($antenvlog =~ /sf\.spec\.bccheck\.baseline\.s60\.version=([^=]*)\n/)
+{
+ print "BCC check S60 baseline version used is: $1\n";
+ print BUILDSUMMARYHTML "bccchecks60baselinever_val=$1<br/>";
+}
+else
+{
+ print "BCC check S60 baseline version used is unknown\n";
+ print BUILDSUMMARYHTML "bccchecks60baselinever_val=?<br/>";
+}
-open(FILE, ">$logdir\\build_summary.html");
-print FILE "<html><body>build summary<br/>build id: $buildid<br/>log files: $nfiles</body></html>";
-close(FILE);
+#sbs.config=armv5 possible values are armv5 (default) and winscw
+if ($antenvlog =~ /sbs\.config=([^=]*)\n/)
+{
+ print "SBS config is: $1\n";
+ print BUILDSUMMARYHTML "sbsconfig_val=$1<br/>";
+}
+else
+{
+ print "SBS config is unknown\n";
+ print BUILDSUMMARYHTML "sbsconfig_val=?<br/>";
+}
+
+#sf.spec.sbs.config=winscw
+if ($antenvlog =~ /sf\.spec\.sbs\.config=([^=]*)\n/)
+{
+ print "Specific SBS config is: $1\n";
+ print BUILDSUMMARYHTML "specsbsconfig_val=$1<br/>";
+}
+else
+{
+ print "Specific SBS config is unknown\n";
+ print BUILDSUMMARYHTML "specsbsconfig_val=?<br/>";
+}
+
+#sf.spec.build.target=all
+if ($antenvlog =~ /sf\.spec\.build\.target=([^=]*)\n/)
+{
+ print "specific build target is: $1\n";
+ print BUILDSUMMARYHTML "specificbuildtarget_val=$1<br/>";
+}
+else
+{
+ print "specific build target is: unknown\n";
+ print BUILDSUMMARYHTML "specificbuildtarget_val=?<br/>";
+}
+
+# Extract data to define the type build done
+# Find out what is expected to be done and what has been actually done.
+# name="WINS" abldTarget="wins" description="MSVC Compiler"
+# name="WINS_REL" abldTarget="wins urel" description="MSVC Compiler"
+# name="WINS_DEB" abldTarget="wins udeb" description="MSVC Compiler"
+# name="WINSCW" abldTarget="winscw" description="CodeWarrior Compiler"
+# name="WINSCW_REL" abldTarget="winscw urel" description="CodeWarrior Compiler"
+# name="WINSCW_DEB" abldTarget="winscw udeb" description="CodeWarrior Compiler"
+# name="TOOLS" abldTarget="tools" description="MSVC Compiler for Tools"
+# name="TOOLS_REL" abldTarget="tools rel" description="MSVC Compiler for Tools Release mode only"
+# name="TOOLS2" abldTarget="tools2" description="MinGW GCC Compiler for Tools"
+# name="TOOLS2_REL" abldTarget="tools2 rel" description="MinGW GCC Compiler for Tools Release mode only"
+# name="ARMV5" abldTarget="armv5" description="RVCT Compiler"
+# name="ARMV5_REL" abldTarget="armv5 urel" description="RVCT Compiler"
+# name="ARMV5_DEB" abldTarget="armv5 udeb" description="RVCT Compiler"
+
+
+#-------------
+# End data extraction from the file $buildid_ant_env.log
+#-------------
+
+print BUILDSUMMARYHTML "<br/>#********** GENERAL STATUS ends here **********#<br/><br/>";
+
+close(BUILDSUMMARYHTML); # Close file build_summary.html
+
+# *****************************************************************************
+# Construction "SUMMARISE" page in build_summary.html
+# *****************************************************************************
+
+# Build info - Describe the completion of the diffrent steps in the build process
+
+# Fill html file with buildir data
+open(BUILDSUMMARYHTML, ">>$logdir\\build_summary.html"); # Open build_summary.html in APPEND MODE!
+
+# Indicates beginning of the SUMMARISE section in the file
+print BUILDSUMMARYHTML "<br/>#*******************************************#<br/><br/>";
+print BUILDSUMMARYHTML "<br/>#********** SUMMARISE starts here **********#<br/><br/>";
+
+#{ # Used for local $/=undef
+#local $/=undef; # indicates that the file will be put in one variable as one string
+#
+## Find the string "BUILD SUCCESSFUL" in the file console_bootstrap_\d+\.txt
+## 1st open file
+#open (CONSOLEBOOTSTRAP, "<$logdir\\console_bootstrap_\d+\.txt");
+#
+#my $searchconsolebootstrap= <CONSOLEBOOTSTRAP>; # Copy the full file in one string because of /$=undef
+#
+#if ($searchconsolebootstrap =~ /BUILD SUCCESSFUL/){
+# print "Found string BUILD SUCCESSFUL\n";
+# print BUILDSUMMARYHTML "BuildSuccessful_val=Yes<br/>";
+# }
+# else {
+# print "Can't Find string BUILD SUCCESSFUL\n";
+# print BUILDSUMMARYHTML "BuildSuccessful_val=No<br/>";
+# }
+#
+#close (CONSOLEBOOTSTRAP); # Close file console_bootstrap_\d+\.txt
+## End - Find the string "BUILD SUCCESSFUL" in the file console_bootstrap_\d+\.txt
+#
+## Check all the intermediate steps of the build process
+## 1st open file console_sfbuildall_\d+\.txt
+#open (CONSOLESFBUILDALL, "<$logdir\\console_sfbuildall_\d+\.txt");
+#
+#my $searchconsolesfbuildall= <CONSOLESFBUILDALL>; # Copy the full file in one string because of /$=undef
+#
+#if ($searchconsolesfbuildall =~ /x/){
+# print "Found string x\n";
+# print BUILDSUMMARYHTML "x=Yes<br/>";
+# }
+# else {
+# print "Can't Find string x\n";
+# print BUILDSUMMARYHTML "x=No<br/>";
+# }
+#
+#close (CONSOLESFBUILDALL); # Close file console_sfbuildall_\d+\.txt
+#} # End use for local $/=undef
+
+# Declare any variable that will need to be used globaly otherwise can't be used only between the curly brackets!
+my $targettimeslog = "";
+
+{ # Used for local $/=undef
+local $/=undef; # indicates that the file will be put in one variable as one string
+
+# The file targetTimesLog.csv contains all the information relative to the build process including time needed for each steps (generated by helium script)
+# This file is available whatever the build we want to do (platform or package)
+my $targettimeslogfile = "$logdir\\targetTimesLog\.csv";
+print "$targettimeslogfile\n";
+open (TARGETTIMESLOG, "<$targettimeslogfile");
+{
+ local $/=undef; # Technic used to get a file in one unique string accessible via a variable
+ $targettimeslog = <TARGETTIMESLOG>;
+}
+close (TARGETTIMESLOG); # Close file targetTimesLog.csv
+} # End use for local $/=undef
+
+# Extract useful data from the file targettimeslog.csv
+# step, time in second to do the operation
+
+# For sure
+#"^preparation-getenv:$" - the baseline retrieval starts
+#preparation-getenv,1417
+if ($targettimeslog =~ /(preparation-getenv[^,]*),(\d+[^,]*)\n/)
+{
+ print "Baseline retrieval started: OK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "baselineretrievalstarted_val=yes<br/>baselineretrievalstarted_duration=$2<br/>";
+}
+else
+{
+ print "Baseline retrieval started: NOK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "baselineretrievalstarted_val=no<br/>baselineretrievalstarted_duration=?<br/>";
+}
+
+#"^\s+[exec] .+: done fetching environment$" - the baseline retrieval ends
+#????
+#"^sf-prebuild-0:$" - the source code sync starts
+#sf-prebuild-0,363
+if ($targettimeslog =~ /(sf-prebuild[^,]*),(\d+[^,]*)\n/)
+{
+ print "Source code sync started: OK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "sourcecodestarted_val=yes<br/>sourcecodestarted_duration=$2<br/>";
+}
+else
+{
+ print "Source code sync started: NOK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "sourcecodestarted_val=no<br/>sourcecodestarted_duration=?<br/>";
+}
+
+#"^sf-unpack-rnd:$" - source code sync ends
+#sf-unpack-rnd,20
+if ($targettimeslog =~ /(sf-unpack[^,]*),(\d+[^,]*)\n/)
+{
+ print "Source code sync ended: OK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "sourcecodeended_val=yes<br/>sourcecodeended_duration=$2<br/>";
+}
+else
+{
+ print "Source code sync ended: NOK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "sourcecodeended_val=no<br/>sourcecodeended_duration=?<br/>";
+}
+
+#"^sf-compile:$" - compilation starts
+#sf-compile,3
+if ($targettimeslog =~ /(sf-compile[^,]*),(\d+[^,]*)\n/)
+{
+ print "Compilation startd: OK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "commpilationstarted_val=yes<br/>commpilationstarted_duration=$2<br/>";
+}
+else
+{
+ print "Compilation startd: NOK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "commpilationstarted_val=no<br/>commpilationstarted_duration=?<br/>";
+}
+
+#"^sf-postbuild:$" - compilation ends
+#sf-postbuild,0
+if ($targettimeslog =~ /(sf-postbuild[^,]*),(\d+[^,]*)\n/)
+{
+ print "Compilation ended: OK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "compilationended_val=yes<br/>compilationended_duration=$2<br/>";
+}
+else
+{
+ print "Compilation ended: NOK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "compilationended_val=no<br/>compilationended_duration=?<br/>";
+}
+
+#"^sf-run-analysis:$" - analysis starts
+#sf-run-analysis-raptor,1
+if ($targettimeslog =~ /(sf-run-analysis-raptor[^,]*),(\d+[^,]*)\n/)
+{
+ print "Analysis started: OK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "analysisstarted_val=yes<br/>analysisstarted_duration=$2<br/>";
+}
+else
+{
+ print "Analysis started: NOK \$1= $1, \$2= $2\n";
+ print BUILDSUMMARYHTML "analysisstarted_val=no<br/>analysisstarted_duration=?<br/>";
+}
+
+# Maybe????????
+
+#"^sf-zip-logs:$" - analysis ends
+#sf-zip-content,8
+#?????
+
+
+#"^publish:$" - publication starts
+#????
+
+#"\[copy\] Copying \d+ files to \\\\v800008\\Builds01\\SF_builds\\" - publication ends
+#????
+
+#BRAG
+#sf-summary,5
+#?????
+
+# End - Check all the intermediate steps of the build process
+
+# Copy Raptor summarise by DarioS
+{
+local $/=undef; # indicates that the file will be put in one variable as one string
+open(RAPTORSUMINDEX, "<$logdir\\html\\index.html");
+
+my $filecontent = <RAPTORSUMINDEX>;
+
+
+# Like index.html will be called from the build_summary.html file, this means that is not calling the sub html file from the same directory \html.
+# When copy index.html in the file build_summary.html, we need to include the path to \html directory
+# We have:
+# file:///F:/fbf_job/serviceapi_3k.T014/output/logs/raptor_unreciped.html
+# We need:
+# file:///F:/fbf_job/serviceapi_3k.T014/output/logs/html/raptor_unreciped.html
+# This means we need to go from:
+# <tr><td><a href='raptor_unreciped.html'>raptor_unreciped</a></td><td>0</td><td>0</td><td>190</td><td>0</td></tr>
+# To:
+# <tr><td><a href='html\raptor_unreciped.html'>raptor_unreciped</a></td><td>0</td><td>0</td><td>190</td><td>0</td></tr>
+$filecontent =~ s/href=\'/href=\'html\\/ig;
+
+print BUILDSUMMARYHTML "<br/>$filecontent<br/>"; # copy the content of the index.html file into the build_summary.html file.
+
+close (RAPTORSUMINDEX);
+}
+
+# Copy html files for raptor summarise to bishare
+# options used for xcopy
+# /E -> Copies directories and subdirectories, including empty ones.
+# /F -> Displays full source and destination file names while copying.
+# /I -> If destination does not exist and copying more than one file, assumes that destination must be a directory.
+my $copy_html = "xcopy $logdir\\html \\\\bishare\\sf_builds\\$project\\builds\\$codeline\\$buildid\\html \/E \/F \/I";
+print "Exec: $copy_html\n";
+system($copy_html);
+
+
+# Indicates end of the SUMMARISE section in the file
+print BUILDSUMMARYHTML "<br/>#********** SUMMARISE ends here **********#<br/><br/>";
+
+close(BUILDSUMMARYHTML); # Close build_summary.html
+
+# End - Build info - Describe the completion of the diffrent steps in the build process
+
+
+# *****************************************************************************
+# Construction "DATA BREAKDOWN" page in build_summary.html
+# *****************************************************************************
+
+# Hyperlink to log files
+open(BUILDSUMMARYHTML, ">>$logdir\\build_summary.html"); # Open build_summary.html in APPEND MODE!
+
+# Indicates beginning of DATA BREAKDOWN section in the file
+print BUILDSUMMARYHTML "<br/>#************************************************#<br/><br/>";
+print BUILDSUMMARYHTML "<br/>#********** DATA BREAKDOWN starts here **********#<br/><br/>";
+
+
+# Get tree for the directory where the log files are (bishare probably the best place???)
+# Should be already exported there, but maybe in a zip file)
+# Extract each file with directory, then create a hyperlink to that file to make sure that user can click on the link and open the file!
+
+
+#ex: platform_MCL.PDK-101_summary.log.xml
+#######print FILE "buildid_summary.log.xml=<a class ="hoverlink" href ="file://///$logdir/$buildid_summary.log.xml">$buildid_summary.log.xml<br>";
+
+# example of html hyperlink
+#<a class ="hoverlink" href ="file://///builds01/devbuilds/MasterSF/logs/MSF00159_Symbian_OS_vtb92sf/MSF00159_Symbian_OS_vtb92sf.summary.html#AdvisoryNotesByComponent_Scan for S60 distribution policy files">Scan for S60 distribution policy files (1162) <br></a></td>
+#<a class ="hoverlink" href ="file://///builds01/devbuilds/MasterSF/MSF00159_Symbian_OS_vtb92sf/logs/GT.summary.html#errorsByComponent_SBS: Error">SBS: Error (4) <br></a></td>
+#<a class ="hoverlink" href ="file://///builds01/devbuilds/MasterSF/MSF00159_Symbian_OS_vtb92sf/logs/MSF00159_Symbian_OS_vtb92sf_cbr.summary.html#AdvisoryNotesByOverall_Total">Total (1) <br></a></td>
+#<a class ="hoverlink" href="file://///builds01/devbuilds/MasterSF/logs/MSF00159_Symbian_OS_vtb92sf/AutoSmokeTest/EMULATOR/WINSCW/Test Summary Report.htm">WINSCW ( EMULATOR ) </a></td><td>
+
+# All log files hyperlink have been created, close build_summary.html
+
+
+# Indicates end of DATA BREAKDOWN section in the file
+print BUILDSUMMARYHTML "<br/>#********** DATA BREAKDOWN ends here **********#<br/><br/>";
+print BUILDSUMMARYHTML "<br/>#********** summary_build.html ends here ******#<br/><br/>";
+
+close(BUILDSUMMARYHTML); # Close file build_summary.html
+
+
+
+# *****************************************************************************
+# Final step, copy build_summary.html to \\bishare drive
+# *****************************************************************************
+
+# Copy html file to bishare
my $copy_cmd = "copy $logdir\\build_summary.html \\\\bishare\\sf_builds\\$project\\builds\\$codeline\\$buildid";
print "Exec: $copy_cmd\n";
system($copy_cmd);
--- a/sf-platform/build.xml Wed Aug 26 14:40:58 2009 +0100
+++ b/sf-platform/build.xml Tue Sep 08 13:03:56 2009 +0100
@@ -25,10 +25,10 @@
<target name="sf-platform-bootstrap" depends="sf-platform-bootstrap-gt,sf-platform-bootstrap-s60"/>
<target name="sf-platform-bootstrap-gt" >
- <echo>[SF-platform-bootstrap-gt] Warning: hard-coded to tb91!</echo>
+ <echo>[SF-platform-bootstrap-gt]</echo>
<!-- do initial stuff to get raptor working -->
- <copy file="${build.drive}/sf/os/deviceplatformrelease/symbianosbld/cedarutils/Symbian_OS.hrh" tofile="${build.drive}/epoc32/include/variant/Symbian_OS.hrh" failonerror="true" verbose="true" />
- <copy file="${build.drive}/sf/os/deviceplatformrelease/symbianosbld/cedarutils/Symbian_OS_vtb91sf.cfg" tofile="${build.drive}/epoc32/tools/variant/variant.cfg" failonerror="true" verbose="true" preservelastmodified="true" />
+ <copy file="${build.drive}/${sf.spec.bldmefirst.gt.hrh}" tofile="${build.drive}/epoc32/include/variant/Symbian_OS.hrh" failonerror="true" verbose="true" />
+ <copy file="${build.drive}/${sf.spec.bldmefirst.gt.variant}" tofile="${build.drive}/epoc32/tools/variant/variant.cfg" failonerror="true" verbose="true" preservelastmodified="true" />
</target>
<target name="sf-platform-bootstrap-s60" >
@@ -150,6 +150,7 @@
<hlm:arg name="config" value="tools2_rel.whatlog" />
<hlm:arg name="singlejob" value="false" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
+ <hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
</hlm:argSet>
<hlm:argSet id="sbs.tools2.clean.var">
@@ -163,6 +164,7 @@
<hlm:arg name="config" value="tools_rel.whatlog" />
<hlm:arg name="singlejob" value="true" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
+ <hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
</hlm:argSet>
<hlm:argSet id="sbs.tools.clean.var">
@@ -175,6 +177,7 @@
<hlm:argSet id="sbs.main.sbs.var">
<hlm:arg name="config" value="${sf.spec.sbs.config}" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
+ <hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
</hlm:argSet>
<hlm:argSet id="sbs.main.clean.sbs.var">
@@ -294,6 +297,7 @@
<hlm:argSet id="sbs.main.iterate.sbs.var">
<hlm:arg name="config" value="@{sf.spec.sbs.splitconfig}" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
+ <hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
</hlm:argSet>
<antcall target="compile-main" inheritAll="false" inheritRefs="true">
<param name="build.system" value="${sf.spec.build.system}" />
@@ -362,6 +366,7 @@
<hlm:arg name="config" value="${sf.spec.sbs.tools.config}" />
<hlm:arg name="singlejob" value="true" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
+ <hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
</hlm:argSet>
<hlm:argSet id="sbs.tools.clean.var">
@@ -373,6 +378,7 @@
<hlm:argSet id="sbs.main.sbs.var">
<hlm:arg name="config" value="${sf.spec.sbs.config}" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
+ <hlm:arg name="retry-limit" value="${sf.spec.sbs.retry.limit}" />
</hlm:argSet>
<hlm:argSet id="sbs.main.clean.sbs.var">
@@ -381,7 +387,7 @@
<hlm:arg name="command" value="CLEAN --check" />
</hlm:argSet>
- <hlm:argSet id="sbs.main.what.sbs.var">
+ <hlm:argSet id="sbs.main.what.sbs.var">
<hlm:arg name="config" value="${sf.spec.sbs.config}" />
<hlm:arg name="enable-filter" value="${sf.spec.logs.raptorfilter.enable}" />
<hlm:arg name="command" value="WHAT" />