--- a/sbsv2/raptor/bin/recipestats.py Thu Apr 15 18:47:48 2010 +0100
+++ b/sbsv2/raptor/bin/recipestats.py Fri Apr 16 19:03:20 2010 +0100
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
@@ -18,8 +18,18 @@
# e.g. total times and so on.
import time
+import __future__
class RecipeStats(object):
+ def __init__(self, name, count, time):
+ self.name=name
+ self.count=count
+ self.time=time
+
+ def add(self, duration):
+ self.time += duration
+
+class BuildStats(object):
STAT_OK = 0
@@ -31,7 +41,7 @@
self.retryfails = 0
def add(self, starttime, duration, name, status):
- if status != RecipeStats.STAT_OK:
+ if status != BuildStats.STAT_OK:
self.failcount += 1
if name in self.failtypes:
self.failtypes[name] += 1
@@ -43,15 +53,16 @@
return
if name in self.stats:
- (count, time) = self.stats[name]
- self.stats[name] = (count + 1, time + duration)
+ r = self.stats[name]
+ r.add(duration)
else:
- self.stats[name] = (1,duration)
+ self.stats[name] = RecipeStats(name,1,duration)
def recipe_csv(self):
- s = "# name, time, count\n"
- for (name,(count,time)) in self.stats.iteritems():
- s += '"%s",%s,%d\n' % (name, str(time), count)
+ s = '"name", "time", "count"\n'
+ l = sorted(self.stats.values(), key= lambda r: r.time, reverse=True)
+ for r in l:
+ s += '"%s",%s,%d\n' % (r.name, str(r.time), r.count)
return s
@@ -62,7 +73,7 @@
def main():
f = sys.stdin
- st = RecipeStats()
+ st = BuildStats()
recipe_re = re.compile(".*<recipe name='([^']+)'.*")
time_re = re.compile(".*<time start='([0-9]+\.[0-9]+)' *elapsed='([0-9]+\.[0-9]+)'.*")
@@ -111,7 +122,7 @@
st.add(s, elapsed, rname, status)
- print st.recipe_csv()
+ print(st.recipe_csv())
if __name__ == '__main__': main()
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm Thu Apr 15 18:47:48 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Fri Apr 16 19:03:20 2010 +0100
@@ -48,7 +48,7 @@
ifeq ($(DOBUILD),1)
-$(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
+$(if $(FLMDEBUG),$(info <debug><flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' /></debug>))
# Strip switch-type parameters
#
--- a/sbsv2/raptor/lib/flm/resource.flm Thu Apr 15 18:47:48 2010 +0100
+++ b/sbsv2/raptor/lib/flm/resource.flm Fri Apr 16 19:03:20 2010 +0100
@@ -155,7 +155,8 @@
# It allows resources to be built in the right order but doesn't impose the weight of
# of full dependency information which can overwhelm make in large builds.
# The strategy is to filter out lines (apart from the target line which is the first) which don't have .rsg or
- # .mbg dependencies in them.
+ # .mbg dependencies in them. The first line can sometimes not contain the target but
+ # have a lonely "\" so we use a pattern to recognise the target line in order not to get confused.
DEPENDENCY_CORRECTOR:={ $(GNUSED) -n -r '/.*: +.$$$$/ p;\%\.((rsg)|(mbg))%I {s% ([^ \/]+\.((rsg)|(mbg)))% __EPOCROOT\/epoc32\/include\/\1%ig;s% [^_][^_][^E][^ ]+%%g;s%__EPOCROOT%$(EPOCROOT)%g; p}' && echo "" ; }
else
# Generate full dependency information
@@ -229,8 +230,8 @@
ifeq ($(TARGET_$(call sanitise,$1)),)
TARGET_$(call sanitise,$1):=1
- $(if $(FLMDEBUG),$(info generateresource: $(1) from $(2) LANG:$(3)),)
- $(if $(FLMDEBUG),$(info generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS)))))
+ $(if $(FLMDEBUG),$(info <debug>generateresource: $(1) from $(2) LANG:$(3)</debug>),)
+ $(if $(FLMDEBUG),$(info <debug>generateresource: copies: $(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS)))</debug>))
CLEANTARGETS:=$$(CLEANTARGETS) $(1)
--- a/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp Thu Apr 15 18:47:48 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/resource/group/testresource.mmp Fri Apr 16 19:03:20 2010 +0100
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"