-
Notifications
You must be signed in to change notification settings - Fork 8.1k
add display test harness #91597
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
add display test harness #91597
Conversation
7c5c4ef to
d71c396
Compare
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.
Interesting approach, very comprehensive and could help testing Zephyr-based UVC cameras themselves as well maybe some day.
Out of curiosity, is it resilient to the DUT being rotated and moved slightly by accident? While looking quickly, I did not find anything to try to crop the view to the display rectangle only.
A few comments left to help move this forward.
scripts/pylib/display-twister-harness/camera_shield/config.yaml
Outdated
Show resolved
Hide resolved
scripts/pylib/display-twister-harness/camera_shield/plugins/signature_plugin.py
Show resolved
Hide resolved
scripts/pylib/display-twister-harness/camera_shield/uvc_core/camera_controller.py
Outdated
Show resolved
Hide resolved
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 introduces a display test harness that uses a camera to capture display output, computes fingerprints at customer runtime, and compares them against reference frames in CI.
- Added board configuration files and overlay settings for display tests
- Extended Twister schema and harness to support a new
display_capturetest mode - Introduced a standalone
display-twister-harnessPython package with camera capture and fingerprint plugins
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/drivers/display/display_check/boards/*.conf/.overlay | Added per-board display test memory and overlay configs |
| tests/drivers/display/display_check/CMakeLists.txt | Defined Zephyr test project sources |
| scripts/schemas/twister/testsuite-schema.yaml | Extended schema with optional display_capture_config |
| scripts/pylib/twister/twisterlib/testinstance.py | Whitelisted display_capture harness |
| scripts/pylib/twister/twisterlib/harness.py | Implemented Display_capture harness subclass |
| scripts/requirements-run-test.txt | Added OpenCV and NumPy dependencies |
| scripts/pylib/display-twister-harness/{test_display.py,…} | New pytest fixtures, tests, and camera capture code |
| scripts/pylib/display-twister-harness/camera_shield/** | Core camera controller, plugin base, and plugin API |
| scripts/pylib/display-twister-harness/camera_shield/README.rst | Usage and setup documentation |
Comments suppressed due to low confidence (7)
scripts/pylib/display-twister-harness/README.rst:12
- Typo in comment: 'reslution' should be 'resolution'.
rex_x: 1280 # x reslution
scripts/pylib/display-twister-harness/README.rst:30
- Typo in comment: 'direcory' should be 'directory'.
# directory: "./fingerprints" # fingerprints direcory to compare with not used in generate mode
scripts/pylib/display-twister-harness/README.rst:118
- Typo in comment above: 'mutliply fingure prints' should be 'multiply fingerprint files'.
but will help to check other defects.
scripts/pylib/display-twister-harness/camera_shield/config.yaml:1
- The key 'rex_x' appears to be a typo; it should be 'res_x' to match the rest of the code.
case_config: {device_id: 0, fps: 30, res_y: 720, rex_x: 1280, run_time: 20}
scripts/pylib/twister/twisterlib/harness.py:632
- [nitpick] Class names typically follow PascalCase without underscores; consider renaming to
DisplayCapturefor consistency.
class Display_capture(Pytest):
scripts/pylib/display-twister-harness/test_display.py:19
- [nitpick] The docstring for
get_promptis very generic; consider describing the structure of the returned dict and possible keys.
def get_prompt(config):
tests/drivers/display/display_check/boards/mimxrt1170_evk_mimxrt1176_cm7.conf:7
- The comment uses 'panelwidth' twice but the example calculation uses height; clarify which dimensions are used in the formula.
# Sample will allocate buffer equal to: (panelwidth / 8) * (panelwidth / 4) * pixel depth. For a
scripts/pylib/display-twister-harness/camera_shield/uvc_core/plugin_base.py
Show resolved
Hide resolved
No by current algorithm, as this could be a problem the display is wrongly goes to upside down. but it is extendable. |
f2cb344 to
e1a1214
Compare
|
It looks like this project can be used for testing a lot of things that are difficult to test automatically on Zephyr:
Right away or in the future, it can be interesting to rename For what it currently does, |
10e4383 to
3372969
Compare
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.
There is no need to add me as co-author:)
9bf7072 to
c63afc4
Compare
c63afc4 to
4ff95ab
Compare
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.
Last nits, otherwise looks great!
4ff95ab to
1b4e54e
Compare
1b4e54e to
99425c1
Compare
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.
Sorry for noticing it just now, only some very small changes, but otherwise it's all ok.
99425c1 to
6a6d1f1
Compare
|
display harness to validate display content Signed-off-by: Hake Huang <[email protected]> Co-authored-by: Abderrahmane JARMOUNI <[email protected]>
add a test case for display using display harness Signed-off-by: Hake Huang <[email protected]> Co-authored-by: Abderrahmane JARMOUNI <[email protected]>



introduce a display test harness.
please check the readme for more details