mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
docs: add instructions for test coverage
This commit is contained in:
parent
101cf90875
commit
9205a3ad82
2 changed files with 21 additions and 1 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -2,4 +2,7 @@
|
|||
.packages
|
||||
.dart_tool
|
||||
.pub
|
||||
pubspec.lock
|
||||
pubspec.lock
|
||||
|
||||
# Coverage
|
||||
coverage/
|
17
README.md
17
README.md
|
@ -5,3 +5,20 @@ To generate bindings with ffigen use (adjust paths to yours):
|
|||
```bash
|
||||
dart run ffigen --compiler-opts "-I/path/to/libgit2dart/libgit2/headers/ -I/lib64/clang/12.0.1/include"
|
||||
```
|
||||
|
||||
## Running Tests
|
||||
|
||||
To run all tests and generate coverage report use the following commands:
|
||||
|
||||
```sh
|
||||
$ dart pub global activate coverage
|
||||
$ dart test --coverage="coverage"
|
||||
$ format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib
|
||||
```
|
||||
|
||||
To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov):
|
||||
|
||||
```sh
|
||||
$ genhtml coverage/lcov.info -o coverage/
|
||||
$ open coverage/index.html
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue