|Title||No coverage testing|
|Assigned user||Gareth Rees|
|Description||It would be useful to have some kind of report on the coverage achieved by the test suite.|
|Analysis||On OS X:|
1. In the mps.xcodeproj, select the "mps" project in the leftmost panel, and in the second-leftmost panel, select the targets that you want to generate coverage data for.
2. In the "Build Settings" tab, go down to the "Apple LLVM compiler - Code Generation" section, and turn on "Generate Test Coverage Files" and "Instrument Program Flow".
4. Run the test suite.
5. cd xc/mps.build/Debug/mps.build/Objects-normal/x86_64/
6. gcov mps.c
7. Look at the gcov files.
I put the coverage results as of changelevel 181788 into an e-mail .
A brief look at the detailed coverage results reveals that the omissions include:
* Error paths. Very few error paths are covered (I suspect that's because it's quite hard to arrange for many of these functions to fail, but still).
* "Describe" functions like ArenaDescribe and description support functions like WriteULongest.
* Function versions of macros like BTGet and mps_commit.
* Allocation frames (deprecated).
* The "fixed" object format (deprecated).
* BufferModeLOGGED (shouldn't this use the event system?).
* Emergency collections.
* Extending an arena.
* Spare committed memory.
* In the public interface: mps_arena_start_collect, mps_ld_merge, mps_message_type_disable, mps_message_type.
Note: gcov reports blocks containing NOTREACHED as being uncovered. I wonder what happens if we mark these with Clang's __builtin_unreachable() directive ? See job003446. [GDR 2013-05-16: this directive makes no difference to the coverage report.]
|Created by||Gareth Rees|
|Created on||2013-03-13 14:18:05|
|Last modified by||Gareth Rees|
|Last modified on||2013-05-16 11:48:30|
|History||2013-03-13 GDR Created.|
|181822||closed||2013-05-15 19:25:16||Gareth Rees||Test coverage report on OS X.|