-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Add gcov coverage support #89
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
62d8cb2
to
157139d
Compare
14eb466
to
10604da
Compare
Added gcov coverage support to the test Makefile with the following changes: - Added COVERAGE flag to enable coverage compilation - Added coverage flags to CFLAGS and LDFLAGS when COVERAGE=1 - Added coverage target to run tests and generate coverage report - Added cleanup of gcov files in clean target Co-Authored-By: [email protected] <[email protected]>
10604da
to
4588675
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(aside) Seeing how Devin responds to comments.
test/Makefile
Outdated
CFLAGS = $(BASE_CFLAGS) $(COVERAGE_FLAGS) | ||
LDFLAGS = $(BASE_LDFLAGS) $(COVERAGE_FLAGS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The additional coverage flags should on be on source code and api's within the wolfHSM repository. Exclude files from the wolfSSL directory.
@@ -235,6 +247,12 @@ $(BUILD_DIR)/$(BIN).a: $(OBJS_ASM) $(OBJS_C) | |||
clean: | |||
rm -f $(BUILD_DIR)/*.elf $(BUILD_DIR)/*.hex $(BUILD_DIR)/*.map | |||
rm -f $(BUILD_DIR)/*.o $(BUILD_DIR)/*.a $(BUILD_DIR)/*.sym $(BUILD_DIR)/*.disasm | |||
rm -f $(BUILD_DIR)/*.gcno $(BUILD_DIR)/*.gcda $(BUILD_DIR)/*.gcov | |||
|
|||
coverage: COVERAGE=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting this target-specific variable does not work. Using "make coverage" does NOT set the proper coverage flags. Using "make COVERAGE=1 coverage" does work. Eliminate this target-specific variable rule.
rm -f $(BUILD_DIR)/*.gcno $(BUILD_DIR)/*.gcda $(BUILD_DIR)/*.gcov | ||
|
||
coverage: COVERAGE=1 | ||
coverage: clean build_app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the "make COVERAGE=1 coverage" to the Github workflow build-and-test.yml
Devin is currently unreachable - the session may have died. |
Co-Authored-By: [email protected] <[email protected]>
Closing due to inactivity. |
Add gcov coverage support to test suite
Added gcov coverage support to the test Makefile with the following changes:
Current coverage results:
Link to Devin run: https://app.devin.ai/sessions/ff7243791eab4cdca81156aea2ed22bc
Requested by: [email protected]