-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
31 lines (23 loc) · 943 Bytes
/
test.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
#!/bin/bash
cd "$(dirname "$0")"
echo "[test_daemon] Cleaning previously generated files..."
./clean_generated.sh
echo "[test_daemon] Generating Makefile..."
cmake .
echo "[test_daemon] Building..."
make -j || exit 1
cd ./tests
SERIALIZE_TEST_PASSED_COUNT=3
echo "[test_daemon] Running tests..."
time ./test_binary || SERIALIZE_TEST_PASSED_COUNT=$(($SERIALIZE_TEST_PASSED_COUNT-1))
read -p "Press [Enter] to continue testing... (enter)"
time ./test_xml || SERIALIZE_TEST_PASSED_COUNT=$(($SERIALIZE_TEST_PASSED_COUNT-1))
read -p "Press [Enter] to continue testing... (enter)"
time ./test_xml_b64 || SERIALIZE_TEST_PASSED_COUNT=$(($SERIALIZE_TEST_PASSED_COUNT-1))
if [ "$SERIALIZE_TEST_PASSED_COUNT" -eq "3" ]; then
echo "[test_daemon] All tests cases (test_binary, test_xml, test_xml_b64) passed"
exit 0
else
echo "[test_daemon] Only $SERIALIZE_TEST_PASSED_COUNT tests passed, check logs for more information"
exit 1
fi