| OLD | NEW |
| 1 # | 1 # |
| 2 # Makefile for the LCOV example program. | 2 # Makefile for the LCOV example program. |
| 3 # | 3 # |
| 4 # Make targets: | 4 # Make targets: |
| 5 # - example: compile the example program | 5 # - example: compile the example program |
| 6 # - output: run test cases on example program and create HTML output | 6 # - output: run test cases on example program and create HTML output |
| 7 # - clean: clean up directory | 7 # - clean: clean up directory |
| 8 # | 8 # |
| 9 | 9 |
| 10 CC := gcc | 10 CC := gcc |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 all_tests: example test_noargs test_2_to_2000 test_overflow | 63 all_tests: example test_noargs test_2_to_2000 test_overflow |
| 64 | 64 |
| 65 test_noargs: | 65 test_noargs: |
| 66 @echo | 66 @echo |
| 67 @echo '*' | 67 @echo '*' |
| 68 @echo '* Test case 1: running ./example without parameters' | 68 @echo '* Test case 1: running ./example without parameters' |
| 69 @echo '*' | 69 @echo '*' |
| 70 @echo | 70 @echo |
| 71 $(LCOV) --zerocounters --directory . | 71 $(LCOV) --zerocounters --directory . |
| 72 ./example | 72 ./example |
| 73 » $(LCOV) --capture --directory . --output-file trace_noargs.info --test-n
ame test_noargs | 73 » $(LCOV) --capture --directory . --output-file trace_noargs.info --test-n
ame test_noargs --no-external |
| 74 | 74 |
| 75 test_2_to_2000: | 75 test_2_to_2000: |
| 76 @echo | 76 @echo |
| 77 @echo '*' | 77 @echo '*' |
| 78 @echo '* Test case 2: running ./example 2 2000' | 78 @echo '* Test case 2: running ./example 2 2000' |
| 79 @echo '*' | 79 @echo '*' |
| 80 @echo | 80 @echo |
| 81 $(LCOV) --zerocounters --directory . | 81 $(LCOV) --zerocounters --directory . |
| 82 ./example 2 2000 | 82 ./example 2 2000 |
| 83 » $(LCOV) --capture --directory . --output-file trace_args.info --test-nam
e test_2_to_2000 | 83 » $(LCOV) --capture --directory . --output-file trace_args.info --test-nam
e test_2_to_2000 --no-external |
| 84 | 84 |
| 85 test_overflow: | 85 test_overflow: |
| 86 @echo | 86 @echo |
| 87 @echo '*' | 87 @echo '*' |
| 88 @echo '* Test case 3: running ./example 0 100000 (causes an overflow)' | 88 @echo '* Test case 3: running ./example 0 100000 (causes an overflow)' |
| 89 @echo '*' | 89 @echo '*' |
| 90 @echo | 90 @echo |
| 91 $(LCOV) --zerocounters --directory . | 91 $(LCOV) --zerocounters --directory . |
| 92 ./example 0 100000 || true | 92 ./example 0 100000 || true |
| 93 » $(LCOV) --capture --directory . --output-file trace_overflow.info --test
-name "test_overflow" | 93 » $(LCOV) --capture --directory . --output-file trace_overflow.info --test
-name "test_overflow" --no-external |
| 94 | 94 |
| 95 clean: | 95 clean: |
| 96 rm -rf *.o *.bb *.bbg *.da *.gcno *.gcda *.info output example \ | 96 rm -rf *.o *.bb *.bbg *.da *.gcno *.gcda *.info output example \ |
| 97 descriptions | 97 descriptions |
| 98 | 98 |
| OLD | NEW |