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

Refactor testing, add defmt, add async gpio test #1363

Merged
merged 8 commits into from
Apr 2, 2024

Conversation

MabezDev
Copy link
Member

Thank you for your contribution!

We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:

Submission Checklist 📝

  • I have updated existing examples or added new ones (if applicable).
  • My changes were added to the CHANGELOG.md in the proper section.

Extra:

Pull Request Details 📖

Description

It's really annoying when a panic happens and you can't see the output, this also allows logging to be intermingled when testing, which will be very useful when debugging tests. The backtrace output via defmt though is really not that great, but at the very least a message is displayed.

Testing

Run the HIL suite locally.

@MabezDev MabezDev added the skip-changelog No changelog modification needed label Mar 30, 2024
@MabezDev
Copy link
Member Author

One cool thing here is that it is actually possible to mix async and sync tests! Not super useful, but in the case of GPIO where they it can be used in async and blocking it makes sense.

@MabezDev MabezDev force-pushed the async-gpio-tests branch 2 times, most recently from b7974b9 to da1c4f7 Compare March 31, 2024 00:04
@MabezDev
Copy link
Member Author

Drafting until esp-rs/esp-pacs#221 as it will fail in the HIL stage.

@MabezDev MabezDev marked this pull request as draft March 31, 2024 00:05
@MabezDev MabezDev marked this pull request as ready for review April 1, 2024 14:19
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Just a couple little nitpicks but otherwise LGTM

@MabezDev MabezDev requested a review from jessebraham April 1, 2024 16:03
Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Thanks for making those changes!

@jessebraham jessebraham added this pull request to the merge queue Apr 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 1, 2024
@jessebraham
Copy link
Member

@SergioGasquez should we just try re-running the tests when this happens, or what is the best course of action?

@jessebraham
Copy link
Member

Seems to be working in my PR, so let's try again...

@jessebraham jessebraham added this pull request to the merge queue Apr 1, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 1, 2024
@MabezDev
Copy link
Member Author

MabezDev commented Apr 1, 2024

I think this might actually be an issue, will investigate.

@MabezDev
Copy link
Member Author

MabezDev commented Apr 1, 2024

Yeah so @bugadani already warned me about this, and then I subsequently forgot 😅. The last pin, pin 30 (31) is used for flash, for chips with embedded flash. When we change the pin operation, we break that and then the program goes nuts.

I'm not sure how we test this without breaking functionality, any ideas?

If there isn't a good way to do this, we can drop that test for now, there are still some good changes in here regardless.

@MabezDev MabezDev removed the skip-changelog No changelog modification needed label Apr 1, 2024
@MabezDev
Copy link
Member Author

MabezDev commented Apr 1, 2024

Eh, I just simplified the test. Add a changelog for the GPIO API too.

Copy link
Member

@SergioGasquez SergioGasquez left a comment

Choose a reason for hiding this comment

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

LGTM! Also, I will update all the VMs to use the latest probe-rs as C6 has an older revision.

@MabezDev
Copy link
Member Author

MabezDev commented Apr 2, 2024

LGTM! Also, I will update all the VMs to use the latest probe-rs as C6 has an older revision.

Thanks! In this case the corrupted control block was a real error that HIL caught 💪, but would be good to be running the latest code.

@MabezDev MabezDev added this pull request to the merge queue Apr 2, 2024
Merged via the queue into esp-rs:main with commit 21d833d Apr 2, 2024
21 checks passed
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.

4 participants