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 32 commits into
base: master
Choose a base branch
from

Conversation

kamilchmela
Copy link
Contributor

@kamilchmela kamilchmela commented Jul 25, 2024

Fixes #305
Fixes parts of #209

@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2024

Codecov Report

Attention: Patch coverage is 20.58824% with 54 lines in your changes missing coverage. Please review.

Project coverage is 92.86%. Comparing base (d2088ec) to head (51e57a4).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
Sts1CobcSw/Periphery/FlashMock.cpp 0.00% 54 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   97.69%   92.86%   -4.83%     
==========================================
  Files          33       34       +1     
  Lines        1039     1093      +54     
  Branches       25       25              
==========================================
  Hits         1015     1015              
- Misses         24       78      +54     

☔ 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 3 times, most recently from afebffb to e7de75c Compare September 16, 2024 12:54
@PatrickKa PatrickKa force-pushed the test-error-handling-for-spi branch 3 times, most recently from 72db7b8 to 23dee52 Compare September 22, 2024 17:53
PatrickKa and others added 6 commits September 23, 2024 18:36
This makes it easier to avoid cyclic dependencies.
We actually do need this to break the cyclic dependency between
`RealTime.hpp` and `FramLayout.hpp`.
@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
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