-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_tests.sh
executable file
·44 lines (43 loc) · 1.91 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
green=`tput setaf 2`
cyan=`tput setaf 6`
reset=`tput sgr0`
find tests -name '*tests.py' -print0 |
while IFS= read -r -d '' line; do
echo "${line}"
if [[ $line = "tests/primary_feature_tests.py" ]]
then
echo "${green} Running tests for ${line} ${reset}"
coverage run -m unittest "$line"
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/primary/significant_locations.py
coverage report -m cortex/primary/trips.py
coverage report -m cortex/primary/screen_active.py
coverage report -m cortex/primary/acc_jerk.py
elif [[ $line = "tests/secondary_feature_tests.py" ]]
then
echo "${green} Running tests for ${line} ${reset}"
coverage run -m unittest "$line"
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/secondary/nearby_device_count.py
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/secondary/data_quality.py
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/secondary/step_count.py
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/secondary/call_duration.py
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/secondary/call_number.py
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/secondary/call_degree.py
elif [[ $line = "tests/util_tests.py" ]]
then
echo "${green} Running tests for ${line} ${reset}"
coverage run -m unittest "$line"
echo "${cyan} Coverage Report for ${line}"
coverage report -m cortex/utils/misc_functions.py
else
echo "TODO: add other tests here"
# coverage report
fi
done
echo "${reset}"