forked from ukBaz/python-bluezero
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_local_tests.sh
executable file
·46 lines (44 loc) · 1.43 KB
/
run_local_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
#!/usr/bin/env bash
coverage run -m unittest -v tests.test_tools
test1001=$?
coverage run --append -m unittest -v tests.test_async_tools
test1002=$?
coverage run --append -m unittest -v tests.test_dbus_tools
test1003=$?
coverage run --append -m unittest -v tests.test_adapter
test1004=$?
coverage run --append -m unittest -v tests.test_advertisement
test1005=$?
coverage run --append -m unittest -v tests.test_device
test1006=$?
coverage run --append -m unittest -v tests.test_gatt
test1007=$?
coverage run --append -m unittest -v tests.test_broadcaster
test101=$?
coverage run --append -m unittest -v tests.test_central
test102=$?
coverage run --append -m unittest -v tests.test_peripheral
test11=$?
coverage run --append -m unittest -v tests.test_eddystone
test12=$?
coverage run --append -m unittest -v tests.test_microbit
test13=$?
coverage run --append -m unittest -v tests.test_adapter_example
test_example1=$?
pycodestyle -v bluezero
lint_bluezero=$?
pycodestyle -v examples
lint_examples=$?
# pycodestyle -v tests
# lint_tests=$?
coverage report
group100=$((test1001 + test1002 + test1003 + test1004 + test1005 + test1006 + test1007))
group10=$((test101 + test102))
group1=$((test11 + test12 + test13))
group_examples=$((test_example1))
group_lint=$((lint_bluezero + lint_examples))
if [ $((group1 + group10 + group100 + group_examples + group_lint)) -ne 0 ]; then
echo -e "\n\n### A test has failed!! ###\n"
else
echo -e "\n\nSuccess!!!\n"
fi