-
Notifications
You must be signed in to change notification settings - Fork 49
/
run_tests.sh
105 lines (88 loc) · 1.76 KB
/
run_tests.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env bash
rep=$(curl -s --unix-socket /var/run/docker.sock http://ping > /dev/null)
status=$?
if [ $status -eq 7 ]; then
echo 'docker is not running - test will not be executed'
exit 1
fi
echo "creating test directory..."
mkdir -p test-results
test_suite_header () {
echo "======================================================================="
echo " $1 TESTS"
echo "======================================================================="
}
tot=$?
if [ -z $tests ] || [ $tests = "translator" ]; then
cd src/translators/tests
test_suite_header "TRANSLATOR"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
fi
if [ -z $tests ] || [ $tests = "reporter" ]; then
cd src/reporter/tests
test_suite_header "REPORTER"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
fi
if [ -z $tests ] || [ $tests = "integration" ]; then
cd src/tests/
test_suite_header "BACKWARD COMPAT & INTEGRATION"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
fi
if [ -z $tests ] || [ $tests = "others" ]; then
cd src/geocoding/tests
test_suite_header "GEO-CODING"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
cd src/cache/tests
test_suite_header "CACHE"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
cd src/sql/tests
test_suite_header "SQL"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
cd src/utils/tests
test_suite_header "UTILS"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
cd src/wq/tests
test_suite_header "WORK QUEUE"
sh run_tests.sh
loc=$?
if [ "$tot" -eq 0 ]; then
tot=$loc
fi
cd -
fi
exit $tot