forked from itsumura-h/nim-basolato
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunTest.sh
executable file
·42 lines (36 loc) · 887 Bytes
/
runTest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# nimble install -y
# cd /root/project/tests/server
# nim c main
# nohup ./main > /dev/null 2>&1 &
# cd /root/project/
# touch tests/server/session.db
# nimble test
# killall main
# rm tests/server/main
# rm tests/server/db.sqlite3
# rm tests/server/session.db
# rm tests/server/session.db.bak
# rm -fr tests/server/logs/*
# find tests/ -type f ! -name "*.*" -delete 2>/dev/null
set -eux
# run server
nimble install -y
cd /root/project/tests/server
nim c main
nohup ./main > /dev/null 2>&1 &
# run test
cd /root/project/
touch tests/server/session.db
touch tests/server/db.sqlite3
cp tests/server/.env ./
rm -fr ./testresults
testament p "tests/test_*.nim"
# delete files
killall main
rm tests/server/main
rm tests/server/db.sqlite3
rm tests/server/session.db
rm tests/server/session.db.bak
rm -fr tests/server/logs/*
rm .env
find tests/ -type f ! -name "*.*" -delete 2> /dev/null