diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-04-02 19:34:01 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-04-02 19:34:01 +0000 |
commit | d64a9244abf8210bc61df98155f714d832b74804 (patch) | |
tree | 48e4f76a61bfa5f49daac969af72da05a1fdd2f1 /sim-scripts | |
parent | 2009-04-01 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-testing-d64a9244abf8210bc61df98155f714d832b74804.tar.bz2 |
2009-04-02 Joel Sherrill <joel.sherrill@OARcorp.com>
* gdb-sim-run.in, gdb-sim.in: Add check_status.
Diffstat (limited to 'sim-scripts')
-rw-r--r-- | sim-scripts/ChangeLog | 4 | ||||
-rwxr-xr-x | sim-scripts/gdb-sim-run.in | 10 | ||||
-rwxr-xr-x | sim-scripts/gdb-sim.in | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/sim-scripts/ChangeLog b/sim-scripts/ChangeLog index 9c7f921..7dfc6ad 100644 --- a/sim-scripts/ChangeLog +++ b/sim-scripts/ChangeLog @@ -1,3 +1,7 @@ +2009-04-02 Joel Sherrill <joel.sherrill@OARcorp.com> + + * gdb-sim-run.in, gdb-sim.in: Add check_status. + 2009-04-01 Joel Sherrill <joel.sherrill@OARcorp.com> * gdb-sim-run.in, gdb-sim.in: Verify runBSP program is in PATH. diff --git a/sim-scripts/gdb-sim-run.in b/sim-scripts/gdb-sim-run.in index 4bcf249..b23ba96 100755 --- a/sim-scripts/gdb-sim-run.in +++ b/sim-scripts/gdb-sim-run.in @@ -53,6 +53,16 @@ warn() { [ "$1" ] && prerr $* } +check_status() +{ + if [ $1 -ne 0 ] ; then + shift + echo "FAILED: " "$*" >&2 + exit 1 + fi +} + + # # process the options # diff --git a/sim-scripts/gdb-sim.in b/sim-scripts/gdb-sim.in index c8d662e..22b0433 100755 --- a/sim-scripts/gdb-sim.in +++ b/sim-scripts/gdb-sim.in @@ -60,6 +60,15 @@ warn() { [ "$1" ] && prerr $* } +check_status() +{ + if [ $1 -ne 0 ] ; then + shift + echo "FAILED: " "$*" >&2 + test_exit 1 + fi +} + if [ $# -eq 0 ] ; then echo "No arguments .. no executable specified" exit 1 |