diff options
Diffstat (limited to 'res')
-rwxr-xr-x | res/check_ck | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/res/check_ck b/res/check_ck index 6e61e5c..ce35396 100755 --- a/res/check_ck +++ b/res/check_ck @@ -3,10 +3,12 @@ BIN=@CMAKE_BINARY_DIR@ TEST_LOCATION=@PROJECT_TESTING_GROUNDS@ +# used in regression tests function running { echo "--[TESTING $1]--" } +# used in regression tests function init { running $1 mkdir -p $TEST_LOCATION/vc @@ -23,7 +25,17 @@ function clear_tests { rm -rf $TEST_LOCATION } -function run { +function unit_tests { + echo -e "################################" + echo -e "########## Unit Tests ##########" + echo -e "################################" + ./ck-test +} + +function regression_tests { + echo -e "######################################" + echo -e "########## Regression Tests ##########" + echo -e "######################################" DIR=@BIN_TESTS_DIR@ for i in $( ls $DIR ); do ERROR="TEST "$i" FAILED:" @@ -33,10 +45,17 @@ function run { done } +function run { + unit_tests + regression_tests +} + function print_help { echo -e "ck test suite" - echo -e "run without flags to begin testing" + echo -e "use without flags to run all tests" echo -e "\nflags:" + 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 " -h, --help, *\t\tprint this" @@ -58,6 +77,14 @@ do clear_tests exit ;; + -u | --unit) + unit_tests + exit + ;; + -r | --regression) + regression_tests + exit + ;; *) # unknown option print_help exit |