https://github.com/winglim/c-unittest-example
C project example using CMocka and CodeCov.
https://github.com/winglim/c-unittest-example
Last synced: 3 months ago
JSON representation
C project example using CMocka and CodeCov.
- Host: GitHub
- URL: https://github.com/winglim/c-unittest-example
- Owner: WingLim
- Created: 2020-12-22T13:12:14.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-22T13:20:31.000Z (over 4 years ago)
- Last Synced: 2025-01-16T12:52:40.703Z (4 months ago)
- Language: CMake
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# C Unittest Example

[](https://codecov.io/gh/WingLim/c-unittest-example)Use [CMocka](https://cmocka.org) and [CodeCov](https://about.codecov.io)
## Usage
Test in local:
```shell script
CODECOV=ON IWYU=OFF make cmake coverage
```Upload report:
`.cc_token` alread ignore in `.gitignore`
```shell script
echo "YOUR TOKEN" > .cc_token
bash <(curl -s https://codecov.io/bash) -f cmake-build-debug/codecov.xml -t @.cc_token
```