Skip to content

fix(uart): Fixes UART CI script to work with Arduino Core 3.2.x #11077

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

Merged
merged 14 commits into from
Mar 17, 2025

Conversation

SuGlider
Copy link
Collaborator

@SuGlider SuGlider commented Mar 12, 2025

Description of Change

Fixes the UART CI script to work correctly with Arduino Core 3.1.2+ / 3.2.x

Tests scenarios

ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C6 | ESP32-P4 using the CI script

Related links

None

Copy link
Contributor

github-actions bot commented Mar 12, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello SuGlider, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 293d0bf

Copy link
Contributor

github-actions bot commented Mar 12, 2025

Test Results

 76 files   76 suites   12m 49s ⏱️
 38 tests  36 ✅ 0 💤 2 ❌
241 runs  239 ✅ 0 💤 2 ❌

For more details on these failures, see this check.

Results for commit 293d0bf.

♻️ This comment has been updated with latest results.

@SuGlider SuGlider marked this pull request as draft March 12, 2025 01:56
@SuGlider SuGlider marked this pull request as ready for review March 14, 2025 20:25
@SuGlider SuGlider moved this from In Progress to In Review in Arduino ESP32 Core Project Roadmap Mar 14, 2025
@SuGlider SuGlider added the Status: Review needed Issue or PR is awaiting review label Mar 14, 2025
@lucasssvaz
Copy link
Collaborator

Is ESP32 test also supposed to pass ?

@SuGlider
Copy link
Collaborator Author

SuGlider commented Mar 16, 2025

Is ESP32 test also supposed to pass ?

Yes. It works with the real device. It just fails with Wokwi.


-The sketch with the ESP32 and Wokwi reports 2 fails, but if I comment out the Line 56 [pinMode()], it doesn't fail:

/tmp/hexi-esp32:esp32:esp32/sketch/sketch.ino:80:basic_transmission_test:FAIL: Expected 'Hello from Serial1 ' Was ''
/tmp/hexi-esp32:esp32:esp32/sketch/sketch.ino:450:periman_test:FAIL: Expected '' Was '\xE0'
Change pins test successful

  • Using the Real ESP32 device, it reports NO Fail, but if I comment out the same Line 56, it reports 2 different Fails:
C:\Users\esp\Documents\Arduino\CI_HardwareSerial_test\CI_HardwareSerial_test.ino:80:periman_test:FAIL: Expected 'Hello from Serial2 while I2C is disabled' Was ''
C:\Users\esp\Documents\Arduino\CI_HardwareSerial_test\CI_HardwareSerial_test.ino:80:change_pins_test:FAIL: Expected 'Hello from Serial1 using new pins' Was ''

Wokwi ESP32 fails with the pinMode() in line 56|58
Real device with Arduino Core 3.1.2 and 3.2 needs it to fix the issue.
This patch will skip the pinMode() when compiling with Wokwi and make it pass the CI test case.
@SuGlider
Copy link
Collaborator Author

SuGlider commented Mar 16, 2025

@lucasssvaz - Wokwi reports different CI test results than the real ESP32 device.

Is there any way to detect that it is running on Wokwi and skip the part of the code (pinMode() Line 56)?
Something like #ifdef WOKWI...
It would be a work around for Wokwi.... not sure if this something wishful.

@SuGlider
Copy link
Collaborator Author

SuGlider commented Mar 16, 2025

@lucasssvaz - I have found out that Wokwi runs Arduino Core 3.1.1. The target of this patch is for Core 3.1.2 onwards. That may explain the issue with ESP32 and Wokwi.

Note: using Arduino Core 3.1.1 + ESP32, it won't fail in the Real Device... only Wokwi fails.

@lucasssvaz
Copy link
Collaborator

@lucasssvaz - I have found out that Wokwi runs Arduino Core 3.1.1. The target of this patch is for Core 3.1.2 onwards. That may explain the issue with ESP32 and Wokwi.

Note: using Arduino Core 3.1.1 + ESP32, it won't fail in the Real Device... only Wokwi fails.

Wokwi runs the binaries we compile, in this case 3.2.0. Wokwi online editor has fixed versions like this but its not our case.

Anyway, if it works in the actual hardware. That's what matters. I will report to Uri.

@lucasssvaz
Copy link
Collaborator

@SuGlider Can you test wokwi locally with the changes I pushed to see if it works ?

@SuGlider
Copy link
Collaborator Author

@SuGlider Can you test wokwi locally with the changes I pushed to see if it works ?

No, it also fails locally.

/tmp/hexi-esp32:esp32:esp32/sketch/sketch.ino:453:periman_test:FAIL: Expected '' Was '\xFF'
Change pins test successful
/tmp/hexi-esp32:esp32:esp32/sketch/sketch.ino:557:change_pins_test:PASS
End when stopped test successful
/tmp/hexi-esp32:esp32:esp32/sketch/sketch.ino:558:end_when_stopped_test:PASS

-----------------------
11 Tests 1 Failures 0 Ignored 

P-R-O-C-H-Y
P-R-O-C-H-Y previously approved these changes Mar 17, 2025
@P-R-O-C-H-Y P-R-O-C-H-Y dismissed their stale review March 17, 2025 10:50

failing CI, missed the comments

@lucasssvaz lucasssvaz added the Status: Pending Merge Pull Request is ready to be merged label Mar 17, 2025
@me-no-dev me-no-dev merged commit 74ee9df into master Mar 17, 2025
25 of 28 checks passed
@me-no-dev me-no-dev deleted the fix/uart_ci_test branch March 17, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Peripheral: UART Status: Pending Merge Pull Request is ready to be merged Status: Review needed Issue or PR is awaiting review Type: CI & Testing
Projects
Development

Successfully merging this pull request may close these issues.

4 participants