# HG changeset patch # User Richard Taylor # Date 1268839392 0 # Node ID bab2d423b063ddcc808978ca190358228f41a465 # Parent 7830b8253b5a814010963f1cfe40b20b47a00c4e# Parent f4ccb4c573daa7108891fc835a1b46013a34465f merge from fix diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/RELEASE-NOTES.txt --- a/sbsv2/raptor/RELEASE-NOTES.txt Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/RELEASE-NOTES.txt Wed Mar 17 15:23:12 2010 +0000 @@ -1,5 +1,17 @@ Release Notes for Symbian Build System v2 +version 2.12.5 + +Defect Fixes: +- Fix: Workaround for emake engine log corruption when clockskew errors occur (annofile2log). + Allow Raptor to obtain log from emake annotation file where it is uncorrupted. A new + Make engine option "copyannofile2log" enables/disables this mode for emake. If this option is disabled + or if no annotation file is specified for the build then Raptor reads logs directly as normal. +- SF Bug 2191 - [Raptor] - When forcesuccess is enabled, exit status for a failed recipe is "retry" but should be "failed" +- Fix: extend tracecompiler tests to Linux +- Fix: Amendment to SF Bug 1511 fix - removal of blanked DEFFILE keyword from e32abiv2ani.flm + + version 2.12.4 Defect Fixes: diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/lib/config/make.xml --- a/sbsv2/raptor/lib/config/make.xml Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/lib/config/make.xml Wed Mar 17 15:23:12 2010 +0000 @@ -47,6 +47,9 @@ + + + @@ -67,6 +70,9 @@ + + + diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/lib/flm/e32abiv2ani.flm --- a/sbsv2/raptor/lib/flm/e32abiv2ani.flm Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/lib/flm/e32abiv2ani.flm Wed Mar 17 15:23:12 2010 +0000 @@ -25,7 +25,7 @@ POSTLINKFILETYPE:=ani DOPOSTLINK:=1 AUTOEXPORTS:=_Z15CreateCAnimDllLv,1; -DEFFILE:= + # Determine what kind of entrypoint option to set LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/python/raptor_make.py --- a/sbsv2/raptor/python/raptor_make.py Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/python/raptor_make.py Wed Mar 17 15:23:12 2010 +0000 @@ -31,11 +31,58 @@ import traceback import sys from xml.sax.saxutils import escape +from xml.sax.saxutils import unescape class BadMakeEngineException(Exception): pass +def XMLEscapeLog(stream): + inRecipe = False + + for line in stream: + if line.startswith(""): + inOutput = True + yield unescape(line[8:])+'\n' + # This is make output so don't unescape it. + elif line.startswith(''): + line = line[19:] + inOutput = True + yield unescape(line)+'\n' + else: + end_output = line.find("") + + if end_output != -1: + line = line[:end_output] + inOutput = False + + yield unescape(line)+'\n' + + af.close() + + + # raptor_make module classes class MakeEngine(object): @@ -82,6 +129,25 @@ self.jobsOption = evaluator.Get("jobs") self.defaultMakeOptions = evaluator.Get("defaultoptions") + # Logging + # copylogfromannofile means, for emake, that we should ignore + # emake's console output and instead extract output from its annotation + # file. This is a workaround for a problem where some emake + # console output is lost. The annotation file has a copy of this + # output in the "parse" job and it turns out to be uncorrupted. + self.copyLogFromAnnoFile = (evaluator.Get("copylogfromannofile") == "true") + self.annoFileName = None + + if self.copyLogFromAnnoFile: + for o in self.raptor.makeOptions: + if o.startswith("--emake-annofile="): + self.annoFileName = o[17:] + self.raptor.Info("annofile: " + o) + + if not self.annoFileName: + self.raptor.Info("Cannot copy log from annotation file as no annotation filename was specified via the option --mo=--emake-annofile=") + self.copyLogFromAnnoFile = False + # buffering self.scrambled = (evaluator.Get("scrambled") == "true") @@ -479,8 +545,16 @@ # clock skew messages from some build engines scatter their # output across our xml. stderrfilename = makefile+'.stderr' + stdoutfilename = makefile+'.stdout' command += " 2>'%s' " % stderrfilename + # Keep a copy of the stdout too in the case of using the + # annofile - so that we can trap the problem that + # makes the copy-log-from-annofile workaround necessary + # and perhaps determine when we can remove it. + if self.copyLogFromAnnoFile: + command += " >'%s' " % stdoutfilename + # Substitute the makefile name for any occurrence of #MAKEFILE# command = command.replace("#MAKEFILE#", str(makefile)) @@ -518,28 +592,23 @@ stream = p.stdout inRecipe = False - line = " " - while line: - line = stream.readline() - - if line.startswith("\n") +try: + for l in XMLEscapeLog(AnnoFileParseOutput(annofile)): + sys.stdout.write(l) + +except Exception,e: + sys.stderr.write("error: " + str(e) + "\n") + retcode = 1 +sys.stdout.write("\n") + +sys.exit(retcode) diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/test/smoke_suite/tracecompiler_general.py --- a/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py Wed Mar 17 15:23:12 2010 +0000 @@ -18,9 +18,6 @@ from raptor_tests import AntiTargetSmokeTest def run(): - result = SmokeTest.PASS - failed = [] - t = SmokeTest() t.description = "Testcases (ID 0101a - 0101d) test trace compiler" # General test for trace compiler, which generates @@ -64,13 +61,8 @@ "testtc_dll/armv5/urel/testTC{000a0000}.def", "testtc_dll/tracecompile_testTC_1000008d.done" ]) - # Trace compiler doesn't work on Linux for time being. Once it's fixed, will apply all - # trace compiler tests to linux as well. - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) - + t.run() + # General CLEAN test for trace compiler outputs t = AntiTargetSmokeTest() t.id = "101b" @@ -84,11 +76,8 @@ t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ "testtc_dll/tracecompile_testTC_1000008d.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) - + t.run() + t = SmokeTest() t.id = "101c" t.name = "TC_bv_path" @@ -112,11 +101,8 @@ "helloworld_exe/armv5/urel/HelloWorld_urel_objects.via", "helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) - + t.run() + # 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source # containing no osttraces. # Trace compiler only runs when there are osttraces code in source. Raptor decides this by @@ -136,10 +122,7 @@ "test_/armv5/urel/test.o", "test_/tracecompile_autorun1_00000001.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) + t.run() t = AntiTargetSmokeTest() t.id = "101e" @@ -160,10 +143,7 @@ t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ "test_/tracecompile_autorun2_00000001.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) + t.run() t = AntiTargetSmokeTest() t.id = "101f" @@ -184,10 +164,7 @@ t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ "test_/tracecompile_autorun3_00000001.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) + t.run() # Test trace compiler doesn't run when it is switched off # Trace compiler switch is off by default. To turn it on use variant ".tracecompiler". @@ -208,21 +185,11 @@ t.addbuildantitargets('smoke_suite/test_resources/tracecompiler/TC_autorun/bld.inf', [ "test_/tracecompile_autorun1_00000001.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) - + t.run() + + t.id = "101" t.name = "tracecompiler_general" - t.result = result - - print "\nOverall Result : " + result.upper() + "\n" - if result == SmokeTest.FAIL: - print len(failed), "tests failed:" - for x in failed: - print x - print - + t.print_result() return t diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/test/smoke_suite/tracecompiler_incremental.py --- a/sbsv2/raptor/test/smoke_suite/tracecompiler_incremental.py Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_incremental.py Wed Mar 17 15:23:12 2010 +0000 @@ -23,7 +23,7 @@ t.name = "tracecompiler_incremental_clean" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5_urel.tracecompiler CLEAN" - t.run("windows") + t.run() t.id = "114b" t.name = "tracecompiler_incremental_prebuild" @@ -32,8 +32,6 @@ t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso", - "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h", @@ -43,14 +41,14 @@ "$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml", "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h" ] - t.run("windows") + t.run() t.id = "114c" t.name = "tracecompiler_incremental_rebuild" t.command = "touch smoke_suite/test_resources/tracecompiler/testTC/src/wlanhwinit.cpp && sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5_urel.tracecompiler -f - -m ${SBSMAKEFILE}" t.countmatch = [ ["name='compile'",1] ] t.targets = [] - t.run("windows") + t.run() t.id = "114" t.name = "tracecompiler_incremental" diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py --- a/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py Wed Mar 17 15:23:12 2010 +0000 @@ -1,11 +1,23 @@ +# +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# 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 from raptor_tests import AntiTargetSmokeTest def run(): - result = SmokeTest.PASS - failed = [] - # 102a - 102b Test running trace compiler on one mmp with different source files controlled macros. t = AntiTargetSmokeTest() t.description = "Testcases (ID 102a - 102c) test trace compiler running with variants and macros" @@ -70,10 +82,7 @@ "variant_source_/winscw/udeb/var_source3.o", "variant_source_/winscw/urel/var_source3.o" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) + t.run() # 2nd time build includes var_source1 and var_source3 for variant_source.mmp t = SmokeTest() @@ -127,11 +136,7 @@ "variant_source_/winscw/urel/var_source3.o.d", "variant_source_/tracecompile_variant_source_10000003.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) - + t.run() # Build multiple variants together, which involves different source files in one mmp # Raptor only call trace compiler once no matter how many variants @@ -171,11 +176,7 @@ "tc_variants_/armv5.phone3/urel/tc_c.o", "tc_variants_/tracecompile_tc_variants_10000004.done" ]) - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) - + t.run() # 102d and 102e is to test a very rare situation, where one mmpfile includes 3 children mmpfiles, # which are guarded by macros. They share some source file, and two share the same UID3. @@ -225,10 +226,7 @@ "child3_/tracecompile_child3_exe_11100002.done" ]) t.warnings = 3 - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) + t.run() # Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be # cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on @@ -271,22 +269,12 @@ "child3_/tracecompile_child3_exe_11100002.done" ]) t.warnings = 3 - t.run("windows") - if t.result == SmokeTest.FAIL: - result = SmokeTest.FAIL - failed.append(t.name) + t.run() + t.id = "102" t.name = "tracecompiler_variants" - t.result = result - - print "\nOverall Result : " + result.upper() + "\n" - if result == SmokeTest.FAIL: - print len(failed), "tests failed:" - for x in failed: - print x - print - - t.id = "102" + t.print_result() + return t diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Wed Mar 17 15:23:12 2010 +0000 @@ -24,7 +24,7 @@ t.name = "tracecompiler_whatlog_clean" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf -c armv5.tracecompiler CLEAN" - t.run("windows") + t.run() t = CheckWhatSmokeTest() t.description = "Trace Compiler Whatlog test" @@ -37,8 +37,6 @@ t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso", - "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib", "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll", @@ -55,8 +53,6 @@ "", "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso", - "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib", "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll", @@ -64,7 +60,8 @@ "$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml", "$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/test_TC_0x1000008d_TraceDefinitions.h" ] - t.run("windows") + t.run() + t.id = "112" return t diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/util/talon/talon.c --- a/sbsv2/raptor/util/talon/talon.c Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/util/talon/talon.c Wed Mar 17 15:23:12 2010 +0000 @@ -586,7 +586,7 @@ if (p->returncode != 0) { - char *exitstr = retries > 0 ? "retry" : "failed"; + char *exitstr = force_success ? "failed" : retries > 0 ? "retry" : "failed"; snprintf(status, STATUS_STRMAX - 1, "\n", exitstr, p->returncode, attempt, flagsstr, reasonstr ); } else { snprintf(status, STATUS_STRMAX - 1, "\n", attempt, flagsstr, reasonstr ); diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/util/talon/tests/config.sh --- a/sbsv2/raptor/util/talon/tests/config.sh Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/util/talon/tests/config.sh Wed Mar 17 15:23:12 2010 +0000 @@ -16,9 +16,19 @@ # # set up the environment for some talon tests. +eval `$SBS_HOME/bin/gethost.sh -e` + +if [[ "$HOSTPLATFORM" =~ "win" ]]; then +TEST_SHELL=$(cygpath -w $SBS_HOME/win32/bin/talon.exe) +TEST_TALON_SHELL=$(cygpath -w $SBS_CYGWIN/bin/bash.exe) +else +TEST_SHELL=$SBS_HOME/$HOSTPLATFORM_DIR/bin/talon +TEST_TALON_SHELL=/bin/bash +fi + cat >settings.mk <<-endofsettings - SHELL:=$(cygpath -w $SBS_HOME/win32/bin/talon.exe) - TALON_SHELL:=$(cygpath -w $SBS_CYGWIN/bin/bash.exe) + SHELL:=$TEST_SHELL + TALON_SHELL:=$TEST_TALON_SHELL TALON_BUILDID:=100 TALON_DEBUG:="" export TALON_SHELL TALON_BUILDID TALON_DEBUG diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/util/talon/tests/t4.mk --- a/sbsv2/raptor/util/talon/tests/t4.mk Fri Mar 05 14:34:56 2010 +0000 +++ b/sbsv2/raptor/util/talon/tests/t4.mk Wed Mar 17 15:23:12 2010 +0000 @@ -23,6 +23,11 @@ $(info testing timeouts) $(info ) -all: +.PHONY: all passed + +all: passed + @echo "t4-PASSED" + +passed: @|PLATFORM=armv5;MMP=barney.mmp;BLDINF=somebld.inf;|echo "Started a slow command under talon (attempt $$TALON_ATTEMPT):";echo "SHELL=$$SHELL";if (( $$TALON_ATTEMPT <4 )); then echo sleeping 6; sleep 6; echo "hi"; else echo "Not sleeping this time"; fi; echo "this should not appear in the recipe tags unless you try 4 times." diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/util/talon/tests/t6.mk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/util/talon/tests/t6.mk Wed Mar 17 15:23:12 2010 +0000 @@ -0,0 +1,33 @@ +# +# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# 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: +# +include settings.mk + +# Making sure that forcesuccess works. + +TALON_RECIPEATTRIBUTES:=flags='$$TALON_FLAGS' +TALON_RETRIES:=1 + +export TALON_RECIPEATTRIBUTES TALON_RETRIES + +.PHONY: all fred + +all: fred + @echo "t6-PASSED" + +fred: + |TALON_FLAGS=FORCESUCCESS;|echo "Forcesuccess'd command"; exit 1 + + diff -r 7830b8253b5a -r bab2d423b063 sbsv2/raptor/win32/bin/talon.exe Binary file sbsv2/raptor/win32/bin/talon.exe has changed