From 0e2d5eb4a11fee24fd6361264ff1ce57eccb2ce9 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 21 Nov 2018 12:23:22 +0100 Subject: 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 --- afm-test.native.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 {} \; -- cgit 1.2.3-korg