Fix/hanging single dut cases breaks followup test cases#378
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors Unity test case execution to fix an issue where hanging single DUT (Device Under Test) cases break subsequent test cases. The changes restructure the test execution flow to better handle failures and exceptions during test case setup and execution.
Key changes:
- Refactored test case execution from decorator-based approach to explicit method calls
- Extracted common Unity output parsing logic into a standalone function
- Added proper exception handling for pre-execution failures
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pytest-embedded-idf/pytest_embedded_idf/unity_tester.py | Refactored Unity test execution flow with better error handling and extracted parsing logic |
| .pre-commit-config.yaml | Updated ruff pre-commit hook version from v0.12.12 to v0.14.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@hfudev is it possible to add a test case to pytest-embedded/tests/fixtures/unit_test_app_esp32/main/case_tester_example.c (for example, entering an infinite loop) and check that it's handled correctly? |
@igrr I was thinking about this too. Just not sure where to add it since the reset between each sub case will make it non-blocking. Will add test cases for sure. |
31d2dc6 to
74c24e4
Compare
|
@horw PTAL again https://github.com/espressif/pytest-embedded/compare/31d2dc6a78870873a2deee99ac9f962563d3b1e0..74c24e4eb03d9f11efdccfdaecbeb7632f060118 The test case helped me find my unimplemented fix in CaseTester. I also reported an additional bug internally (CII-3). @igrr PTAL again. |
No description provided.