|
2 | 2 |
|
3 | 3 | all_tests_result=0
|
4 | 4 |
|
5 |
| -g++ -Wall -Wextra -Wpedantic src/Notecard.cpp src/NoteI2c_Arduino.cpp src/NoteLog_Arduino.cpp src/NoteSerial_Arduino.cpp test/Notecard.test.cpp test/mock/mock-arduino.cpp test/mock/mock-note-c-note.c -std=c++11 -Isrc -Itest -DNOTE_MOCK |
| 5 | +g++ -fprofile-arcs -ftest-coverage -Wall -Wextra -Wpedantic -std=c++11 -O0 -g \ |
| 6 | + src/Notecard.cpp \ |
| 7 | + src/NoteI2c_Arduino.cpp \ |
| 8 | + src/NoteLog_Arduino.cpp \ |
| 9 | + src/NoteSerial_Arduino.cpp \ |
| 10 | + test/Notecard.test.cpp \ |
| 11 | + test/mock/mock-arduino.cpp \ |
| 12 | + test/mock/mock-note-c-note.c \ |
| 13 | + -Isrc \ |
| 14 | + -Itest \ |
| 15 | + -DNOTE_MOCK |
6 | 16 | if [ 0 -eq $? ] && [ 0 -eq $all_tests_result ]; then
|
7 | 17 | echo
|
8 | 18 | valgrind --leak-check=full --error-exitcode=66 ./a.out
|
|
17 | 27 | all_tests_result=999
|
18 | 28 | fi
|
19 | 29 |
|
20 |
| -g++ -Wall -Wextra -Wpedantic src/NoteI2c_Arduino.cpp test/NoteI2c_Arduino.test.cpp test/mock/mock-arduino.cpp test/mock/mock-note-c-note.c -std=c++11 -Isrc -Itest -DNOTE_MOCK |
| 30 | +g++ -fprofile-arcs -ftest-coverage -Wall -Wextra -Wpedantic -std=c++11 -O0 -g \ |
| 31 | + src/NoteI2c_Arduino.cpp \ |
| 32 | + test/NoteI2c_Arduino.test.cpp \ |
| 33 | + test/mock/mock-arduino.cpp \ |
| 34 | + test/mock/mock-note-c-note.c \ |
| 35 | + -Isrc \ |
| 36 | + -Itest \ |
| 37 | + -DNOTE_MOCK |
21 | 38 | if [ 0 -eq $? ] && [ 0 -eq $all_tests_result ]; then
|
22 | 39 | echo
|
23 | 40 | valgrind --leak-check=full --error-exitcode=66 ./a.out
|
|
32 | 49 | all_tests_result=999
|
33 | 50 | fi
|
34 | 51 |
|
35 |
| -g++ -Wall -Wextra -Wpedantic src/NoteI2c_Arduino.cpp test/NoteI2c_Arduino.test.cpp test/mock/mock-arduino.cpp test/mock/mock-note-c-note.c -std=c++11 -Isrc -Itest -DNOTE_MOCK -DWIRE_HAS_END |
| 52 | +g++ -fprofile-arcs -ftest-coverage -Wall -Wextra -Wpedantic -std=c++11 -O0 -g \ |
| 53 | + src/NoteI2c_Arduino.cpp \ |
| 54 | + test/NoteI2c_Arduino.test.cpp \ |
| 55 | + test/mock/mock-arduino.cpp \ |
| 56 | + test/mock/mock-note-c-note.c \ |
| 57 | + -Isrc \ |
| 58 | + -Itest \ |
| 59 | + -DNOTE_MOCK \ |
| 60 | + -DWIRE_HAS_END |
36 | 61 | if [ 0 -eq $? ] && [ 0 -eq $all_tests_result ]; then
|
37 | 62 | echo
|
38 | 63 | valgrind --leak-check=full --error-exitcode=66 ./a.out
|
|
47 | 72 | all_tests_result=999
|
48 | 73 | fi
|
49 | 74 |
|
50 |
| -g++ -Wall -Wextra -Wpedantic src/NoteLog_Arduino.cpp test/NoteLog_Arduino.test.cpp test/mock/mock-arduino.cpp -std=c++11 -Isrc -Itest -DNOTE_MOCK |
| 75 | +g++ -fprofile-arcs -ftest-coverage -Wall -Wextra -Wpedantic -std=c++11 -O0 -g \ |
| 76 | + src/NoteLog_Arduino.cpp \ |
| 77 | + test/NoteLog_Arduino.test.cpp \ |
| 78 | + test/mock/mock-arduino.cpp \ |
| 79 | + -Isrc \ |
| 80 | + -Itest \ |
| 81 | + -DNOTE_MOCK |
51 | 82 | if [ 0 -eq $? ] && [ 0 -eq $all_tests_result ]; then
|
52 | 83 | echo
|
53 | 84 | valgrind --leak-check=full --error-exitcode=66 ./a.out
|
|
62 | 93 | all_tests_result=999
|
63 | 94 | fi
|
64 | 95 |
|
65 |
| -g++ -Wall -Wextra -Wpedantic src/NoteSerial_Arduino.cpp test/NoteSerial_Arduino.test.cpp test/mock/mock-arduino.cpp -std=c++11 -Isrc -Itest -DNOTE_MOCK |
| 96 | +g++ -fprofile-arcs -ftest-coverage -Wall -Wextra -Wpedantic -std=c++11 -O0 -g \ |
| 97 | + src/NoteSerial_Arduino.cpp \ |
| 98 | + test/NoteSerial_Arduino.test.cpp \ |
| 99 | + test/mock/mock-arduino.cpp \ |
| 100 | + -Isrc \ |
| 101 | + -Itest \ |
| 102 | + -DNOTE_MOCK |
66 | 103 | if [ 0 -eq $? ] && [ 0 -eq $all_tests_result ]; then
|
67 | 104 | echo
|
68 | 105 | valgrind --leak-check=full --error-exitcode=66 ./a.out
|
|
80 | 117 | echo
|
81 | 118 | if [ 0 -eq ${all_tests_result} ]; then
|
82 | 119 | echo 'All tests have passed!'
|
| 120 | + gcovr --print-summary --sort-percentage --exclude-throw-branches --delete \ |
| 121 | + --object-directory . \ |
| 122 | + --root src \ |
| 123 | + --exclude .*_error.* \ |
| 124 | + && rm ./a.out *.gcno |
83 | 125 | else
|
84 | 126 | echo 'TESTS FAILED!!!'
|
85 | 127 | fi
|
0 commit comments