# HG changeset patch # User Iain Williamson # Date 1274117633 -3600 # Node ID 245c03ee6e9cde743afb07864fa361b92a6ba5c4 # Parent 3a62f88a49f8b22a88e00f72a9ccbfec3c930822# Parent be0305eb3dc3265207d6eb9bc37f761df0110a84 Merge diff -r 3a62f88a49f8 -r 245c03ee6e9c .hgtags --- a/.hgtags Mon May 17 18:27:21 2010 +0100 +++ b/.hgtags Mon May 17 18:33:53 2010 +0100 @@ -7,3 +7,10 @@ 7006bcce52990f33d0c20c51bebc2b58ed36db60 stable 7006bcce52990f33d0c20c51bebc2b58ed36db60 stable 679d97112f986e16e9dbed3f7a016388d42e04f8 stable +679d97112f986e16e9dbed3f7a016388d42e04f8 2.13.0 +7006bcce52990f33d0c20c51bebc2b58ed36db60 2.12.5 +976aca38ffe5ce30d7753ea77a8de44e5cbd0dc8 2.12.4 +4e477ddf2eed2b478793a7c7ff22320e5ee6ce21 2.12.1 +2bc875af320017a5952adb544e78306e7807865c 2.12.0 +007900c31eef0363e705cf15d131740d4eeb6208 2.12.3 +1e23e973ab856a45d9e3e2dcd9a72a9e466c03c7 2.12.2 diff -r 3a62f88a49f8 -r 245c03ee6e9c bintools/elftools/group/elftran.mmp --- a/bintools/elftools/group/elftran.mmp Mon May 17 18:27:21 2010 +0100 +++ b/bintools/elftools/group/elftran.mmp Mon May 17 18:33:53 2010 +0100 @@ -45,5 +45,5 @@ source byte_pair.cpp pagedCompress.cpp systeminclude ../inc /epoc32/include ../../../imgtools/imglib/compress /epoc32/include/tools/ - +OS_LAYER_SYSTEMINCLUDE VENDORID 0x70000001 diff -r 3a62f88a49f8 -r 245c03ee6e9c bintools/evalid/EvalidCompare.pm --- a/bintools/evalid/EvalidCompare.pm Mon May 17 18:27:21 2010 +0100 +++ b/bintools/evalid/EvalidCompare.pm Mon May 17 18:33:53 2010 +0100 @@ -27,6 +27,29 @@ use File::Path; use File::Basename; use File::Copy; +use Config; + +# Search for tools with Raptor... +sub FindTool($) +{ + my $tool = shift; + my $location = $tool; + if ($Config{osname} =~ m/MSWin32/i && $ENV{SBS_HOME} && -e $ENV{SBS_HOME}."/win32/mingw/bin/".$tool.".exe") + { + $location = $ENV{SBS_HOME}."/win32/mingw/bin/".$tool.".exe"; + } + elsif(-e $ENV{EPOCROOT}."epoc32/gcc_mingw/bin/".$tool.".exe") + { + $location = $ENV{EPOCROOT}."epoc32/gcc_mingw/bin/".$tool.".exe"; + } + elsif(-e $FindBin::Bin."/".$tool.".exe") + { + $location = $FindBin::Bin."/".$tool.".exe"; + } + return $location; +} + + # # Constants. @@ -71,11 +94,11 @@ # they also enabled an order of expandor arguments where the filename is not last my %typeHandler = ( e32 => {reader => 'elf2e32 --dump --e32input=', filter => \&Elf2E32Filter}, - arm => {reader => 'nm --no-sort', filter => \&NmFilter, retry => 1, relative_paths => 1}, + arm => {reader => FindTool("nm").' --no-sort', filter => \&NmFilter, retry => 1, relative_paths => 1}, elf => {reader => 'elfdump -i', filter => \&ElfDumpFilter, rawretry => 1}, - intel => {reader => '%EPOCROOT%epoc32\gcc_mingw\bin\nm --no-sort', filter => \&NmFilter, rawretry => 1, relative_paths => 1, skipstderr => 1}, + intel => {reader => FindTool("nm").' --no-sort', filter => \&NmFilter, rawretry => 1, relative_paths => 1, skipstderr => 1}, intel_pe => {reader => 'pe_dump', filter => \&FilterNone, rawretry => 1}, - zip => {reader => '"'.$FindBin::Bin.'/unzip" -l -v', filter => \&UnzipFilter, rawretry => 1}, + zip => {reader => FindTool("unzip").' -l -v', filter => \&UnzipFilter, rawretry => 1}, map => {filter => \&MapFilter, skipblanks => 1}, sgml => {filter => \&SgmlFilter}, preprocessed_text => {filter => \&PreprocessedTextFilter}, @@ -231,7 +254,7 @@ } } - if ($typeBuf =~ /^!\x0A(.{48}([0-9 ]{10})\x60\x0A(......))/s) { + if ($typeBuf =~ /^!\x0A(.{48}([0-9 ]{9}).\x60\x0A(......))/s) { # library - could be MARM or WINS $typeBuf = $1; @@ -240,7 +263,7 @@ open (FILE, $file) or die "Error: Couldn't open \"$file\" for reading: $!\n"; binmode (FILE); - while ($typeBuf =~ /^.{48}([0-9 ]{10})\x60\x0A(......)/s) { + while ($typeBuf =~ /^.{48}([0-9 ]{9}).\x60\x0A(......)/s) { # $1 is the size of the archive member, $2 is first 6 bytes of the file # There may be several different sorts of file in the archive, and we # need to scan through until we find a type we recognize: diff -r 3a62f88a49f8 -r 245c03ee6e9c e32tools/e32lib/group/seclib.mmp --- a/e32tools/e32lib/group/seclib.mmp Mon May 17 18:27:21 2010 +0100 +++ b/e32tools/e32lib/group/seclib.mmp Mon May 17 18:33:53 2010 +0100 @@ -45,7 +45,7 @@ userinclude ../setcap userinclude ../../e32lib/e32image/inc systeminclude /epoc32/include - +OS_LAYER_SYSTEMINCLUDE OPTION GCC -w //macro __PLACEMENT_NEW_INLINE diff -r 3a62f88a49f8 -r 245c03ee6e9c e32tools/elf2e32/group/elf2e32.mmp --- a/e32tools/elf2e32/group/elf2e32.mmp Mon May 17 18:27:21 2010 +0100 +++ b/e32tools/elf2e32/group/elf2e32.mmp Mon May 17 18:33:53 2010 +0100 @@ -27,6 +27,7 @@ source pl_elfrelocation.cpp pl_elfrelocations.cpp pl_symbol.cpp polydll_fb_target.cpp polydll_rebuild_target.cpp usecasebase.cpp source byte_pair.cpp pagedcompress.cpp checksum.cpp stdexe_target.cpp +OS_LAYER_SYSTEMINCLUDE systeminclude /epoc32/include /epoc32/include/tools userinclude ../source ../include diff -r 3a62f88a49f8 -r 245c03ee6e9c imgtools/imaker/src/imaker.pm --- a/imgtools/imaker/src/imaker.pm Mon May 17 18:27:21 2010 +0100 +++ b/imgtools/imaker/src/imaker.pm Mon May 17 18:33:53 2010 +0100 @@ -351,7 +351,7 @@ { (my $dir = shift()) =~ s/^>>?(?!>)//; my $absdir = ""; - eval { local $SIG{__DIE__}; $absdir = Cwd::abs_path($dir) }; + if (-e $dir) {$absdir = Cwd::abs_path($dir) }; return(PathConv($absdir || File::Spec->rel2abs($dir, $dir !~ /^$gWorkdrive/i && $dir =~ /^([a-z]:)/i ? "$1/" : ""), shift(), shift())); } diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/RELEASE-NOTES.html --- a/sbsv2/raptor/RELEASE-NOTES.html Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/RELEASE-NOTES.html Mon May 17 18:33:53 2010 +0100 @@ -13,11 +13,16 @@
  • SF Bug 2561 - [Raptor] creates incorrect .iby files w.r.t target file versions & ramtargets
  • -

    next version

    +

    version 2.14.0

    New Features

    Defect Fixes

    @@ -30,6 +35,11 @@
  • SF Bug 2174 - [Raptor] -- layer option shows errors when bld.inf missing in another layer
  • Fix: ensure trace paths exist before build starts to avoid clashes during the build with some make engines
  • Fix: permit traces header directory to be specified in systemincludes - helps Qt
  • +
  • Fix: (performance in cluster builds) do resource copying on local host.
  • +
  • Fix: don't generate multiple copies of the same resource just because there are several target paths. Generate it once and copy that to the different target paths. Helps when winscw is built after an arm build.
  • +
  • Fix: (performance) remove unnecessary copying of rpp files into epoc32\localisation as they are not used.
  • +
  • Fix: (performance) remove -C option when preprocessing rpp files - causes comments to be stripped from the rpp resulting in smaller files that improves performance.
  • + @@ -60,11 +70,9 @@
  • DPDEF144648 - Raptor failed to build tools_deb objects under Windows XP
  • SF Bug 2134 - [Raptor] Raptor does not pass overridden make variables into its makefiles
  • Fix : do not allow data to be paged implicitly
  • +
  • SF Bug 2302 - sbs_filter refers to python.exe in win32/python264/
  • Fix : Makefile Parse Performance in Resource stage is poor. Large size of included dependency files is a factor. In --no-depend-generate mode, create dependency files which only refer to other rsg/mbg files that are yet to be built - store no other dependencies.
  • -
  • Fix : don't generate multiple copies of the same resource just because there are several target paths. Generate it once and copy that to the different target paths.
  • -
  • SF Bug 2302 - sbs_filter refers to python.exe in win32/python264/
  • -
  • Fix : ensure that FLMDEBUG is empty by default
  • - +
  • Fix : ensure that FLMDEBUG is empty by default
  • diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/bin/depcrunch.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/bin/depcrunch.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,111 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Minimise the dependencies in a C preprocessor dependency file to +# those that CPP could not find. Then add in an assumption about +# where to find them. Output is assumed to be relevant to only one target +# even if multiple dep files are analysed. +# + +import sys +from optparse import OptionParser +import re + +class NoTargetException(Exception): + pass + +def depcrunch(file,extensions,assume): + target_pattern = r"^\s*(\S+):\s+" + target_re = re.compile(target_pattern) + # Not the use of (?i) in the following expression. re.I seems to cause re.findall + # to not actually find all files matching the extension whereas (?i) provides + # case insensitivity at the right point and it works. Really don't understand this. + extension_pattern = r"\s([^/ \t]+\.((?i)" + "|".join([t for t in extensions]) + r"))\b" + extension_re = re.compile(extension_pattern) + + target = None + + deps = [] + + # Read through the dependencies. + for l in file: + l = l.replace("\\","/").rstrip("\n\r") + + # Look out for the target name if + # we have not found it yet + if not target: + t = target_re.match(l) + if t: + target = t.groups()[0] + + # Look for prerequisites matching the + # extensions. There may be one or more on + # the same line as the target name. + # Don't use re.I - somehow prevents + # all but one match in a line which may have several files + m = extension_re.findall(l) + if m: + deps.extend([d[0] for d in m]) + + if not target: + raise NoTargetException() + + if len(deps) > 0: + print "%s: \\" % target + for d in deps[:-1]: + print " %s \\" % (assume + "/" + d) + print " %s " % (assume + "/" + deps[-1]) + + + + +## Command Line Interface #################################################### + +parser = OptionParser(prog = "depcrunch", + usage = "%prog [-h | options] []") + +parser.add_option("-e", "--extensions", + action="store", dest="extensions", type='string', help="comma separated list of file extensions of missing files to keep in the crunched dep file.") + +parser.add_option("-a", "--assume", + action="store", dest="assume", type='string', help="when cpp reports missing dependencies, assume that they are in this directory") + +(options, args) = parser.parse_args() + + +if not options.extensions: + parser.error("you must specify a comma-separated list of file extensions with the -e option.") + sys.exit(1) + +if not options.assume: + parser.error("you must specify an 'assumed directory' for correcting missing dependencies with the -a option.") + sys.exit(1) + +depfilename="stdin" +if len(args) > 0: + depfilename=args[0] + file = open(depfilename,"r") +else: + file = sys.stdin +try: + depcrunch(file,options.extensions.split(","), options.assume) +except NoTargetException,e: + sys.stderr.write("Target name not found in dependency file\n"); + sys.exit(2) + + +if file != sys.stdin: + file.close() + +sys.exit(0) diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/bin/recipestats.py --- a/sbsv2/raptor/bin/recipestats.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/bin/recipestats.py Mon May 17 18:33:53 2010 +0100 @@ -20,6 +20,9 @@ import time import __future__ + + + class RecipeStats(object): def __init__(self, name, count, time): self.name=name @@ -39,8 +42,9 @@ self.failtime = 0.0 self.failtypes = {} self.retryfails = 0 + self.hosts = {} - def add(self, starttime, duration, name, status): + def add(self, starttime, duration, name, status, host, phase): if status != BuildStats.STAT_OK: self.failcount += 1 if name in self.failtypes: @@ -58,6 +62,12 @@ else: self.stats[name] = RecipeStats(name,1,duration) + hp=host + if hp in self.hosts: + self.hosts[hp] += 1 + else: + self.hosts[hp] = 1 + def recipe_csv(self): s = '"name", "time", "count"\n' l = sorted(self.stats.values(), key= lambda r: r.time, reverse=True) @@ -65,32 +75,66 @@ s += '"%s",%s,%d\n' % (r.name, str(r.time), r.count) return s + def hosts_csv(self): + s='"host","recipecount"\n' + hs = self.hosts + for h in sorted(hs.keys()): + s += '"%s",%d\n' % (h,hs[h]) + return s import sys import re +import os +from optparse import OptionParser # for parsing command line parameters def main(): + recipe_re = re.compile(".*Making.*?([^\.]+\.[^\.]+)") - f = sys.stdin + parser = OptionParser(prog = "recipestats", + usage = """%prog --help [-b] [-f ]""") + + parser.add_option("-b","--buildhosts",action="store_true",dest="buildhosts_flag", + help="Lists which build hosts were active in each invocation of the build engine and how many recipes ran on each.", default = False) + parser.add_option("-f","--logfile",action="store",dest="logfilename", help="Read from the file, not stdin", default = None) + + + (options, stuff) = parser.parse_args(sys.argv[1:]) + + if options.logfilename is None: + f = sys.stdin + else: + f = open(options.logfilename,"r") + st = BuildStats() - recipe_re = re.compile(".* + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/arm.xml --- a/sbsv2/raptor/lib/config/arm.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/arm.xml Mon May 17 18:33:53 2010 +0100 @@ -79,7 +79,6 @@ - @@ -92,6 +91,7 @@ + @@ -103,6 +103,7 @@ + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/carbide.xml --- a/sbsv2/raptor/lib/config/carbide.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/carbide.xml Mon May 17 18:33:53 2010 +0100 @@ -27,6 +27,22 @@ + + + + + + + + + + + + + + + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/gcc.xml --- a/sbsv2/raptor/lib/config/gcc.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/gcc.xml Mon May 17 18:33:53 2010 +0100 @@ -74,10 +74,11 @@ - + + - + @@ -85,8 +86,9 @@ - - + + + @@ -94,10 +96,11 @@ - + + - - + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/locations.xml --- a/sbsv2/raptor/lib/config/locations.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/locations.xml Mon May 17 18:33:53 2010 +0100 @@ -109,6 +109,7 @@ + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/make.xml --- a/sbsv2/raptor/lib/config/make.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/make.xml Mon May 17 18:33:53 2010 +0100 @@ -13,6 +13,9 @@ + + + @@ -52,7 +55,7 @@ - + @@ -60,7 +63,7 @@ - + @@ -70,12 +73,13 @@ + - + @@ -83,7 +87,7 @@ - + @@ -91,8 +95,9 @@ + - + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/root.xml --- a/sbsv2/raptor/lib/config/root.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/root.xml Mon May 17 18:33:53 2010 +0100 @@ -45,6 +45,7 @@ + - + @@ -142,6 +142,7 @@ + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/config/winscw.xml --- a/sbsv2/raptor/lib/config/winscw.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/config/winscw.xml Mon May 17 18:33:53 2010 +0100 @@ -127,7 +127,7 @@ - + @@ -135,17 +135,19 @@ - - + + + - + + - - + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/flm/base.xml --- a/sbsv2/raptor/lib/flm/base.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/flm/base.xml Mon May 17 18:33:53 2010 +0100 @@ -18,6 +18,7 @@ + @@ -84,6 +85,7 @@ + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/flm/e32abiv2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2.flm Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Mon May 17 18:33:53 2010 +0100 @@ -50,6 +50,11 @@ $(if $(FLMDEBUG),$(info )) +# Enable DELETE_ON_FAILED_COMPILE work around for failed RVCT 2.2 compiles +ifneq ($(DELETE_ON_FAILED_COMPILE),) +RVCT22_DELETE_WORKAROUND:=|| { $$(GNURM) $$@; exit 1; } +endif # ifneq ($(DELETE_ON_FAILED_COMPILE),) + # Strip switch-type parameters # POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE)) @@ -167,13 +172,12 @@ IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso endif - # ABIv1 .lib (for specific builds, toolchains and host OS platforms only) + # ABIv1 .lib (for specific kits and toolchains only) IMPORTLIBTARGET_LIB:= IMPORTLIBTARGETVERSIONED_LIB:= BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib - # Only for builds that require and support them, and only on windows - ifeq ($(OSTYPE),cygwin) - ifeq ($(GENERATE_ABIV1_IMPLIBS),1) + # Only for kits that require and tools that support them + ifneq ($(SUPPORTS_ABIV1_IMPLIBS),) WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib) WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),) @@ -181,7 +185,6 @@ IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib endif endif - endif endif # Try to make sure that we get the right linkas name @@ -795,7 +798,7 @@ $(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(1).d)) \ $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \ $(if $(MULTIFILE_ENABLED),--multifile $(OUTPUT_OPTION) $(MULTIFILEOBJECT) \ - --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) \ + --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,compile) ifeq ($(NO_DEPEND_GENERATE),) @@ -854,7 +857,7 @@ $(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(USERINCLUDE))) \ $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \ $(if $(NOHIDEALL),--no_hide_all,) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,e32cpponly) CLEANTARGETS:=$$(CLEANTARGETS) $(CPPONLYTARGET) @@ -889,7 +892,7 @@ $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \ $(if $(NOHIDEALL),--no_hide_all,) \ $(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,e32listing) CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET) @@ -984,7 +987,7 @@ $(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(CIADEFS)) $(CPP_LANG_OPTION) \ $(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE))) \ $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,cia2cpp2o) @@ -1010,7 +1013,7 @@ $(e32abiv2_PREFILE): $1 $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT) $(call startrule,cia2cpp,,$1) \ $(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \ - $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) \ + $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(if $(NO_DEPEND_GENERATE),,&& $(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d)) \ $(call endrule,cia2cpp) @@ -1055,12 +1058,12 @@ $(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \ $(CC) $(e32abiv2_asm_OPTIONS) \ $(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,asmcompile) ifeq ($(NO_DEPEND_GENERATE),) $(call startrule,asmdependencies) \ $(CC) -M $(subst --no_rtti,,$(e32abiv2_asm_OPTIONS)) --depend_format=unix \ - $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) \ + $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,asmdependencies) endif diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/flm/globals.mk diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/flm/resource.flm --- a/sbsv2/raptor/lib/flm/resource.flm Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/flm/resource.flm Mon May 17 18:33:53 2010 +0100 @@ -48,68 +48,25 @@ # Ensure that RELEASABLES and CLEANTARGETS cannot expand indefinitely in successive calls to this flm: CLEANTARGETS:= RELEASABLES:= +CREATABLEPATHS:= # There is only one resource header (.rsg) file and we only # make that if we are asked. RSGDIR:=$(EPOCROOT)/epoc32/include +# If there are multiple LANGUAGES then it is the last one in the list +# which produces the header. +HEADLANG:=$(lastword $(LANGUAGES:SC=sc)) ifneq ($(or $(HEADER),$(HEADERONLY)),) RESOURCEHEADER:=$(RSGDIR)/$(HEADER) - # If there are multiple LANGUAGES then it is the last one in the list - # which produces the header. - HEADLANG:=$(lastword $(LANGUAGES:SC=sc)) else - HEADLANG:= - RESOURCEHEADER:= + RESOURCEHEADER:= endif # we create intermediate .rpp and .d files +INTERBASE_TMP:=$(OUTPUTPATH)/$(TARGET_lower)_$(notdir $(basename $(SOURCE))) INTERBASE:=$(OUTPUTPATH)/$(TARGET_lower) -################################## localisation ###########################$(GNUMKDIR)############# -# Only make copies for full resource builds - -# Initialise to prevent RELEASABLES spill-over between calls -DESTRPP:= -INFOFILE:= - -ifeq ($(HEADERONLY),) - -RSSBASENAME:=$(call lowercase,$(basename $(notdir $(SOURCE)))) -DESTRPP:=$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc/$(RSSBASENAME).rpp -$(call makepath,$(EPOCROOT)/epoc32/localisation/$(RSSBASENAME)/rsc) - -INFOFILE:=$(EPOCROOT)/epoc32/localisation/group/$(RSSBASENAME).info -# If there are MULTIPLE languages then copy the .rpp for the last one -RPPLANG:=$(lastword $(LANGUAGES:SC=sc)) - -# Copy .rpp files from epoc32/build/ to epoc32/localisation/x/rsc/x.rpp and create .info files in localisation -define CreateRppAndInfo - -ifeq ($(RESOURCE_$(call sanitise,$(SOURCE))),) -RESOURCE_$(call sanitise,$(SOURCE)):=1 - -RESOURCE:: $(DESTRPP) $(INFOFILE) - -$(DESTRPP): $(INTERBASE)_$(RPPLANG).rpp - $(call startrule,rppfilecopy,FORCESUCCESS) \ - $(GNUCP) $$< $$@ \ - $(call endrule,rppfilecopy) - -$(INFOFILE):: - @if [ ! -d $(EPOCROOT)/epoc32/localisation/group ]; then $(GNUMKDIR) -p $(EPOCROOT)/epoc32/localisation/group; fi - @if [ ! -f $$@ ]; then echo "DATADIR: /$(RSSBASENAME)" > $$@ ; fi - @echo -e "\n/z$(TARGETPATH)/$(TARGET_lower).rsc : $(RSSBASENAME).rpp" >> $$@ - -endif -endef - -$(eval $(call CreateRppAndInfo)) -endif -################################# end of localisation ################################### - -# make the output directories while reading makefile - some build engines prefer this -$(call makepath,$(INTERBASE)) # common pre-processor options @@ -120,7 +77,7 @@ CPPOPT:=-nostdinc -undef -Wno-trigraphs -D_UNICODE -include $(PRODUCT_INCLUDE)\ -I$(dir $(SOURCE)) $(foreach I, $(USERINCLUDE),-I$(I) ) -I- $(foreach J,$(SYSTEMINCLUDE),-I$(J) ) -CREATABLEPATHS:=$(RSCDIR) $(RSGDIR) $(OUTPUTPATH) +CREATABLEPATHS:=$(CREATABLEPATHS) $(RSCDIR) $(RSGDIR) $(OUTPUTPATH) # We intend to generate the resource in an intermediate location and copy to the targetpath to # ensure that when the "same" resource is built into separare target paths, it doesn't have to be @@ -140,56 +97,71 @@ # $(1) is the RPPFILE (eg. /epoc32/build/xxx/b_sc.rpp) # $(2) is the related RESOURCEFILE if any (eg. /a/b.rsc) # $(3) is the LANGUAGE (eg. sc or 01 or 02 ...) +# $(4) is the "primary" language on which all the others depend ifeq ($(TARGET_$(call sanitise,$1)),) TARGET_$(call sanitise,$1):=1 - $(if $(FLMDEBUG),$(info preprocessresource: $(1) for $(2) LANG:$(3))) + $(if $(FLMDEBUG),$$(info preprocessresource: $(1) for $(2) LANG:$(3) dep $(4))) # Correct dependency information when a header file can't be found. # If the c preprocessor can't find a dependency it appears as it did in the #include statement # e.g. "filename.mbg" or "filename.rsg" in the dependency file. - # we can correct the dependencies by assuming that the file will be in epoc32\include as this is the default - ifneq ($(NO_DEPEND_GENERATE),) - # This version minimises the size of dependency files, to contain only .mbg and .rsg deps. - # 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. 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 - DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' - endif + +ifneq ($(NO_DEPEND_GENERATE),) + # This version minimises the size of dependency files, to contain only .mbg and .rsg deps. + # 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 filter lines which don't have .rsg or .mbg dependencies in them and + # to sift each line to leave out non-relevant things like other header files, .hrh + # files etc. In the end don't print anything at all if we did not find the target. + +define DEPENDENCY_CORRECTOR +{ $(DEPCRUNCH) --extensions rsg,mbg --assume '$$$$(EPOCROOT)/epoc32/include' ; } +endef + +else + # This can correct the dependencies by assuming that the file will be in epoc32\include as this is the default + DEPENDENCY_CORRECTOR:=$(GNUSED) -r 's% ([^ \/]+\.((rsg)|(mbg)))% $(EPOCROOT)\/epoc32\/include\/\1%ig' +endif - RESOURCE_DEPS:: $(1).d - $(1).d: $(SOURCE) + ifeq "$1" "$4" + RESOURCE_DEPS:: $1.d + + $1.d: $(SOURCE) $(call startrule,resourcedependencies,FORCESUCCESS) \ - $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ - $(CPPOPT) $(SOURCE) -M -MG -MT"$(1)" | \ + $(GNUCPP) -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$3) $(call makemacrodef,-D,$(MMPDEFS))\ + $(CPPOPT) $(SOURCE) -M -MG -MT"$1" | \ $$(DEPENDENCY_CORRECTOR) >$$@ \ $(call endrule,resourcedependencies) - ifeq "$(MAKEFILE_GROUP)" "RESOURCE" - $(1): $(1).d + $1 : $1.d + + else + $1 : $4 + endif + + $1: $(call startrule,resourcepreprocess,FORCESUCCESS) \ - $(GNUCPP) -C -DLANGUAGE_$(3) -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ + $(GNUCPP) -C -DLANGUAGE_$3 -DLANGUAGE_$(subst sc,SC,$(3)) $(call makemacrodef,-D,$(MMPDEFS))\ $(CPPOPT) $(SOURCE) -o $$@ \ $(call endrule,resourcepreprocess) endif - CLEANTARGETS:= $$(CLEANTARGETS) $(1) - - $(eval DEPENDFILENAME:=$(1).d) - $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) + CLEANTARGETS:= $$(CLEANTARGETS) $1 - CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) - ifneq "$(DEPENDFILE)" "" - ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" - ifeq "$(MAKEFILE_GROUP)" "RESOURCE" - -include $(DEPENDFILE) + ifeq "$(MAKEFILE_GROUP)" "RESOURCE" + ifeq "$1" "$4" + $(eval DEPENDFILENAME:=$1.d) + $(eval DEPENDFILE:=$(wildcard $(DEPENDFILENAME))) + + CLEANTARGETS:=$$(CLEANTARGETS) $(DEPENDFILENAME) + ifneq "$(DEPENDFILE)" "" + ifeq "$(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS)))" "" + ifeq "$(MAKEFILE_GROUP)" "RESOURCE" + -include $(DEPENDFILE) + endif endif endif endif @@ -200,23 +172,12 @@ ############################################################################### define copyresource # $(1) is the source -# $(2) is the destination - -RELEASABLES:=$$(RELEASABLES) $(2) - - ifeq ($(TARGET_$(call sanitise,$2)),) - TARGET_$(call sanitise,$2):=1 +# $(2) is the space separated list of destinations which must be filenames - RESOURCE:: $2 - ## perform additional copies of binaries - # - $(2): $(1) - $(call startrule,resourcecopy,FORCESUCCESS) \ - $(GNUCP) $$< $$@ \ - $(call endrule,resourcecopy) + RELEASABLES:=$$(RELEASABLES) $(2) - endif - + $(info $2) + endef # copyresource # ############################################################################### @@ -239,8 +200,7 @@ $(1): $(2) $(RCOMP) $(call startrule,resourcecompile,FORCESUCCESS) \ - $(RCOMP) -m045,046,047 -u -o$(1) -s$(2) && \ - { $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(GNUCP) $(1) $(F) ; ) } \ + $(RCOMP) -m045,046,047 -u -o$(1) -s$(2) \ $(call endrule,resourcecompile) endif @@ -248,11 +208,11 @@ # Whether or not we have generated this resource for some other variant, check if there # are any new copies to be made for this variant. e.g. winscw requires that we make # some extra copies. We tried to copy after running rcomp itself but we still need these -# targets for the sake of dependencies or, for example if someone merely adds a new copy +# targets for the sake of dependencies or, for example, if someone merely adds a new copy # when the resource is up-to-date - $(if $(FLMDEBUG),$(info resource copies of $(notdir $1) in: $(RSCCOPYDIRS))) - $(foreach F,$(sort $(patsubst %,%/$(notdir $(1)),$(RSCCOPYDIRS))),$(call copyresource,$(1),$(F))) + $(call copyresource,$1,$(sort $(patsubst %,%/$(notdir $1),$(RSCCOPYDIRS)))) + # individual source file compilation SOURCETARGET_$(call sanitise,$(SOURCE)): $(1) @@ -266,7 +226,7 @@ # $(2) is the preprocessed resource to make it from # $(3) is the language to use (eg. sc) - RELEASABLES:= $$(RELEASABLES) $(1) + RELEASABLES:= $$(RELEASABLES) $(1) ifeq ($(TARGET_$(call sanitise,$1)),) TARGET_$(call sanitise,$1):=1 @@ -293,22 +253,28 @@ # We always create at least the header # even if we sometimes don't create the resources ifneq ($(RESOURCEHEADER),) - $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE)_$(HEADLANG).rpp,$(HEADLANG))) + $(eval $(call generateresourceheader,$(RESOURCEHEADER),$(INTERBASE_TMP)_$(HEADLANG).rpp,$(HEADLANG))) endif +# The one on which the others will depend i.e. they will +# "sit in it's dependency slipstream" or in other words +# We only have to make one dependency file because all of +# the other languages will benefit from the dependency file +# belonging to this language. +PRIMARYRPPFILE:=$(INTERBASE_TMP)_$(HEADLANG).rpp ifeq ($(HEADERONLY),) # generate a resource file for each language # For sc we generate $(RESBASE).rsc and define LANGUAGE_SC and LANGUAGE_sc. - $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE)_$(L).rpp,$(INTERBASE).r$(L),$(L)))) + $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call preprocessresource,$(INTERBASE_TMP)_$(L).rpp,$(INTERBASE).r$(L),$(L),$(PRIMARYRPPFILE)))) ifeq "$(MAKEFILE_GROUP)" "RESOURCE" - $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE)_$(L).rpp,$(L)))) + $(foreach L,$(LANGUAGES:SC=sc),$(eval $(call generateresource,$(INTERBASE).r$(L),$(INTERBASE_TMP)_$(L).rpp,$(L)))) endif else # No resources are going to be made so unless we specifically ask for it, there will be no # preprocessed file from which to create the header: - $(eval $(call preprocessresource,$(INTERBASE)_$(HEADLANG).rpp,,$(HEADLANG))) + $(eval $(call preprocessresource,$(INTERBASE_TMP)_$(HEADLANG).rpp,,$(HEADLANG),$(PRIMARYRPPFILE))) endif @@ -318,10 +284,10 @@ ifneq ($(RFIFILE),) RESOURCE:: $(RFIFILE) RELEASABLES:=$(RELEASABLES) $(RFIFILE) - CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE)) + CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(RFIFILE))/ - RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE)_$(L).rpp) - $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(addsuffix .d,$(RPPFILES)))) + RPPFILES:=$(foreach L,$(LANGUAGES:SC=sc),$(INTERBASE_TMP)_$(L).rpp) + $(eval $(call generaterfifile,$(RFIFILE),$(RPPFILES),$(PRIMARYRPPFILE).d)) endif diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/lib/flm/standard.xml --- a/sbsv2/raptor/lib/flm/standard.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/lib/flm/standard.xml Mon May 17 18:33:53 2010 +0100 @@ -74,6 +74,7 @@ + @@ -121,7 +122,6 @@ - @@ -178,6 +178,7 @@ + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/notes/abiv1_implibs.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/abiv1_implibs.txt Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,14 @@ + +The ABIv1 toolchain was deprecated in Symbian OS 9.4 but the build system +continued to generate both ABIv1 (.lib) import libraries and ABIv2 (.dso) +import libraries for convenience during the transition to ABIv2. + +This change now turns off the generation of ABIv1 import libraries by +default but makes support switchable on a kit-by-kit basis. To turn on +ABIv1 import library generation, add the following setting to the +root.changes variant in epoc32/sbs_config/os_properties.xml + + + +An example properties file is available in the examples/os_properties.xml +file distributed within the Raptor installation. diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/notes/delete_on_failed_compile.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/delete_on_failed_compile.txt Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,7 @@ +In certain circumstances, such as failure to obtain licenses, RVCT 2.2's armcc +program still produces object files whose contents is junk. This causes build +problems later as from Make's point of view those object files are "up to +date" so the build tries to link them. Of course, these attempts at linking +fail and the build is broken. + +This is a work around for that RVCT 2.2 problem. diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/notes/localresourcecopying.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/localresourcecopying.txt Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,24 @@ +Resources were copied using make rules. This is sensible in local +machine builds but non-optimal in cluster builds. It is entirely IO +bound so that instead of benefitting from running on the cluster it +simply creates more IO as files need to be transferred over the network, +possibly multiple times. + +This change introduces the tag to the log which the frontend +reads in a new "default" filter called FilterCopyFile. Thus the python +frontend does the copying rather than the cluster build engine. + +This happens at the end of each invocation of the build engine or "stage". +Since resources are built in their own stage, the copying is completed +before build tasks in the other stages require them. The copied files +are not needed in the resource stage itself. + +The filter uses tags to determine when a stage +is finished and this requires that the timing feature be switched on +permanently. + +The format of the tag is: +dest_filename1 dest_filename2 ... + +Spaces may not be used in filenames. The sequence "%20" may be used +instead. diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/notes/parametric_log_filters.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/parametric_log_filters.txt Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,31 @@ + +It is now possible to pass parameters from the command line into log filters. +This works in the same way for both sbs and sbs_filter commands. + +For example: + +sbs --filters=Foo[param1,param2,param3] + +sbs_filter --filters=Bar[value] < build.log + + +Multiple filters with parameters can be specified if needed, + +sbs --filters=Foo[param1,param2,param3],Bar[value] + + +In the 2.13.0 release there are two filters which take parameters: + +1. sbs_filter --filters=FilterComp[wizard/group] < log + +Here the parameter is (part of) a bld.inf path and the filter only prints +parts of the log which are attributable to the matching component. In the +example above, the log elements from any bld.inf which has "wizard/group" +as part of its path will be printed: normally, passing the full path name +will guarantee that only one component matches. + +2. sbs_filter --filters=FilterTagCounter[info,recipe] < log + +Here the parameters are a list of the element names to count. This is a +simple analysis filter that shows you how many instances of XMl elements +are in a log and how many characters of body text they have. \ No newline at end of file diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/notes/query_cli.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/query_cli.txt Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,18 @@ + +A new --query command-line option allows other tools to easily read raptor's +configuration data without having to understand exactly how raptor config +files work. + +For example, all the valid build aliases which can be used to build with +the -c option can be obtained using: + +sbs --query=aliases + +All the known product variants can be obtained using: + +sbs --query=products + +And the details of a particular configuration can be found using: + +sbs --query=config[armv5_urel.n8] + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/filter_list.py --- a/sbsv2/raptor/python/filter_list.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/filter_list.py Mon May 17 18:33:53 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2008-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" @@ -19,6 +19,7 @@ import os import sys import raptor +import re import filter_interface import pluginbox import traceback @@ -64,8 +65,24 @@ """Nothing to do for stdout""" return True - - +def SplitList(listString): + """turn a CLI filter string into a list of (class, param) pairs. + + for example, "foo[a,b],bar[c,d]" + + becomes [ ("foo", ["a","b"]) , ("bar", ["c","d"]) ] + """ + matches = re.findall("(\w+)(\[([^\[\]]*)\])?,?", listString) + + pairs = [] + for m in matches: + classname = m[0] + if len(m[2]) > 0: + pairs.append( (classname, m[2].split(",")) ) + else: + pairs.append( (classname, []) ) + return pairs + class FilterList(filter_interface.Filter): def __init__(self): @@ -81,14 +98,31 @@ # Find all the filter plugins self.pbox = pbox possiblefilters = self.pbox.classesof(filter_interface.Filter) + filterdict = {} + for p in possiblefilters: + name = p.__name__.lower() + if name in filterdict: + raise ValueError("filters found in SBS_HOME/python/plugins which have duplicate name: %s " % p.__name__) + else: + filterdict[name] = p + + # turn "filternames" into a list of (classname, parameters) pairs + filterCalls = SplitList(filternames) + + # look for each filter class in the box unfound = [] self.filters = [] - for f in filternames: - unfound.append(f) # unfound unless we find it - for pl in possiblefilters: - if pl.__name__.upper() == f.upper(): - self.filters.append(pl()) - unfound = unfound[:-1] + for (f, params) in filterCalls: + # if the filter exists and is a valid filter use it + if f.lower() in filterdict: + if params: + self.filters.append(filterdict[f.lower()](params)) + else: + self.filters.append(filterdict[f.lower()]()) + else: + # record missing filters + unfound.append(f) + if unfound != []: raise ValueError("requested filters not found: %s \ \nAvailable filters are: %s" % (str(unfound), self.format_output_list(possiblefilters))) diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/plugins/filter_component.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/plugins/filter_component.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,96 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Filter class to print log entries for a selected component +# + +import filter_interface +import sys + +class FilterComp(filter_interface.FilterSAX): + + def __init__(self, params = []): + """parameters to this filter are the path of the bld.inf and some flags. + + The bld.inf path can be a substring of the path to match. For example, + "email" will match an element with bldinf="y:/src/email/group/bld.inf". + + No flags are supported yet; this is for future expansion. + + If no parameters are passed then nothing is printed.""" + self.bldinf = "" + self.flags = "" + + if len(params) > 0: + self.bldinf = params[0] + + if len(params) > 1: + self.flags = params[1] + + super(FilterComp, self).__init__() + + def startDocument(self): + # mark when we are inside an element with bldinf="the selected one" + self.inside = False + # and count nested elements so we can toggle off at the end. + self.nesting = 0 + + def printElementStart(self, name, attributes): + sys.stdout.write("<" + name) + for att,val in attributes.items(): + sys.stdout.write(" " + att + "='" + val + "'") + sys.stdout.write(">") + + def startElement(self, name, attributes): + if self.inside: + self.nesting += 1 + self.printElementStart(name, attributes) + return + + if self.bldinf: + try: + if self.bldinf in attributes["bldinf"]: + self.inside = True + self.nesting = 1 + self.printElementStart(name, attributes) + except KeyError: + pass + + def characters(self, char): + if self.inside: + sys.stdout.write(char) + + def endElement(self, name): + if self.inside: + sys.stdout.write("") + + self.nesting -= 1 + + if self.nesting == 0: + self.inside = False + print + + def endDocument(self): + pass + + def error(self, exception): + print filter_interface.Filter.formatError("FilterComp:" + str(exception)) + + def fatalError(self, exception): + print filter_interface.Filter.formatError("FilterComp:" + str(exception)) + + def warning(self, exception): + print filter_interface.Filter.formatWarning("FilterComp:" + str(exception)) + +# the end diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/plugins/filter_copyfile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/plugins/filter_copyfile.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,92 @@ +# +# Copyright (c) 2008-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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# Filter class for copying files in serial in python. This +# is important in cluster builds where file copying is +# very inefficient. +# The one-to-many tag is searched for and copy +# instructions are built up in a hash table. +# destfilename1 destfilename2 . . . .destfilenameN +# destinations must be full filenames not directories. +# +# This filter monitors build progress +# via the tags and flushes copies as build +# stages end (e.g. after resource so resources are ready for the next stage) +# + +import os +import sys +import tempfile +import filter_interface +import shutil +import generic_path +import stat +from raptor_utilities import copyfile + +class FilterCopyFile(filter_interface.Filter): + + def open(self, params): + "initialise" + + self.ok = True + + self.files = {} + + return self.ok + + + def write(self, text): + "process some log text" + + for line in text.splitlines(): + if line.startswith("",source_start)+1:line.find("")].split(" ") + + if source in self.files: + self.files[source].update(destinations) + else: + self.files[source] = set(destinations) + elif line.startswith("%s" % str(e) + self.files = {} + + + + def close(self): + "nop" + + + return self.ok + +# the end + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/plugins/filter_tagcount.py --- a/sbsv2/raptor/python/plugins/filter_tagcount.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/plugins/filter_tagcount.py Mon May 17 18:33:53 2010 +0100 @@ -19,6 +19,13 @@ class FilterTagCounter(filter_interface.FilterSAX): + def __init__(self, params = []): + """parameters to this filter are the names of tags to print. + + If no parameters are passed then all tags are reported.""" + self.interesting = params + super(FilterTagCounter, self).__init__() + def startDocument(self): # for each element name count the number of occurences # and the amount of body text contained. @@ -55,7 +62,8 @@ # report print "\nsummary:" for name,nos in sorted(self.count.items()): - print name, nos[0], nos[1] + if name in self.interesting or len(self.interesting) == 0: + print name, nos[0], nos[1] print "\nparsing:" print "errors =", self.errors diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor.py --- a/sbsv2/raptor/python/raptor.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/raptor.py Mon May 17 18:33:53 2010 +0100 @@ -338,9 +338,6 @@ if build.quiet == True: cli_options += " -q" - if build.timing == True: - cli_options += " --timing" - if build.noDependInclude == True: cli_options += " --no-depend-include" @@ -448,9 +445,10 @@ created by the Main function. When operated by an IDE several Raptor objects may be created and operated at the same time.""" - + # mission enumeration M_BUILD = 1 - M_VERSION = 2 + M_QUERY = 2 + M_VERSION = 3 def __init__(self, home = None): @@ -520,7 +518,8 @@ self.noDependInclude = False self.noDependGenerate = False self.projects = set() - + self.queries = [] + self.cache = raptor_cache.Cache(self) self.override = {env: str(self.home)} self.targets = [] @@ -534,7 +533,7 @@ # what platform and filesystem are we running on? self.filesystem = raptor_utilities.getOSFileSystem() - self.timing = False + self.timing = True # Needed by filters such as copy_file to monitor progress self.toolset = None self.starttime = time.time() @@ -696,7 +695,7 @@ return True def SetTiming(self, TrueOrFalse): - self.timing = TrueOrFalse + self.Info("--timing switch no longer has any effect - build timing is now permanently on") return True def SetParallelParsing(self, type): @@ -717,6 +716,11 @@ self.projects.add(projectName.lower()) return True + def AddQuery(self, q): + self.queries.append(q) + self.mission = Raptor.M_QUERY + return True + def FilterList(self, value): self.filterList = value return True @@ -829,6 +833,12 @@ self.filterList += ",filterclean" if is_suspicious_clean: self.Warn('CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable.') + else: + """ Copyfile implements the tag which is primarily useful with cluster builds. + It allows file copying to occur on the primary build host rather than on the cluster. + This is more efficient. + """ + self.filterList += ",filtercopyfile" if not more_to_do: self.skipAll = True # nothing else to do @@ -1057,7 +1067,7 @@ self.raptor_params = BuildStats(self) # Open the requested plugins using the pluginbox - self.out.open(self.raptor_params, self.filterList.split(','), self.pbox) + self.out.open(self.raptor_params, self.filterList, self.pbox) # log header self.out.write("\n") @@ -1219,6 +1229,31 @@ return layers + def Query(self): + "process command-line queries." + + if self.mission != Raptor.M_QUERY: + return 0 + + # establish an object cache based on the current settings + self.LoadCache() + + # our "self" is a valid object for initialising an API Context + import raptor_api + api = raptor_api.Context(self) + + print "" % raptor_version.numericversion() + + for q in self.queries: + try: + print api.stringquery(q) + + except Exception, e: + self.Error("exception '%s' with query '%s'", str(e), q) + + print "" + return self.errorCode + def Build(self): if self.mission != Raptor.M_BUILD: # help or version requested instead. @@ -1356,6 +1391,9 @@ # object which represents a build b = Raptor.CreateCommandlineBuild(argv) + if b.mission == Raptor.M_QUERY: + return b.Query() + return b.Build() diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor_api.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/raptor_api.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,221 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# raptor_api module +# +# Python API for Raptor. External code should interact with Raptor via this +# module only, as it is the only programatic interface considered public. The +# command line --query option is also implemented using this module. + +# constants +ALL = 1 + +# objects + +class Reply(object): + """object to return values from API calls. + """ + def __init__(self, text=""): + self.text = text + + def __str__(self): + name = type(self).__name__.lower() + + string = "<" + name + children = [] + longend = False + + for attribute,value in self.__dict__.items(): + if attribute != "text": + if isinstance(value, Reply): + children.append(value) + else: + string += " %s='%s'" % (attribute, value) + + if children or self.text: + string += ">" + longend = True + + if self.text: + string += self.text + + if children: + string += "\n" + + for c in children: + string += str(c) + + if longend: + string += "\n" % name + else: + string += "/>\n" + + return string + +class Alias(Reply): + def __init__(self, name, meaning): + super(Alias,self).__init__() + self.name = name + self.meaning = meaning + +class Config(Reply): + def __init__(self, fullname, outputpath): + super(Config,self).__init__() + self.fullname = fullname + self.outputpath = outputpath + +class Product(Reply): + def __init__(self, name): + super(Product,self).__init__() + self.name = name + +import generic_path +import raptor +import raptor_data +import re + +class Context(object): + """object to contain state information for API calls. + + For example, + + api = raptor_api.Context() + val = api.getaliases("X") + """ + def __init__(self, initialiser=None): + # this object has a private Raptor object that can either be + # passed in or created internally. + + if initialiser == None: + self.__raptor = raptor.Raptor() + else: + self.__raptor = initialiser + + def stringquery(self, query): + """turn a string into an API call and execute it. + + This is a convenience method for "lazy" callers. + + The return value is also converted into a well-formed XML string. + """ + + if query == "aliases": + aliases = self.getaliases() + return "".join(map(str, aliases)).strip() + + elif query == "products": + variants = self.getproducts() + return "".join(map(str, variants)).strip() + + elif query.startswith("config"): + match = re.match("config\[(.*)\]", query) + if match: + config = self.getconfig(match.group(1)) + return str(config).strip() + else: + raise BadQuery("syntax error") + + raise BadQuery("unknown query") + + def getaliases(self, type=""): + """extract all aliases of a given type. + + the default type is "". + to get all aliases pass type=ALL + """ + aliases = [] + + for a in self.__raptor.cache.aliases.values(): + if type == ALL or a.type == type: + # copy the members we want to expose + aliases.append( Alias(a.name, a.meaning) ) + + return aliases + + def getconfig(self, name): + """extract the values for a given configuration. + + 'name' should be an alias or variant followed optionally by a + dot-separated list of variants. For example "armv5_urel" or + "armv5_urel.savespace.vasco". + """ + names = name.split(".") + if names[0] in self.__raptor.cache.aliases: + x = self.__raptor.cache.FindNamedAlias(names[0]) + + if len(names) > 1: + fullname = x.meaning + "." + ".".join(names[1:]) + else: + fullname = x.meaning + + elif names[0] in self.__raptor.cache.variants: + fullname = name + + else: + raise BadQuery("'%s' is not an alias or a variant" % names[0]) + + # create an evaluator for the named configuration + tmp = raptor_data.Alias("tmp") + tmp.SetProperty("meaning", fullname) + + units = tmp.GenerateBuildUnits(self.__raptor.cache) + evaluator = self.__raptor.GetEvaluator(None, units[0]) + + # get the outputpath + # this is messy as some configs construct the path inside the FLM + # rather than talking it from the XML: usually because of some + # conditional logic... but maybe some refactoring could avoid that. + releasepath = evaluator.Get("RELEASEPATH") + if not releasepath: + raise BadQuery("could not get RELEASEPATH for config '%s'" % name) + + variantplatform = evaluator.Get("VARIANTPLATFORM") + varianttype = evaluator.Get("VARIANTTYPE") + featurevariantname = evaluator.Get("FEATUREVARIANTNAME") + + platform = evaluator.Get("TRADITIONAL_PLATFORM") + + if platform == "TOOLS2": + outputpath = releasepath + else: + if not variantplatform: + raise BadQuery("could not get VARIANTPLATFORM for config '%s'" % name) + + if featurevariantname: + variantplatform += featurevariantname + + if not varianttype: + raise BadQuery("could not get VARIANTTYPE for config '%s'" % name) + + outputpath = str(generic_path.Join(releasepath, variantplatform, varianttype)) + + return Config(fullname, outputpath) + + def getproducts(self): + """extract all product variants.""" + + variants = [] + + for v in self.__raptor.cache.variants.values(): + if v.type == "product": + # copy the members we want to expose + variants.append( Product(v.name) ) + + return variants + +class BadQuery(Exception): + pass + +# end of the raptor_api module diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor_cli.py --- a/sbsv2/raptor/python/raptor_cli.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/raptor_cli.py Mon May 17 18:33:53 2010 +0100 @@ -18,13 +18,8 @@ # by a raptor.Raptor object. # -import re import types import raptor -import os -import sys -import tempfile -from raptor_utilities import getOSPlatform from optparse import OptionParser # for parsing command line parameters @@ -132,6 +127,18 @@ parser.add_option("-q","--quiet",action="store_true",dest="quiet", help="Run quietly, not generating output messages.") +parser.add_option("--query",action="append",dest="query", + help="""Access various build settings and options using a basic API. The current options are: + + * aliases - return all the values that can be sensibly used with the sbs -c option. + + * products - return all the values that can be "." appended to an alias to specialise it for a product build. + + * config[x] - return a set of values that represent the build configuration "x". Typically "x" will be an alias name or an alias followed by "." followed by a product. + + Multiple --query options can be given. + """) + parser.add_option("-s","--sysdef",action="store",dest="sys_def_file", help="System Definition XML filename.") @@ -245,8 +252,7 @@ # parse the full set of arguments (options, leftover_args) = parser.parse_args(expanded_args) - # the leftover_args are either variable assignments of the form a=b - # or target names. + # the leftover_args are target names. for leftover in leftover_args: Raptor.AddTarget(leftover) @@ -275,6 +281,7 @@ 'noDependGenerate': Raptor.SetNoDependGenerate, 'number_of_jobs': Raptor.SetJobs, 'project_name' : Raptor.AddProject, + 'query' : Raptor.AddQuery, 'filter_list' : Raptor.FilterList, 'ignore_os_detection': Raptor.IgnoreOsDetection, 'check' : Raptor.SetCheck, diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor_data.py --- a/sbsv2/raptor/python/raptor_data.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/raptor_data.py Mon May 17 18:33:53 2010 +0100 @@ -829,12 +829,13 @@ class Variant(Model, Config): - __slots__ = ('cache','name','host','extends','ops','variantRefs','allOperations') + __slots__ = ('cache','name','type','host','extends','ops','variantRefs','allOperations') def __init__(self, name = ""): Model.__init__(self) Config.__init__(self) self.name = name + self.type = "" # Operations defined inside this variant. self.ops = [] @@ -855,6 +856,8 @@ self.host = value elif name == "extends": self.extends = value + elif name == "type": + self.type = value else: raise InvalidPropertyError() @@ -948,6 +951,7 @@ Config.__init__(self) self.name = name self.meaning = "" + self.type = "" self.varRefs = [] self.variants = [] @@ -962,6 +966,8 @@ for u in val.split("."): self.varRefs.append( VariantRef(ref = u) ) + elif key == "type": + self.type = val else: raise InvalidPropertyError() diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor_make.py --- a/sbsv2/raptor/python/raptor_make.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/raptor_make.py Mon May 17 18:33:53 2010 +0100 @@ -161,6 +161,12 @@ self.talonshell = str(evaluator.Get("TALON_SHELL")) self.talontimeout = str(evaluator.Get("TALON_TIMEOUT")) self.talonretries = str(evaluator.Get("TALON_RETRIES")) + + # work around for RVCT 2.2 failed compiles + delete_on_failed_compile_s = evaluator.Get("DELETE_ON_FAILED_COMPILE") + self.delete_on_failed_compile = "" + if delete_on_failed_compile_s is not None and delete_on_failed_compile_s != "": + self.delete_on_failed_compile = "1" # commands self.initCommand = evaluator.Get("initialise") @@ -274,6 +280,7 @@ FLMHOME:=%s SHELL:=%s THIS_FILENAME:=$(firstword $(MAKEFILE_LIST)) +DELETE_ON_FAILED_COMPILE:=%s %s @@ -285,6 +292,7 @@ self.raptor.filesystem, str(self.raptor.systemFLM), self.shellpath, + self.delete_on_failed_compile, talon_settings, self.raptor.systemFLM.Append('globals.mk') ) diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor_utilities.py --- a/sbsv2/raptor/python/raptor_utilities.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/raptor_utilities.py Mon May 17 18:33:53 2010 +0100 @@ -1,5 +1,5 @@ # -# 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" @@ -20,6 +20,8 @@ import os.path import re import sys +import stat +import shutil dosSlashRegEx = re.compile(r'\\') unixSlashRegEx = re.compile(r'/') @@ -189,3 +191,50 @@ return nulllog = NullLog() + +def copyfile(_source, _destination): + """Copy the source file to the destination file (create a directory + to copy into if it does not exist). Don't copy if the destination + file exists and has an equal or newer modification time.""" + source = generic_path.Path(str(_source).replace('%20',' ')) + destination = generic_path.Path(str(_destination).replace('%20',' ')) + dest_str = str(destination) + source_str = str(source) + + try: + + + destDir = destination.Dir() + if not destDir.isDir(): + os.makedirs(str(destDir)) + shutil.copyfile(source_str, dest_str) + return + # Destination file exists so we have to think about updating it + sourceMTime = 0 + destMTime = 0 + sourceStat = 0 + try: + sourceStat = os.stat(source_str) + sourceMTime = sourceStat[stat.ST_MTIME] + except OSError, e: + message = "Source of copyfile does not exist: " + str(source) + raise IOError(message) + try: + destMTime = os.stat(dest_str)[stat.ST_MTIME] + except OSError, e: + pass # destination doesn't have to exist + + if destMTime == 0 or destMTime < sourceMTime: + if os.path.exists(dest_str): + os.chmod(dest_str,stat.S_IREAD | stat.S_IWRITE) + shutil.copyfile(source_str, dest_str) + + # Ensure that the destination file remains executable if the source was also: + os.chmod(dest_str,sourceStat[stat.ST_MODE] | stat.S_IREAD | stat.S_IWRITE | stat.S_IWGRP ) + + + except Exception,e: + message = "Could not update " + dest_str + " from " + source_str + " : " + str(e) + raise IOError(message) + + return diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/python/raptor_version.py --- a/sbsv2/raptor/python/raptor_version.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/python/raptor_version.py Mon May 17 18:33:53 2010 +0100 @@ -16,7 +16,7 @@ # replace CHANGESET with the Hg changeset for ANY release -version=(2,13,0,"2010-04-12","symbian build system","CHANGESET") +version=(2,14,0,"2010-05-19","symbian build system","CHANGESET") def numericversion(): """Raptor version string""" diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/config/abiv1kit/os_properties.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/config/abiv1kit/os_properties.xml Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/config/api.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/config/api.xml Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/annofile2log.py --- a/sbsv2/raptor/test/smoke_suite/annofile2log.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/annofile2log.py Mon May 17 18:33:53 2010 +0100 @@ -19,7 +19,7 @@ def run(): t = SmokeTest() t.id = "43563" - t.name = "annofile2log_canned" + t.name = "annofile2log" t.description = "test workaround for log corruption from a make engine whose name begins with 'e'" t.usebash = True diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/apply_usecases.py --- a/sbsv2/raptor/test/smoke_suite/apply_usecases.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/apply_usecases.py Mon May 17 18:33:53 2010 +0100 @@ -23,7 +23,7 @@ # Introduce LINKER_OPTIONS for tools2 linker t.id = "0108" - t.name = "apply_linker_options" + t.name = "apply_usecases" t.command = "sbs -b smoke_suite/test_resources/apply_usecases/linker_options/bld.inf -c tools2 -f -" t.targets = [ "$(EPOCROOT)/epoc32/release/tools2/rel/test_apply_linkeroptions.exe" diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/clean_readonly.py --- a/sbsv2/raptor/test/smoke_suite/clean_readonly.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/clean_readonly.py Mon May 17 18:33:53 2010 +0100 @@ -24,7 +24,7 @@ t = AntiTargetSmokeTest() t.id = "10a" - t.name = "cleanreadonly" + t.name = "clean_readonly" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,109 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +import os +from raptor_tests import AntiTargetSmokeTest + +def run(): + t = AntiTargetSmokeTest() + t.id = "116" + t.name = "delete_on_failed_compile" + t.description = "Test that object files are not present following a forced failed compile." + + t.usebash = True + base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 -k" + + t.id = "116a" # Ensure everything is reallyclean before the test + t.name = "delete_on_failed_compile_reallyclean_01" + t.errors = 0 + t.returncode = 0 + t.antitargets = [ ] + t.command = base_command + " reallyclean" + t.run() + + t.id = "116b" # Object files should *not* be present after this forced failed compile + t.name = "delete_on_failed_compile_build" + t.errors = 0 + t.returncode = 1 + # None of these files should be present + t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', + [ "test_/armv5/udeb/test.o", + "test_/armv5/udeb/test1.o", + "test_/armv5/udeb/test2.o", + "test_/armv5/udeb/test3.o", + "test_/armv5/udeb/test4.o", + "test_/armv5/udeb/test5.o", + "test_/armv5/udeb/test6.o", + "test_/armv5/urel/test.o", + "test_/armv5/urel/test1.o", + "test_/armv5/urel/test2.o", + "test_/armv5/urel/test3.o", + "test_/armv5/urel/test4.o", + "test_/armv5/urel/test5.o", + "test_/armv5/urel/test6.o" ]) + sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/") + t.command = base_command.replace("armv5", "armv5.fake_compiler") + \ + " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants" % sbshome + t.run() + + t.id = "116c" + t.name = "delete_on_failed_compile_reallyclean_02" + t.errors = 0 + t.returncode = 0 + t.antitargets = [] # Remove the list of anti-targets + t.command = base_command + " reallyclean" + t.run() + + t.id = "116d" # Use a redefined make_engine variant - object files *should* be present + t.name = "delete_on_failed_compile_build_redefined_make_engine" + t.errors = 0 + t.returncode = 1 + t.antitargets = [] # Remove the list of anti-targets + # All of these files should be present + t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', + [ "test_/armv5/udeb/test.o", + "test_/armv5/udeb/test1.o", + "test_/armv5/udeb/test2.o", + "test_/armv5/udeb/test3.o", + "test_/armv5/udeb/test4.o", + "test_/armv5/udeb/test5.o", + "test_/armv5/udeb/test6.o", + "test_/armv5/urel/test.o", + "test_/armv5/urel/test1.o", + "test_/armv5/urel/test2.o", + "test_/armv5/urel/test3.o", + "test_/armv5/urel/test4.o", + "test_/armv5/urel/test5.o", + "test_/armv5/urel/test6.o" ]) + + t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \ + + " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants " % sbshome \ + + " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome + t.run() + + t.id = "116e" + t.name = "delete_on_failed_compile_reallyclean_03" + t.errors = 0 + t.returncode = 0 + t.antitargets = [] # Remove the list of anti-targets + t.targets = [] # Remove the list of targets + t.command = base_command + " reallyclean" + t.run() + + t.id = "116" + t.name = "delete_on_failed_compile" + t.print_result() + return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/depcrunch_test.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/depcrunch_test.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,46 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.usebash = True + + t.description = "Test that dependency crunching for resource dependency files produces expected output" + + t.id = "43562999" + t.name = "depcrunch" + t.command = "python $SBS_HOME/bin/depcrunch.py --extensions mbg,rsg --assume EPOCROOT < smoke_suite/test_resources/depcrunch/dep2.rpp.d" + t.mustmatch_multiline = [ + r"EPOCROOT/epoc32/build/resource/c_98665870f0168225/dependentresource_/dependentresource_dependentresource_sc.rpp: \\\n"+ + r" EPOCROOT/testresource1.mbg \\\n"+ + r" EPOCROOT/testresource2.rsg \\\n"+ + r" EPOCROOT/testresource3.rsg \\\n"+ + r" EPOCROOT/testresource4.mbg \\\n"+ + r" EPOCROOT/testresource5.rsg \\\n"+ + r" EPOCROOT/testresource6.mbg \\\n"+ + r" EPOCROOT/testresource7.rsg \\\n"+ + r" EPOCROOT/testresource8.mbg \\\n"+ + r" EPOCROOT/testresource9.rsg \n" + ] + t.run() + + + t.print_result() + + return t + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/dll_armv5.py --- a/sbsv2/raptor/test/smoke_suite/dll_armv5.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/dll_armv5.py Mon May 17 18:33:53 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 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" @@ -19,7 +19,6 @@ def run(): t = AntiTargetSmokeTest() t.usebash = True - result = AntiTargetSmokeTest.PASS command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c %s -f-" maintargets = [ @@ -47,7 +46,7 @@ ] # Note that ABIv1 import libraries are only generated for RVCT-based armv5 - # builds on Windows + # builds on Windows if the kit asks for it (off by default) t.id = "0009a" t.name = "dll_armv5_rvct" @@ -56,24 +55,23 @@ t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch - t.run("linux") - if t.result == AntiTargetSmokeTest.SKIP: - t.targets.extend(abiv1libtargets) - t.run("windows") - if t.result == AntiTargetSmokeTest.FAIL: - result = AntiTargetSmokeTest.FAIL + t.run() + + t.id = "0009b" + t.name = "dll_armv5_rvct_abiv1" + t.command += " --configpath=test/config/abiv1kit" + t.targets.extend(abiv1libtargets) + t.run("windows") - t.id = "0009b" + t.id = "0009c" t.name = "dll_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() - if t.result == AntiTargetSmokeTest.FAIL: - result = AntiTargetSmokeTest.FAIL - t.id = "0009c" + t.id = "0009d" t.name = "dll_armv5_gcce" t.command = command % "gcce_armv5" t.targets = maintargets @@ -82,11 +80,8 @@ t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() - if t.result == AntiTargetSmokeTest.FAIL: - result = AntiTargetSmokeTest.FAIL t.id = "9" t.name = "dll_armv5" - t.result = result t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py --- a/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/exe_armv5_winscw_single_file.py Mon May 17 18:33:53 2010 +0100 @@ -27,8 +27,8 @@ t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw" t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_sc.rpp", - "helloworld_exe/helloworld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld_sc.rpp", + "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", @@ -91,8 +91,8 @@ "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", "helloworld_exe/winscw/urel/helloworld_urel_objects.lrf", - "helloworld_reg_exe/helloworld_reg_sc.rpp", - "helloworld_reg_exe/helloworld_reg_sc.rpp.d" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d" ]) t.run() diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/featurevariants.py --- a/sbsv2/raptor/test/smoke_suite/featurevariants.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/featurevariants.py Mon May 17 18:33:53 2010 +0100 @@ -167,9 +167,8 @@ "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant_urel_objects.via", "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.def", "createstaticdll_invariant_dll/armv5/urel/createstaticdll_invariant{000a0000}.dso", - - "dummy_inv_dll/dummy_inv_sc.rpp", - "dummy_inv_dll/dummy_inv_sc.rpp.d" + "dummy_inv_dll/dummy_inv_dummy_sc.rpp", + "dummy_inv_dll/dummy_inv_dummy_sc.rpp.d" ] variantBuildTargetsDefaultTree = [ @@ -293,12 +292,12 @@ ] variantBuildTargetsGeneric = [ - "dummy_var1_dll/dummy_var1_sc.rpp", - "dummy_var1_dll/dummy_var1_sc.rpp.d", - "dummy_var2_dll/dummy_var2_sc.rpp", - "dummy_var2_dll/dummy_var2_sc.rpp.d", - "dummy_var3_exe/dummy_var3_sc.rpp", - "dummy_var3_exe/dummy_var3_sc.rpp.d" + "dummy_var1_dll/dummy_var1_dummy_sc.rpp", + "dummy_var1_dll/dummy_var1_dummy_sc.rpp.d", + "dummy_var2_dll/dummy_var2_dummy_sc.rpp", + "dummy_var2_dll/dummy_var2_dummy_sc.rpp.d", + "dummy_var3_exe/dummy_var3_dummy_sc.rpp", + "dummy_var3_exe/dummy_var3_dummy_sc.rpp.d" ] sbscommand = "sbs -b smoke_suite/test_resources/bv/bld.inf -c armv5 " + \ diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/filter_params.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/filter_params.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,140 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +from raptor_tests import SmokeTest + +def run(): + + t = SmokeTest() + t.description = "Test the passing of parameters to log filters" + + command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5_urel --filters=" + + # no parameters means count all tags + t.name = "filter_params_all_tags" + t.command = command + "FilterTagCounter" + t.mustmatch_singleline = [ + "^info \d+ \d+", + "^whatlog \d+ \d+", + "^clean \d+ \d+" + ] + t.run() + + # empty parameter lists are valid + t.name = "filter_params_all_tags2" + t.command = command + "FilterTagCounter[]" + t.run() + + # parameters mean report only those tags + t.name = "filter_params_info" + t.command = command + "FilterTagCounter[info]" + t.mustmatch_singleline = [ + "^info \d+ \d+" + ] + t.mustnotmatch_singleline = [ + "^whatlog \d+ \d+", + "^clean \d+ \d+" + ] + t.run() + + # multiple parameters are valid + t.name = "filter_params_info_clean" + t.command = command + "FilterTagCounter[info,clean]" + t.mustmatch_singleline = [ + "^info \d+ \d+", + "^clean \d+ \d+" + ] + t.mustnotmatch_singleline = [ + "^whatlog \d+ \d+" + ] + t.run() + + # using the same filter with different parameters is valid + t.name = "filter_params_info_clean2" + t.command = command + "FilterTagCounter[info],FilterTagCounter[clean]" + t.run() + + # using the same filter with the same parameters is valid too + t.name = "filter_params_info_clean3" + t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]" + t.run() + + + # parameters must work with the sbs_filter script as well + + command = "sbs_filter --filters=%s < smoke_suite/test_resources/logexamples/filter_component.log" + t.logfileOption = lambda :"" + t.makefileOption = lambda :"" + + # should still work with no parameters + t.name = "sbs_filter_no_params" + t.command = command % "FilterComp" + t.mustmatch_singleline = [ + ] + t.mustnotmatch_singleline = [ + "[<>]" # no elements should be printed at all as no bld.inf is selected + ] + t.run() + + # should work with an empty parameter list + t.name = "sbs_filter_no_params2" + t.command = command % "FilterComp[]" + t.run() + + # with a parameter + t.name = "sbs_filter_one_param" + t.command = command % "FilterComp[email]" + t.stdout = [ + "email error #1", + "email error #2", + "email warning #1", + "email warning #2", + "", + "/epoc32/data/email_1", + "/epoc32/data/email_2", + "", + "", + "+ make_email", + "email was made fine", + "", + "", + "", + " ", + " ", + " fb email", + " ", + " ", + "" + ] + t.mustmatch_singleline = [] + t.mustnotmatch_singleline = [] + t.warnings = 2 + t.errors = 2 + t.run() + + # with multiple filters + t.name = "sbs_filter_multi" + t.command = command % "FilterComp[txt],FilterTagCounter[file,recipe]" + t.stdout = [] + t.mustmatch_singleline = [ "txt", "^file \d+", "^recipe \d+" ] + t.mustnotmatch_singleline = [ "email" ] + t.warnings = 2 + t.errors = 0 + t.run() + + t.name = "filter_params" + t.print_result() + return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/gccxml.py --- a/sbsv2/raptor/test/smoke_suite/gccxml.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/gccxml.py Mon May 17 18:33:53 2010 +0100 @@ -32,9 +32,9 @@ ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", - "helloworld_exe/helloworld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", - "helloworld_reg_exe/helloworld_reg_sc.rpp.d", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", @@ -66,9 +66,9 @@ t.antitargets = ["$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp"] t.addbuildantitargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", - "helloworld_exe/helloworld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", - "helloworld_reg_exe/helloworld_reg_sc.rpp.d", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/gui_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/gui_whatlog.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/gui_whatlog.py Mon May 17 18:33:53 2010 +0100 @@ -30,13 +30,10 @@ t.usebash = True t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", - "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/include/helloworld.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe", @@ -49,8 +46,8 @@ ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_sc.rpp", - "helloworld_exe/helloworld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld_sc.rpp", + "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", @@ -111,18 +108,14 @@ "helloworld_exe/winscw/urel/helloworld_UID_.dep", "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", - "helloworld_reg_exe/helloworld_reg_sc.rpp.d" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d" ]) t.stdout = [ "", "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/include/helloworld.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map", "", @@ -133,13 +126,9 @@ "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info", "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map", "", diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/implib_armv5.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5.py Mon May 17 18:33:53 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 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" @@ -22,7 +22,6 @@ t.name = "implib_armv5" t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf" \ + " -c armv5 LIBRARY" - # ABIv1 .lib files are not generated on Linux t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" @@ -31,13 +30,7 @@ ['simple_implib_lib/armv5/udeb/simple_implib.prep', 'simple_implib_lib/armv5/urel/simple_implib.prep'] ]) - t.run("linux") - # Run test on Windows if that is the current OS - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.run("windows") - + t.run() + + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py Mon May 17 18:33:53 2010 +0100 @@ -27,12 +27,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" ] - t.run("linux") - if t.result == AntiTargetSmokeTest.SKIP: - t.antitargets = [ - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib', - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib' - ] - t.run("windows") - + t.run() + + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/implib_armv5_what.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py Mon May 17 18:33:53 2010 +0100 @@ -22,18 +22,11 @@ t.name = "implib_armv5_what" t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf -c " + \ "armv5 --what LIBRARY" - # ABIv1 .lib files are not generated on Linux t.stdout = [ '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso', '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso' ] - t.run("linux") - # Run test on Windows if that is the current OS - if t.result == CheckWhatSmokeTest.SKIP: - t.stdout.extend([ - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib', - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib' - ]) - t.run("windows") + t.run() + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py Mon May 17 18:33:53 2010 +0100 @@ -27,12 +27,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" ] - t.run("linux") - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.run("windows") - + t.run() + + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/implib_nodef.py --- a/sbsv2/raptor/test/smoke_suite/implib_nodef.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_nodef.py Mon May 17 18:33:53 2010 +0100 @@ -28,13 +28,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.dso", "$(EPOCROOT)/epoc32/release/winscw/udeb/implib_implicit_def.lib" ] - t.run("linux") - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.lib" - ]) - t.run("windows") + t.run() t.id = "71b" t.name = "implib_no_def" diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/implib_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/implib_whatlog.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_whatlog.py Mon May 17 18:33:53 2010 +0100 @@ -45,16 +45,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" ] - t.run("linux") - if t.result == CheckWhatSmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.stdout.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.run("windows") - + t.run() + + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/lib_versioned.py --- a/sbsv2/raptor/test/smoke_suite/lib_versioned.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/lib_versioned.py Mon May 17 18:33:53 2010 +0100 @@ -49,22 +49,7 @@ "$(EPOCROOT)/epoc32/release/winscw/udeb/versionedlib.02.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/versionedlib01.lib" ] - - if sys.platform.lower().startswith("win"): - t.targets.extend ( - [ - "$(EPOCROOT)/epoc32/release/armv5/lib/testver.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib01.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versioned.lib.03.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib.02.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testver{00020000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testver{00030000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versioned.lib{000a0000}.03.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/version.ed.lib.04.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/version.ed.lib{000a0000}.04.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib01{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib{000a0000}.02.lib" - ] ) - t.run() + + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/output_control.py --- a/sbsv2/raptor/test/smoke_suite/output_control.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/output_control.py Mon May 17 18:33:53 2010 +0100 @@ -32,7 +32,7 @@ t = SmokeTest() t.id = "82" - t.name = "output_control_sbs_build_dir" + t.name = "output_control" t.description = "Test building intermediate files into a location other than $EPOCROOT/epoc32/build. Use SBS_BUILD_DIR. environment variable." t.sbs_build_dir = environ['EPOCROOT'].replace("\\","/").rstrip("/") + '/anotherbuilddir' t.environ['SBS_BUILD_DIR'] = t.sbs_build_dir diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/pdll_arm.py --- a/sbsv2/raptor/test/smoke_suite/pdll_arm.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/pdll_arm.py Mon May 17 18:33:53 2010 +0100 @@ -31,10 +31,6 @@ "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.dso", "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.dso" ] - abiv1libtargets = [ - "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.lib", - "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.lib" - ] buildtargets = [ "createstaticpdll_dll/%s/udeb/CreateStaticDLL.o", "createstaticpdll_dll/%s/urel/CreateStaticDLL.o" @@ -47,9 +43,6 @@ ".*ksrt.*" ] - # Note that ABIv1 import libraries are only generated for RVCT-based armv5 - # builds on Windows - t.id = "0109a" t.name = "pdll_armv5_rvct" t.command = command % "armv5" @@ -57,10 +50,7 @@ t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch - t.run("linux") - if t.result == AntiTargetSmokeTest.SKIP: - t.targets.extend(map(lambda x: x % "armv5", abiv1libtargets)) - t.run("windows") + t.run() t.id = "0109b" t.name = "pdll_armv5_clean" @@ -74,7 +64,6 @@ t.name = "pdll_armv5_gcce" t.command = command % "gcce_armv5" t.targets = map(lambda p: p % "armv5", maintargets + armv5targets) - t.antitargets = map(lambda p: p % "armv5", abiv1libtargets) t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch @@ -109,7 +98,6 @@ t.name = "pdll_armv7_gcce" t.command = command % "arm.v7.udeb.gcce4_3_2 -c arm.v7.urel.gcce4_3_2" t.targets = map(lambda p: p % "armv7", maintargets) - t.antitargets = map(lambda p: p % "armv7", abiv1libtargets) t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/query_cli.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/query_cli.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,110 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +import raptor_tests + +def run(): + + t = raptor_tests.SmokeTest() + t.description = "Test the --query command-line option" + + t.name = "query_cli_alias" + t.command = "sbs --query=aliases" + t.mustmatch_singleline = [ + "", + "", + "", + "", + "", + "", + "", + "" + ] + t.mustnotmatch_singleline = [ + "", + "" + ] + t.run() + + t.name = "query_cli_product" + t.command = "sbs --query=products --configpath=test/smoke_suite/test_resources/bv" + t.mustmatch_singleline = [ + "", + "", + "", + "", + "" + ] + t.mustnotmatch_singleline = [ + "", + "" + ] + t.run() + + t.name = "query_cli_config" + t.command = "sbs --query=config[armv5_urel]" + t.mustmatch_singleline = [ + "", + "fullname='arm\.v5\.urel\.rvct.*'", + "outputpath='.*/epoc32/release/armv5/urel'", + "" + ] + t.mustnotmatch_singleline = [] + t.run() + + t.name = "query_cli_config_bv" + t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv" + t.mustmatch_singleline = [ + "", + "fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'", + "outputpath='.*/epoc32/release/armv5\.one/urel'", + "" + ] + t.mustnotmatch_singleline = [] + t.run() + + t.name = "query_cli_config_others" + t.command = "sbs --query=config[winscw_urel] --query=config[tools2_rel]" + + if t.onWindows: + t2 = "tools2" + else: + t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)") + + t.mustmatch_singleline = [ + "", + "outputpath='.*/epoc32/release/winscw/urel'", + "outputpath='.*/epoc32/release/%s/rel'" % t2, + "" + ] + t.mustnotmatch_singleline = [] + t.run() + + t.name = "query_cli_bad" + t.command = "sbs --query=nonsense" + t.mustmatch_singleline = [ + "", + "exception 'unknown query' with query 'nonsense'", + "" + ] + t.mustnotmatch_singleline = [] + t.errors = 1 + t.returncode = 1 + t.run() + + t.name = "query_cli" + t.print_result() + return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/resource.py --- a/sbsv2/raptor/test/smoke_suite/resource.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/resource.py Mon May 17 18:33:53 2010 +0100 @@ -25,15 +25,11 @@ t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE" t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", - "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/include/helloworld.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp", "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc", @@ -43,10 +39,10 @@ t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_sc.rpp", - "helloworld_exe/helloworld_sc.rpp.d", - "helloworld_reg_exe/helloworld_reg_sc.rpp", - "helloworld_reg_exe/helloworld_reg_sc.rpp.d"]) + "helloworld_exe/helloworld_HelloWorld_sc.rpp", + "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp", + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d"]) t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] @@ -64,7 +60,7 @@ is used because the weight of 'complete' dependency information would overwhelm make. """ buildLocation = ReplaceEnvs("$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment('smoke_suite/test_resources/resource/group/bld.inf') - res_depfile= buildLocation+"/dependentresource_/dependentresource_sc.rpp.d" + res_depfile= buildLocation+"/dependentresource_/dependentresource_dependentresource_sc.rpp.d" t.targets = [ "$(EPOCROOT)/epoc32/include/testresource.rsg", @@ -72,25 +68,21 @@ "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", "$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe", - "$(EPOCROOT)/epoc32/localisation/group/testresource.info", - "$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp", res_depfile ] t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [ - "testresource_/testresource_02.rpp", - "testresource_/testresource_02.rpp.d", - "testresource_/testresource_01.rpp", - "testresource_/testresource_01.rpp.d", - "testresource_/testresource_sc.rpp", - "testresource_/testresource_sc.rpp.d"]) + "testresource_/testresource_testresource_02.rpp", + "testresource_/testresource_testresource_01.rpp", + "testresource_/testresource_testresource_01.rpp.d", + "testresource_/testresource_testresource_sc.rpp"]) t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && grep 'epoc32.include.testresource.rsg' %s && wc -l %s " % (res_depfile, res_depfile) t.mustnotmatch = [] t.mustmatch = [ - "4 .*.dependentresource_.dependentresource_sc.rpp.d" + "[23] .*.dependentresource_.dependentresource_dependentresource_sc.rpp.d" ] t.run() diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/sysdef_layers.py --- a/sbsv2/raptor/test/smoke_suite/sysdef_layers.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/sysdef_layers.py Mon May 17 18:33:53 2010 +0100 @@ -46,13 +46,9 @@ "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/helloworld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", - "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", - "$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info", - "$(EPOCROOT)/epoc32/localisation/helloworld_reg/rsc/helloworld_reg.rpp" ] t.addbuildtargets('smoke_suite/test_resources/sysdef/build_gen_source/bld.inf', [ - "helloworld_/helloworld_sc.rpp" + "helloworld_/helloworld_HelloWorld_sc.rpp" ]) t.addbuildtargets('smoke_suite/test_resources/sysdef/dependent/bld.inf', [ "helloworld_exe/armv5/udeb/HelloWorld_Application.o", @@ -79,11 +75,11 @@ "helloworld_exe/winscw/urel/HelloWorld_Main.o", "helloworld_exe/winscw/urel/helloworld.UID.CPP", "helloworld_exe/winscw/urel/helloworld_UID_.o", - "helloworld_reg_exe/helloworld_reg_sc.rpp" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp" ]) t.countmatch = [ - ["", 38], - ["", 8] + ["", 34], + ["", 4] ] t.run() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml --- a/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml Mon May 17 18:33:53 2010 +0100 @@ -5,7 +5,7 @@ xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd"> - + - + - + +/epoc32/data/email_1 +/epoc32/data/email_2 + + + +/epoc32/data/txt_1 +/epoc32/data/txt_2 + + + ++ make_txt +txt was made fine + + + + ++ make_email +email was made fine + + + + + + + fb email + + + + + \ No newline at end of file diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,55 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# delete_on_failed_compile.py +# This is a test module for verifying the delete on failed compile +# work around for RVCT 2.2. It creates a dummy object file and +# exits with an error code which should result in object files being deleted. +# It takes the same arguments as armcc, but ignores them all apart from -o. +# + +import sys +import os +import re + +# Parse for -o argument. +objectfile_re = re.compile(".*-o\s(\S*\.(o|pre))\s.*", re.I) +res = objectfile_re.match(" ".join(sys.argv[1:])) + +if res: + objectpath = res.group(1) + print "Found object file %s" % objectpath + objectdirectory = os.path.dirname(objectpath) + + # Make the directory if it doesn't exist + if not os.path.isdir(objectdirectory): + try: + os.makedirs(objectdirectory) + except: + print "Not making directory %s" % objectdirectory + + # Try to write something to the .o file + try: + fh = open(objectpath, "w") + fh.write("Fake object file for delete on failed compile test\n") + fh.close() + except Exception as error: + print "Failed to created object file %s; error was: %s" % (objectfile, str(error)) +else: + print "Failed to determine object filename. Commandline used was: %s" % " ".join(sys.argv[1:]) + +# Always exit with an error +print "Exiting with non-zero exit code." +sys.exit(1) + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/timing.py --- a/sbsv2/raptor/test/smoke_suite/timing.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/timing.py Mon May 17 18:33:53 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 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" @@ -22,21 +22,10 @@ t.description = "Test that a timing log is created and contains total parse and build durations" - t.id = "0103a" - t.name = "timing_off" - t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f-" - t.mustnotmatch = [ - ".*progress:discovery.*", - ".*progress:start.*", - ".*progress:end.*" - ] - t.run() - - t.id = "0103b" t.name = "timing_on" - t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf --timing " + \ - "--filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \ + t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf" + \ + " --filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \ "grep progress:duration ${SBSLOGFILE}.timings" t.mustmatch = [ "^$", diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Mon May 17 18:33:53 2010 +0100 @@ -62,14 +62,6 @@ ] t.run("linux") if t.result == CheckWhatSmokeTest.SKIP: - t.targets.extend([ - '$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib', - '$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib' - ]) - t.stdout.extend([ - '$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib', - '$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib' - ]) t.run("windows") t.id = "112" diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/unfrozen.py --- a/sbsv2/raptor/test/smoke_suite/unfrozen.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/unfrozen.py Mon May 17 18:33:53 2010 +0100 @@ -156,14 +156,7 @@ ] t.warnings = 8 # ABIv1 .lib files are not generated on Linux - t.run("linux") - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.lib" - ]) - t.run("windows") + t.run() + t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/whatcomp.py --- a/sbsv2/raptor/test/smoke_suite/whatcomp.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/whatcomp.py Mon May 17 18:33:53 2010 +0100 @@ -67,7 +67,7 @@ t.warnings = warnings t.run() - t.id = "0106a" + t.id = "0106b" t.name = "whatcomp_component_repeated" t.description = """ It is possible for what information about a component to not be grouped @@ -89,5 +89,6 @@ t.run() t.id = "0106" + t.name = "whatcomp" t.print_result() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/whatlog_cache.py --- a/sbsv2/raptor/test/smoke_suite/whatlog_cache.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/whatlog_cache.py Mon May 17 18:33:53 2010 +0100 @@ -42,14 +42,11 @@ t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", - "$(EPOCROOT)/epoc32/localisation/group/helloworld.info", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/include/helloworld.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/helloworld_reg.rsc", - "$(EPOCROOT)/epoc32/localisation/helloworld/rsc/helloworld.rpp", - "$(EPOCROOT)/epoc32/localisation/group/helloworld_reg.info", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/helloworld_reg.rsc", @@ -64,8 +61,8 @@ ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", - "helloworld_exe/helloworld_sc.rpp", - "helloworld_exe/helloworld_sc.rpp.d", + "helloworld_exe/helloworld_HelloWorld_sc.rpp", + "helloworld_exe/helloworld_HelloWorld_sc.rpp.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", @@ -126,7 +123,7 @@ "helloworld_exe/winscw/urel/helloworld_UID_.dep", "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", - "helloworld_reg_exe/helloworld_reg_sc.rpp.d" + "helloworld_reg_exe/helloworld_reg_HelloWorld_reg_sc.rpp.d" ]) t.countmatch = [ ["\$self->{abldcache}->{.*\\\\test\\\\smoke_suite\\\\test_resources\\\\simple_gui target (armv5|winscw) (udeb|urel) -what\'} =", 4], @@ -134,10 +131,6 @@ [".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.mbm\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.rsc\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\include\\\\\\\\helloworld.rsg\'", 4], - [".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\group\\\\\\\\helloworld.info\'", 4], - [".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\group\\\\\\\\helloworld_reg.info\'", 4], - [".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\helloworld\\\\\\\\rsc\\\\\\\\helloworld.rpp\'", 4], - [".*\'.*\\\\\\\\epoc32\\\\\\\\localisation\\\\\\\\helloworld_reg\\\\\\\\rsc\\\\\\\\helloworld_reg.rpp\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe\'",4], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe.map\'", 3], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\private\\\\\\\\10003a3f\\\\\\\\apps\\\\\\\\helloworld_reg.rsc\'", 2], diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/smoke_suite/winscw_resource.py --- a/sbsv2/raptor/test/smoke_suite/winscw_resource.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/winscw_resource.py Mon May 17 18:33:53 2010 +0100 @@ -30,9 +30,7 @@ "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r01", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r01", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.rsc", - "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.rsc", - "$(EPOCROOT)/epoc32/localisation/group/testresource.info", - "$(EPOCROOT)/epoc32/localisation/testresource/rsc/testresource.rpp" + "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.rsc" ] t.run() return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/unit_suite/raptor_api_unit.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/unit_suite/raptor_api_unit.py Mon May 17 18:33:53 2010 +0100 @@ -0,0 +1,104 @@ +# +# Copyright (c) 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" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# raptor_api_unit module + +import generic_path +import raptor +import raptor_api +import unittest + +class TestRaptorApi(unittest.TestCase): + + def testContext(self): + api = raptor_api.Context() + + def testContextInitialiser(self): + r = raptor.Raptor() + api = raptor_api.Context(r) + + def testAliases(self): + r = raptor.Raptor() + r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + + api = raptor_api.Context(r) + + aliases = api.getaliases() # type == "" + self.failUnlessEqual(len(aliases), 4) + self.failUnlessEqual(set(["alias_A","alias_B","s1","s2"]), + set(a.name for a in aliases)) + + aliases = api.getaliases(raptor_api.ALL) # ignore type + self.failUnlessEqual(len(aliases), 6) + + aliases = api.getaliases("X") # type == "X" + self.failUnlessEqual(len(aliases), 1) + self.failUnlessEqual(aliases[0].name, "alias_D") + self.failUnlessEqual(aliases[0].meaning, "a.b.c.d") + + def testConfig(self): + r = raptor.Raptor() + r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + + api = raptor_api.Context(r) + + if r.filesystem == "unix": + path = "/home/raptor/foo/bar" + else: + path = "C:/home/raptor/foo/bar" + + config = api.getconfig("buildme") + self.failUnlessEqual(config.fullname, "buildme") + self.failUnlessEqual(config.outputpath, path) + + config = api.getconfig("buildme.foo") + self.failUnlessEqual(config.fullname, "buildme.foo") + self.failUnlessEqual(config.outputpath, path) + + config = api.getconfig("s1") + self.failUnlessEqual(config.fullname, "buildme.foo") + self.failUnlessEqual(config.outputpath, path) + + config = api.getconfig("s2.product_A") + self.failUnlessEqual(config.fullname, "buildme.foo.bar.product_A") + self.failUnlessEqual(config.outputpath, path) + + def testProducts(self): + r = raptor.Raptor() + r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + + api = raptor_api.Context(r) + + products = api.getproducts() # type == "product" + self.failUnlessEqual(len(products), 2) + self.failUnlessEqual(set(["product_A","product_C"]), + set(p.name for p in products)) + +# run all the tests + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.name = "raptor_api_unit" + + tests = unittest.makeSuite(TestRaptorApi) + result = unittest.TextTestRunner(verbosity=2).run(tests) + + if result.wasSuccessful(): + t.result = SmokeTest.PASS + else: + t.result = SmokeTest.FAIL + + return t diff -r 3a62f88a49f8 -r 245c03ee6e9c sbsv2/raptor/test/unit_suite/raptor_cli_unit.py --- a/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py Mon May 17 18:27:21 2010 +0100 +++ b/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py Mon May 17 18:33:53 2010 +0100 @@ -153,6 +153,9 @@ def AddProject(self, project): return True + def AddQuery(self, query): + return True + def PrintVersion(self): return True