From 5abff8c6661fd09180b0ec93cf4516d9993a1488 Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Sun, 7 Oct 2018 16:20:40 +0300 Subject: Add error function to reg tests and clean some clutter --- res/check_ck | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'res') diff --git a/res/check_ck b/res/check_ck index d4683ce..437b39b 100755 --- a/res/check_ck +++ b/res/check_ck @@ -24,8 +24,7 @@ function add_config { wait $! if [ $? -ne 0 ]; then - echo -e $ERROR" ck crashed." - exit 1 + err "ck crashed." fi } @@ -56,6 +55,13 @@ function regression_tests { done } +function err { + echo -e "$ERROR $1" + clear_tests + exit 1 +} + + function run { unit_tests regression_tests @@ -68,7 +74,7 @@ function print_help { echo -e " -u, --unit\t\trun only the unit tests" echo -e " -r, --regression\trun only the regression tests" echo -e " -c, --clear\t\tremove test files" - echo -e " \t\t use it if the tests fail" + echo -e " \t\t use if the tests crush unexpectedly" echo -e " -h, --help, *\t\tprint this" exit } -- cgit v1.2.3