aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/init
blob: 4f7880251d3f45ea83325a76ec1c95ac397a9545 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
BIN=/build/ck

TEST_LOCATION=@PROJECT_TESTING_GROUNDS@
mkdir -p $TEST_LOCATION/vc
mkdir $TEST_LOCATION/sec

exec $BIN/ck init $TEST_LOCATION/vc $TEST_LOCATION/sec &
wait $!

if [ ! -f ~/.ck/ckrc ]; then
    echo -e $ERROR"Config file not created."
    exit 1
fi

if [ ! -f ~/.ck/ckdb ]; then
    echo -e $ERROR"DB file not created."
    exit 1
fi

rm -rf $HOME/.ck
rm -rf $TEST_LOCATION
echo -e $PASS