From 26685b727be212458e28d0fff8543354bb7f1aaf Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Fri, 13 Mar 2020 10:44:19 +0200 Subject: [PATCH] scripts: net: Properly return Zephyr exit code to script Save the exit code from 'wait' so that it is not lost when PID is set to zero. Signed-off-by: Patrik Flykt --- scripts/net/run-sample-tests.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/net/run-sample-tests.sh b/scripts/net/run-sample-tests.sh index 32ec5303e04..522a0e5eb1e 100755 --- a/scripts/net/run-sample-tests.sh +++ b/scripts/net/run-sample-tests.sh @@ -204,10 +204,15 @@ stop_zephyr () wait_zephyr () { + local result="" + echo "Waiting for Zephyr $zephyr_pid..." wait $zephyr_pid + result=$? zephyr_pid=0 + + return $result }