--- a/common/build.xml Wed Aug 19 16:13:04 2009 +0100
+++ b/common/build.xml Wed Aug 19 18:13:24 2009 +0100
@@ -63,26 +63,48 @@
<import file="${sf.common.config.dir}/generated/source-spec.ant.xml"/>
</then>
</if>
-
<target name="sf-prep" depends="prep-drive,init-build-area,sf-generate-source-spec,check-tool-dependencies,create-bom,log-build-env">
<echo>[SF-PREP]</echo>
+ <!-- Test for the disk space we would like for this build -->
+ <fail>
+ <condition>
+ <not>
+ <or>
+ <isset property="sf.suppress.drive.space.check"/>
+ <hasfreespace partition="${build.drive}" needed="${sf.drive.space.needed}"/>
+ </or>
+ </not>
+ </condition>
+Insufficient space to run this build to completion. (Was looking for ${sf.drive.space.needed}.) To suppress this check, set the property sf.suppress.drive.space.check to any value.
+ </fail>
+
<tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
- <echo message="Checking build Environment"/>
- <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
+ <echo message="Checking build Environment"/>
+ <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true">
<arg value="CheckBuildEnv.pl"/>
<arg value="--xml=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>
+ <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>
+ <target name="sf-summary" depends="">
+ <echo>[SF-SUMMARY]</echo>
+ <echo message="Generating build summary"/>
+ <exec executable="perl" dir="${sf.common.config.dir}/tools/summary" failonerror="true">
+ <arg value="brag_script.pl"/>
+ <arg value="--buildid=${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/>
+ <arg value="--basedir=${sf.spec.job.rootdir}"/>
+ </exec>
+ </target>
+
<target name="sf-build-and-pack" depends="sf-build-noprep,sf-postbuild">
<echo>[SF-BUILD-AND-PACK]</echo>
</target>
--- a/common/common_props.ant.xml Wed Aug 19 16:13:04 2009 +0100
+++ b/common/common_props.ant.xml Wed Aug 19 18:13:24 2009 +0100
@@ -2,6 +2,8 @@
<project name="SF-COMMON-PROPS" >
+ <property name="sf.drive.space.needed" value="0"/>
+
<property name="sf.project.type" value="package"/>
<property name="sf.spec.job.name" value="myproduct"/>
@@ -13,7 +15,6 @@
<property name="sf.spec.email.from" value="fbf@symbian.org"/> <!-- needs to be defined for S60 platform builds -->
<property name="sf.spec.systemdefinition.assemble" value="true"/>
- <!-- property name="sf.spec.systemdefinition.file" value=""/ -->
<property name="sf.spec.pdt.root" value="${env.PDT_HOME}"/> <!-- e.g. C:\Symbian\Tools\PDT_1.0\ -->
@@ -28,8 +29,6 @@
<property name="sf.spec.build.productioncode.enable" value="true"/>
<property name="sf.spec.build.testcode.enable" value="false"/>
<property name="sf.spec.build.system" value="sbs"/> <!-- sbs|ebs|ec -->
- <!-- property name="sf.spec.build.sbsv2.config" value=""/ -->
- <!-- property name="sf.spec.build.sbsv2.options" value="-k"/ -->
<property name="sf.spec.build.clean.enable" value="false"/>
<property name="sf.spec.sysdef.configurations.list" value="s60_build,s60_bldmelast"/>
--- a/common/diamonds/sf-run-analysis.xml.ftl Wed Aug 19 16:13:04 2009 +0100
+++ b/common/diamonds/sf-run-analysis.xml.ftl Wed Aug 19 18:13:24 2009 +0100
@@ -32,6 +32,11 @@
<name>Raptor summary</name>
<url>file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\logs\raptorbits\summary.csv</url>
</file>
+ <file>
+ <type>log</type>
+ <name>Build Summary</name>
+ <url>file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\build_summary.html</url>
+ </file>
</files>
</diamonds-build>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/common/tools/summary/brag_script.pl Wed Aug 19 18:13:24 2009 +0100
@@ -0,0 +1,57 @@
+# 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 build summary with BRAG status
+
+use Getopt::Long;
+
+my $buildid = '';
+my $basedir = '';
+my $help = 0;
+GetOptions((
+ 'buildid=s' => \$buildid,
+ 'basedir=s' => \$basedir,
+ 'help!' => \$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";
+ exit(0);
+}
+
+$buildid =~ /^([^_]*)_([^.]*)\./;
+my $project = $1;
+my $codeline = $2;
+
+my $logdir = "$basedir\\$buildid\\output\\logs";
+
+opendir(DIR, $logdir);
+my @dir_content = readdir(DIR);
+close(DIR);
+#my @asSimilarDirs = grep(/^$sBaseName(\.|$)/, @asDirs);
+
+my $nfiles = scalar(@dir_content);
+
+
+open(FILE, ">$logdir\\build_summary.html");
+print FILE "<html><body>build summary<br/>build id: $buildid<br/>log files: $nfiles</body></html>";
+close(FILE);
+
+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-package/package_props.ant.xml Wed Aug 19 16:13:04 2009 +0100
+++ b/sf-package/package_props.ant.xml Wed Aug 19 18:13:24 2009 +0100
@@ -2,6 +2,8 @@
<project name="SF-PACKAGE-PROPS">
+ <property name="sf.drive.space.needed" value="10G"/>
+
<property name="sf.spec.baseline.enable" value="true"/>
<property name="sf.spec.baseline.select" value="location"/>
<property name="sf.spec.baseline.location" value="\\bishare\Releases\PDK_candidate_2.0.d_flat"/>
--- a/sf-platform/build.xml Wed Aug 19 16:13:04 2009 +0100
+++ b/sf-platform/build.xml Wed Aug 19 18:13:24 2009 +0100
@@ -3,6 +3,15 @@
<!-- location of this config -->
<dirname property="sf.platform.config.dir" file="${ant.file.SF-PLATFORM-CONFIG}"/>
+ <!-- import package properties -->
+ <import file="${sf.platform.config.dir}/platform_props.ant.xml" optional="true"/>
+
+ <!-- import common properties/targets/references -->
+ <import file="../common/build.xml" />
+
+ <!-- import package references -->
+ <import file="${sf.platform.config.dir}/platform_refs.ant.xml" optional="true"/>
+
<!--
* Property defaults
-->
@@ -448,8 +457,5 @@
</target>
- <!-- import sf-common-config -->
- <import file="../common/build.xml" />
-
</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-platform/platform_props.ant.xml Wed Aug 19 18:13:24 2009 +0100
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<project name="SF-PLATFORM-PROPS">
+
+ <property name="sf.drive.space.needed" value="150G"/>
+
+</project>
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sf-platform/platform_refs.ant.xml Wed Aug 19 18:13:24 2009 +0100
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+
+<project name="SF-PLATFORM-REFS">
+
+</project>