Add bare CException unit testing for different platforms and compilers - #33
Add bare CException unit testing for different platforms and compilers#33swaldhoer wants to merge 18 commits into
Conversation
Add more strict compiler options for GCC and Clang
| @@ -1 +1 @@ | |||
| --- | |||
There was a problem hiding this comment.
You can see at https://github.com/swaldhoer/CException/actions that the tests are working as expected.
| Logs.warn("Cannot generate coverage report.") | ||
| return | ||
| gcovr_options = [] | ||
| if bld.env.CC_NAME == "clang": |
There was a problem hiding this comment.
All Linux/Clang stuff works, except that there is no coverage report generated.
(WARNING) All coverage data is filtered out. Please check your paths and filters.
I do not really understand why coverage data is not created for clang (maybe something with LLVM_PROFILE_FILE environment variable).
If this is a blocker, I'll look into it, otherwise I'd have no problem leaving this as it is, as the current unit testing works and the overall Situation for Linux/Clang is already improved by this MR.
|
Hi @swaldhoer -- I'm not following the goal of the change. To be honest, this is close to how this project was originally tested. Some time ago, we realized that we can verify it works on many more platforms with less effort if we just dropped all the manual test wrangling here, and used Ceedling which already can handle coverage, common (and uncommon) toolchains, etc. Since the only effect was on the TESTING of this toolchain, usually done by devs of CException, we decided that the added dependencies (for testing only) were worthwhile. For anyone else, they only need this project. |
Spoiler: Sorry the MR grew a bit in size, but it's worth in the end!
What: Build and unit test CException on different Linux (GCC, Clang) and Windows(GCC and MSVC) without having the full dependency on Ceedling or Unity, i.e., it implements a bare unit test of CException just using
<assert.h>, to show that it does what it promises.What has been done:
test/TestException.candtests/support/CExceptionConfig.h: Add minimal boiler plate for bare testing.wafandwscript: We need a simple tool to build the run the tests.What actually needs to be done is documented in the
wscriptitself.Please create some comments on the lines that would need some more documentation/explanation.
Throware covered.