summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-11-21 12:23:22 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 11:33:40 +0100
commit64fb072e4975269d146a0a4a53ed34271dc11102 (patch)
tree821c545880145c2f88866979cabea61d886aab08
parent873eb8fdd5608f69da668165471414a0dcde1f75 (diff)
Change exit message depending on exit reason
Clarify the exit message in case of binder timeout since the default timeout is 3 seconds, it may not be sufficient. As the timeout command, return exit 124 in case of timeout and 128+9 when killed (signal 9). Change-Id: Ia6197c65a32b6fe547fc18115e8c21f572cfcc2b Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--afm-test.native.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/afm-test.native.sh b/afm-test.native.sh
index ffdb869..a80fdf2 100644
--- a/afm-test.native.sh
+++ b/afm-test.native.sh
@@ -26,7 +26,12 @@ cleanNexit() {
then
[ -f "${LOGFILESERVICE}" ] && cat "${LOGFILESERVICE}"
[ -f "${LOGFILETEST}" ] && cat "${LOGFILETEST}"
- echo "Error: Test launch failed. Code: $1"
+ if [[ $1 -eq 124 ]] || [[ $1 -eq 137 ]]
+ then
+ echo -e "Error: Test timed out. Try to use '-t' options to increase the timeout.\nError: Exit Code: $1"
+ else
+ echo -e "Error: Test launch failed.\nError: Exit Code: $1"
+ fi
else
find "${TESTPACKAGEDIR}" -maxdepth 1 -name '*.tap' -exec cat {} \;
find "${TESTPACKAGEDIR}" -maxdepth 1 -name '*.txt' -exec cat {} \;