mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [1/2] incubator-mynewt-core git commit: debug scripts; exit with error code rather than return from the function. Errors were going ignored.
Date Sun, 13 Nov 2016 23:46:37 GMT
Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/1_0_0_b1_dev 2d92b6da4 -> 6f24373c4


debug scripts; exit with error code rather than return from the function.
Errors were going ignored.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/6f24373c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/6f24373c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/6f24373c

Branch: refs/heads/1_0_0_b1_dev
Commit: 6f24373c44d083b6fa40666df51e8edf7940052f
Parents: ba2c6fc
Author: Marko Kiiskila <marko@runtime.io>
Authored: Sun Nov 13 15:43:19 2016 -0800
Committer: Marko Kiiskila <marko@runtime.io>
Committed: Sun Nov 13 15:46:20 2016 -0800

----------------------------------------------------------------------
 hw/scripts/jlink.sh   | 18 +++++++++---------
 hw/scripts/openocd.sh | 10 +++++-----
 2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6f24373c/hw/scripts/jlink.sh
----------------------------------------------------------------------
diff --git a/hw/scripts/jlink.sh b/hw/scripts/jlink.sh
index 0f85810..a3aa2ec 100644
--- a/hw/scripts/jlink.sh
+++ b/hw/scripts/jlink.sh
@@ -28,15 +28,15 @@ jlink_load () {
 
     if [ -z $FILE_NAME ]; then
         echo "Missing filename"
-        return 1
+        exit 1
     fi
     if [ ! -f "$FILE_NAME" ]; then
         echo "Cannot find file" $FILE
-        return 1
+        exit 1
     fi
     if [ -z $FLASH_OFFSET ]; then
         echo "Missing flash offset"
-        return 1
+        exit 1
     fi
 
     echo "Downloading" $FILE_NAME "to" $FLASH_OFFSET
@@ -64,22 +64,22 @@ jlink_load () {
 
     error=`echo $msgs | grep error`
     if [ -n "$error" ]; then
-	return 1
+	exit 1
     fi
 
     error=`echo $msgs | grep -i failed`
     if [ -n "$error" ]; then
-	return 1
+	exit 1
     fi
 
     error=`echo $msgs | grep -i "unknown / supported"`
     if [ -n "$error" ]; then
-	return 1
+	exit 1
     fi
 
     error=`echo $msgs | grep -i "not found"`
     if [ -n "$error" ]; then
-	return 1
+	exit 1
     fi
 
     return 0
@@ -98,11 +98,11 @@ jlink_debug() {
 
 	if [ -z $FILE_NAME ]; then
             echo "Missing filename"
-            return 1
+            exit 1
 	fi
 	if [ ! -f "$FILE_NAME" ]; then
             echo "Cannot find file" $FILE
-            return 1
+            exit 1
 	fi
 
 	echo "Debugging" $FILE_NAME

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/6f24373c/hw/scripts/openocd.sh
----------------------------------------------------------------------
diff --git a/hw/scripts/openocd.sh b/hw/scripts/openocd.sh
index 21c399d..ed32483 100644
--- a/hw/scripts/openocd.sh
+++ b/hw/scripts/openocd.sh
@@ -32,15 +32,15 @@ openocd_load () {
 
     if [ -z $FILE_NAME ]; then
 	echo "Missing filename"
-	return 1
+	exit 1
     fi
     if [ ! -f "$FILE_NAME" ]; then
 	echo "Cannot find file" $FILE
-	return 1
+	exit 1
     fi
     if [ -z $FLASH_OFFSET ]; then
 	echo "Missing flash offset"
-	return 1
+	exit 1
     fi
 
     echo "Downloading" $FILE_NAME "to" $FLASH_OFFSET
@@ -67,11 +67,11 @@ openocd_debug () {
     if [ -z "$NO_GDB" ]; then
 	if [ -z $FILE_NAME ]; then
 	    echo "Missing filename"
-	    return 1
+	    exit 1
 	fi
 	if [ ! -f "$FILE_NAME" ]; then
 	    echo "Cannot find file" $FILE_NAME
-	    return 1
+	    exit 1
 	fi
 
 	#


Mime
View raw message