-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·46 lines (40 loc) · 949 Bytes
/
run_tests.sh
File metadata and controls
executable file
·46 lines (40 loc) · 949 Bytes
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
43
44
45
46
#!/bin/bash
set -e
echo "=================================="
echo "ContextDB Tests"
echo "=================================="
if [ ! -d "contextdb" ]; then
echo "Run from project root"
exit 1
fi
TEST_TYPE=${1:-"all"}
run_test() {
echo "[Running] $2..."
if python "tests/$1"; then
echo "[OK] $2"
else
echo "[FAIL] $2"
return 1
fi
}
case $TEST_TYPE in
all)
run_test "test_treedb.py" "TreeDB" || true
run_test "test_config.py" "Config" || true
run_test "test_pageindex.py" "PageIndex" || true
run_test "test_retriever.py" "Retriever" || true
;;
quick)
run_test "test_treedb.py" "TreeDB"
;;
ret)
run_test "test_retriever.py" "Retriever"
;;
*)
echo "Usage: $0 [all|quick|ret]"
exit 1
;;
esac
echo "=================================="
echo "Done"
echo "=================================="