aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-04-30 12:48:13 +0300
committergramanas <anastasis.gramm2@gmail.com>2018-04-30 12:48:13 +0300
commitb9c36055e855163e5bf2fc065d8f7ee7b9efa64c (patch)
treee06a1eb4e7c8c6dbc59f334d3615c7bac3145f44 /res
parent584a9b642a689b6dccc5c66a518b9fc91a6fa733 (diff)
downloadck-b9c36055e855163e5bf2fc065d8f7ee7b9efa64c.tar.gz
ck-b9c36055e855163e5bf2fc065d8f7ee7b9efa64c.tar.bz2
ck-b9c36055e855163e5bf2fc065d8f7ee7b9efa64c.zip
Update tests
Diffstat (limited to 'res')
-rwxr-xr-xres/check_ck30
1 files changed, 29 insertions, 1 deletions
diff --git a/res/check_ck b/res/check_ck
index fc80bd2..fbb5ef7 100755
--- a/res/check_ck
+++ b/res/check_ck
@@ -1,9 +1,37 @@
#!/bin/bash
+BIN=@CMAKE_BINARY_DIR@
+TEST_LOCATION=@PROJECT_TESTING_GROUNDS@
+
+function running {
+ echo "--[TESTING $1]--"
+}
+
+function init {
+ running $1
+ mkdir -p $TEST_LOCATION/vc
+ mkdir $TEST_LOCATION/sec
+
+ exec $BIN/ck conf $BIN init $TEST_LOCATION/vc $TEST_LOCATION/sec > /dev/null &
+ wait $!
+}
+
+function clear_tests {
+ rm $BIN/ckrc
+ rm $BIN/ckdb
+ rm $BIN/test*.conf
+ rm -rf $TEST_LOCATION
+}
+
+if [ "$1" = "-c" ]; then
+ clear_tests
+ exit 0
+fi
+
DIR=@BIN_TESTS_DIR@
for i in $( ls $DIR ); do
ERROR="TEST "$i" FAILED:"
- PASS="TEST "$i" PASSED"
+ PASS="--[TEST "$i" PASSED]--\n"
source $DIR/$i
wait $!
done