# HG changeset patch
# User timothy.murphy@nokia.com
# Date 1268658576 0
# Node ID d18694306a106c478e61e113cb2a1ed33aed53f4
# Parent 2489b07138d35a8eb8ed22853cbda54e68938019# Parent bb0bded637e94ebdd4f9ff6f9ec82afcb0ce811e
Merge
diff -r 2489b07138d3 -r d18694306a10 sbsv2/raptor/RELEASE-NOTES.txt
--- a/sbsv2/raptor/RELEASE-NOTES.txt Fri Mar 12 12:17:30 2010 +0000
+++ b/sbsv2/raptor/RELEASE-NOTES.txt Mon Mar 15 13:09:36 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"
- Fix: extend tracecompiler tests to Linux
- Fix: Amendment to SF Bug 1511 fix - removal of blanked DEFFILE keyword from e32abiv2ani.flm
diff -r 2489b07138d3 -r d18694306a10 sbsv2/raptor/util/talon/talon.c
--- a/sbsv2/raptor/util/talon/talon.c Fri Mar 12 12:17:30 2010 +0000
+++ b/sbsv2/raptor/util/talon/talon.c Mon Mar 15 13:09:36 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 2489b07138d3 -r d18694306a10 sbsv2/raptor/util/talon/tests/config.sh
--- a/sbsv2/raptor/util/talon/tests/config.sh Fri Mar 12 12:17:30 2010 +0000
+++ b/sbsv2/raptor/util/talon/tests/config.sh Mon Mar 15 13:09:36 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 2489b07138d3 -r d18694306a10 sbsv2/raptor/util/talon/tests/t4.mk
--- a/sbsv2/raptor/util/talon/tests/t4.mk Fri Mar 12 12:17:30 2010 +0000
+++ b/sbsv2/raptor/util/talon/tests/t4.mk Mon Mar 15 13:09:36 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 2489b07138d3 -r d18694306a10 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 Mon Mar 15 13:09:36 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
+
+