Skip to content
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 error handling for SPI code #315

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

kamilchmela
Copy link
Contributor

@kamilchmela kamilchmela commented Jul 25, 2024

Fixes #305

@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 14.00000% with 86 lines in your changes missing coverage. Please review.

Project coverage is 82.00%. Comparing base (36adb18) to head (b202cf8).

Files with missing lines Patch % Lines
Sts1CobcSw/Periphery/FlashMock.cpp 0.00% 54 Missing ⚠️
Sts1CobcSw/Hal/SpiMock.cpp 0.00% 20 Missing ⚠️
Sts1CobcSw/Hal/SpiMock.hpp 0.00% 6 Missing ⚠️
Sts1CobcSw/Hal/Spi.cpp 0.00% 5 Missing ⚠️
Sts1CobcSw/Hal/Spi.hpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   87.27%   82.00%   -5.28%     
==========================================
  Files          37       42       +5     
  Lines        1352     1439      +87     
  Branches       50       50              
==========================================
  Hits         1180     1180              
- Misses        172      259      +87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@PatrickKa PatrickKa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • FlashMock.hpp only needs to declare what is necessary for mocking in addition to Flash.hpp. That means you need to remove everything up to and including extern hal::Spi spi; and include Flash.hpp instead. Also remove the duplicated comments at the top of the file.

Sts1CobcSw/Periphery/CMakeLists.txt Outdated Show resolved Hide resolved
Sts1CobcSw/Periphery/FlashMock.cpp Outdated Show resolved Hide resolved
Sts1CobcSw/Periphery/FlashMock.cpp Outdated Show resolved Hide resolved
Tests/HardwareTests/CMakeLists.txt Outdated Show resolved Hide resolved
@PatrickKa PatrickKa force-pushed the test-error-handling-for-spi branch 2 times, most recently from 3c9064f to 72944b6 Compare September 3, 2024 19:09
@kamilchmela kamilchmela force-pushed the test-error-handling-for-spi branch 4 times, most recently from afebffb to e7de75c Compare September 16, 2024 12:54
@PatrickKa PatrickKa force-pushed the test-error-handling-for-spi branch 4 times, most recently from 1969100 to 54f7c8a Compare September 23, 2024 18:38
@kamilchmela kamilchmela force-pushed the test-error-handling-for-spi branch 3 times, most recently from fe01b0d to 09d9d18 Compare September 29, 2024 18:40
The resume functions were not enough. We really needed the threads.
Everything is set up such that the startup tests pass and the real fun
can begin in the `run()` method of the test thread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test error handling for SPI code
3 participants