# HG changeset patch # User timothy.murphy@nokia.com # Date 1268241686 0 # Node ID bb0bded637e94ebdd4f9ff6f9ec82afcb0ce811e # Parent fad68f1948078ae81080591134f7ef5cfcd086e7 SF Bug 2191 - [Raptor] - When forcesuccess is enabled, exit status for a failed recipe is "retry" but should be "failed" diff -r fad68f194807 -r bb0bded637e9 sbsv2/raptor/RELEASE-NOTES.txt --- a/sbsv2/raptor/RELEASE-NOTES.txt Thu Mar 04 10:28:45 2010 +0000 +++ b/sbsv2/raptor/RELEASE-NOTES.txt Wed Mar 10 17:21:26 2010 +0000 @@ -2,6 +2,7 @@ next version - SF Bug 2125 - [Raptor] - tracecompiler what output incorrect if mmp basename contains '.' e.g. fred.prd.mmp +- SF Bug 2191 - [Raptor] - When forcesuccess is enabled, exit status for a failed recipe is "retry" but should be "failed" version 2.12.4 diff -r fad68f194807 -r bb0bded637e9 sbsv2/raptor/util/talon/talon.c --- a/sbsv2/raptor/util/talon/talon.c Thu Mar 04 10:28:45 2010 +0000 +++ b/sbsv2/raptor/util/talon/talon.c Wed Mar 10 17:21:26 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 fad68f194807 -r bb0bded637e9 sbsv2/raptor/util/talon/tests/config.sh --- a/sbsv2/raptor/util/talon/tests/config.sh Thu Mar 04 10:28:45 2010 +0000 +++ b/sbsv2/raptor/util/talon/tests/config.sh Wed Mar 10 17:21:26 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 fad68f194807 -r bb0bded637e9 sbsv2/raptor/util/talon/tests/t4.mk --- a/sbsv2/raptor/util/talon/tests/t4.mk Thu Mar 04 10:28:45 2010 +0000 +++ b/sbsv2/raptor/util/talon/tests/t4.mk Wed Mar 10 17:21:26 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 fad68f194807 -r bb0bded637e9 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 10 17:21:26 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 + +