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 22 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 55.44554% with 90 lines in your changes missing coverage. Please review.

Project coverage is 82.75%. Comparing base (32f72c9) to head (8a7f774).

Files with missing lines Patch % Lines
Sts1CobcSw/Periphery/FlashMock.cpp 0.00% 54 Missing ⚠️
Sts1CobcSw/Hal/SpiMock.cpp 39.28% 17 Missing ⚠️
Sts1CobcSw/CobcSoftware/StartupTestThreadStubs.cpp 80.95% 8 Missing ⚠️
Sts1CobcSw/Hal/SpiMock.hpp 16.66% 5 Missing ⚠️
Sts1CobcSw/Hal/Spi.cpp 40.00% 3 Missing ⚠️
Tests/IntegrationTests/SpiSupervisor.test.cpp 93.93% 2 Missing ⚠️
...CobcSoftware/SpiStartupTestAndSupervisorThread.cpp 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   87.27%   82.75%   -4.53%     
==========================================
  Files          37       47      +10     
  Lines        1352     1577     +225     
  Branches       50       57       +7     
==========================================
+ Hits         1180     1305     +125     
- Misses        172      272     +100     

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


🚨 Try these New Features:

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
@kamilchmela kamilchmela force-pushed the test-error-handling-for-spi branch 3 times, most recently from 61c8644 to 4b579ed Compare November 22, 2024 11:37
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