diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-07 16:20:40 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-07 16:20:40 +0300 |
commit | 5abff8c6661fd09180b0ec93cf4516d9993a1488 (patch) | |
tree | 2825b7d8e470d2d00ff7886b2d1731cec3a09942 /res/check_ck | |
parent | d202883e6d642ba5a973996654cfed674420da22 (diff) | |
download | ck-5abff8c6661fd09180b0ec93cf4516d9993a1488.tar.gz ck-5abff8c6661fd09180b0ec93cf4516d9993a1488.tar.bz2 ck-5abff8c6661fd09180b0ec93cf4516d9993a1488.zip |
Add error function to reg tests and clean some clutter
Diffstat (limited to 'res/check_ck')
-rwxr-xr-x | res/check_ck | 12 |
1 files changed, 9 insertions, 3 deletions
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 } |