-
-
Notifications
You must be signed in to change notification settings - Fork 0
Enhance tests TODO #1
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
base: master
Are you sure you want to change the base?
Conversation
👋 Hello JakubAndrysek, 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 ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the existing GPIO validation suite and introduces a new set of GPIO‐interrupt tests with matching scenarios, code, and board diagrams.
- Adds comprehensive interrupt scenarios and Unity tests for attach/detach, edge, change, and argument callbacks.
- Refactors basic GPIO tests into distinct read/write Unity cases and updates the Wokwi scenario to include pin expectations.
- Supplies updated device diagrams and CI configuration for multiple ESP32 variants for both GPIO and GPIO‐interrupt tests.
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/validation/gpio_interrupt/scenario.yaml | New YAML scenarios covering attach/detach, rising/falling, change, and argument‐based tests. |
tests/validation/gpio_interrupt/gpio_interrupt.ino | Arduino Unity tests implementing all GPIO interrupt scenarios. |
tests/validation/gpio_interrupt/ci.json | Enables Wokwi‐only CI for interrupt tests. |
tests/validation/gpio_interrupt/diagram.*.json | Added Wokwi diagrams for ESP32, ESP32‐S2, S3, C3, C6, P4, H2 boards for interrupt tests. |
tests/validation/gpio/scenario.yaml | Updated basic GPIO read/write scenario with explicit expect‐pin steps. |
tests/validation/gpio/gpio.ino | Refactored from a single counter test into separate Unity tests for read and write. |
tests/validation/gpio/test_gpio.py | Simplified Python test to verify completion marker. |
tests/validation/gpio/diagram.*.json | Updated Wokwi diagrams for multiple ESP32 variants for basic GPIO tests. |
Comments suppressed due to low confidence (3)
tests/validation/gpio/gpio.ino:2
- Add
#include <Arduino.h>
before using pinMode and digitalRead to ensure the Arduino core APIs are available.
#include <unity.h>
tests/validation/gpio/scenario.yaml:3
- [nitpick] Combine or reformat the author field into a single clear string (e.g., comma-separated or 'and') to keep the YAML clean and valid.
author: Jan Prochazka ([email protected]) + Jakub Andrysek ([email protected])
tests/validation/gpio/test_gpio.py:4
- [nitpick] This test only checks the end marker; consider adding assertions for intermediate serial messages or pin state checks to improve coverage of the read/write behavior.
def test_gpio(dut):
} | ||
|
||
void test_write_basic(void) { | ||
Serial.println("GPIO write - basic test"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This print message doesn’t match scenario.yaml, which expects "GPIO write - basic START". Update it to match the scenario.
Serial.println("GPIO write - basic test"); | |
Serial.println("GPIO write - basic START"); |
Copilot uses AI. Check for mistakes.
assert(digitalRead(BTN) == 1); | ||
TEST_ASSERT_EQUAL(HIGH, digitalRead(BTN)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Replace the raw C assert() with a Unity assertion macro (e.g., TEST_ASSERT_EQUAL) for consistent test reporting.
assert(digitalRead(BTN) == 1); | |
TEST_ASSERT_EQUAL(HIGH, digitalRead(BTN)); | |
TEST_ASSERT_EQUAL(HIGH, digitalRead(BTN)); | |
TEST_ASSERT_EQUAL(HIGH, digitalRead(BTN)); |
Copilot uses AI. Check for mistakes.
TODO
By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes
Checklist
This entire section above can be deleted if all items are checked.
Description of Change
Please describe your proposed Pull Request and it's impact.
Tests scenarios
Please describe on what Hardware and Software combinations you have tested this Pull Request and how.
(eg. I have tested my Pull Request on Arduino-esp32 core v2.0.2 with ESP32 and ESP32-S2 Board with this scenario)
Related links
Please provide links to related issue, PRs etc.
(eg. Closes #number of issue)