aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-04-23 09:57:38 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-04-23 09:57:38 -0700
commitda406cb11287e2961ad5aaa6ca857efd57fb9d03 (patch)
treef369334843e5ad121f2c1dc5a2f5213548559caf /README.md
parent97fae8cc85352cceabbf84bcc7481c138eb8b666 (diff)
downloadzig-da406cb11287e2961ad5aaa6ca857efd57fb9d03.tar.gz
zig-da406cb11287e2961ad5aaa6ca857efd57fb9d03.zip
build: add test coverage target
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4d84c40bfc..cef0d874a9 100644
--- a/README.md
+++ b/README.md
@@ -101,6 +101,20 @@ make
sudo make install
```
+### Test Coverage
+
+To see test coverage in Zig, configure with `-DZIG_TEST_COVERAGE=ON` as an
+additional parameter to the Debug build.
+
+You must have `lcov` installed and available.
+
+Then `make coverage`.
+
+With GCC you will get a nice HTML view of the coverage data. With clang,
+the last step will fail, but you can execute
+`llvm-cov gcov $(find CMakeFiles/ -name "*.gcda")` and then inspect the
+produced .gcov files.
+
### Troubleshooting
If you get one of these: