summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2010-04-28 16:49:34 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-04-28 17:17:57 +0200
commitc38c301558a6ccd28d8d4ebb69ec77109dc10194 (patch)
treeb904b79ebb327c920fc310e5d2170a1b91ae8adf
parent6dea2c325b1506aaf09b14fd365b3d0fea80d842 (diff)
downloadptxdist-c38c301558a6ccd28d8d4ebb69ec77109dc10194.tar.gz
ptxdist-c38c301558a6ccd28d8d4ebb69ec77109dc10194.tar.xz
[libptxdisttest] bugfix: hostfunction return value handling
This patch repairs a bug in the host function of the libptxdisttest.sh which did not correctly handle the return value of the evaluated commandline. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--tests/libptxdisttest.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/libptxdisttest.sh b/tests/libptxdisttest.sh
index 5e79b632f..00a924413 100644
--- a/tests/libptxdisttest.sh
+++ b/tests/libptxdisttest.sh
@@ -121,7 +121,7 @@ test_end() {
}
checking() {
- printf "%-71s" "checking $1" >&2
+ printf "%-71s\n" "checking $1" >&2
reportwrite checking "$1"
}
@@ -190,10 +190,12 @@ remote() {
}
host() {
+ local stdout
+
echo "${1}" >> "$LOGFILE"
reportwrite host "${1}"
- local stdout=$(eval ${1}) 2>> "$LOGFILE"
- local retval=$?
+ stdout=$(eval ${1}; exit ${?}) 2>>"$LOGFILE"
+ local retval=${?}
reportwrite stdout "${stdout}"
reportwrite exitstatus ${retval}
echo "$stdout"