Comments (11)
Code to determine newly added functions in pull requests and warn or reject if unit tests not added
How it work? Tool literally check if new function
(in programming language meaning) was added?
from flipperzero-firmware.
Now we have draft test, simple build special firmware, run test functions and check results:
docker-compose exec dev make -C target_lo test
I understand this is not perfect test environment and would be great to improve and automate it.
from flipperzero-firmware.
Maybe we should use any C test framework?
from flipperzero-firmware.
Maybe we should use any C test framework?
I have some experience with http://cunit.sourceforge.net/ (maybe fork of CUnit cunity
- https://gitlab.com/cunity )
from flipperzero-firmware.
Can you adapt existing test to CUnit?
from flipperzero-firmware.
Can you adapt existing test to CUnit?
Yes, I can try.
from flipperzero-firmware.
Code to determine newly added functions in pull requests and warn or reject if unit tests not added
IMO, that approach is not good, especially rejecting. Either it will force you to make less functions, or to make simple silly tests. And, while silly tests will run function at least once, it's not enough to skip code review.
I see this specific issue as human-oriented, because "enough tests" or "good tests" should be determined by human, and thus it should not be solved by technical means. Aided by - maybe. I.e. warnings about new functions without single test should be accessible by reviewers from PR, not buried down in build logs on developer or CI machine.
from flipperzero-firmware.
IMO, that approach is not good, especially rejecting "enough tests" or "good tests" should be determined by human
Looks reasonably, determine test "quality" by human point of view is more robust.
warnings about new functions without single test should be accessible by reviewers from PR
Is there any tools that show code coverage during PR directly in GitHub interface?
from flipperzero-firmware.
Is there any tools that show code coverage during PR directly in GitHub interface?
I'm not really familiar with modern GitHub. There certainly is coveralls and codecov, but I have no experience with them.
codecov declare some support for C, C++ and Rust, but is free for private repos only for up to 5 users.
coveralls is free only for open source, and don't even mention Rust in docs.
lcov has genhtml, which looks good enough for me, maybe there's a simple way to publish generated HTML as a build artifact and add a link to it in PR checks or comments.
grcov also has some kind of HTML report.
We also may want to build two separate reports for each PR - one with full coverage, and one with diff between PR base and head, but I didn't found that specific case in genhtml. codecov can add nice comment to PR on each update.
from flipperzero-firmware.
Chose https://github.com/barrust/c-utils#minunit. It's fork of https://github.com/siu/minunit. Simple testing framework, contains one .h file.
from flipperzero-firmware.
close by #168
from flipperzero-firmware.
Related Issues (20)
- Incorrect subghz frequency bands for Dominican Republic region (DO) HOT 1
- Electra lfrfid protocol bug? HOT 8
- Flipper zero
- hey can you please give an IPA file? im on iOS 15 and the app needs iOS 16 (Unless its using newer API) HOT 1
- LFRFID: Indala E9 Support HOT 1
- R/W NFC file while emulating it HOT 1
- CC1101: Impossible to send a long preamble HOT 2
- Flipper crashes when continuously opening and closing the Passport screen
- CC1101: Fixed-length packet mode not supported HOT 3
- CC1101: Impossible to change registers without resetting the device HOT 1
- A JavaScript module for GPIO
- PIN code boot ? HOT 1
- devboard_flash ARGS="-c dev" works with FBT, but not with uFBT HOT 5
- MIFARE Ultralight C hex dump shows bogus data for locked pages HOT 1
- U2F not working at all HOT 6
- Support multiple devices for BT remote HOT 3
- Wrong allowed frequency for SM HOT 4
- Documentation suggestion: mention most 125khz RFID a person receives are read-only
- LFRFID: chubb 125khz tag support HOT 1
- NFC: Desfire Poller furi_check failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flipperzero-firmware.