display¶
Source code: display.py
Test display functionality.
Description¶
This test checks basic display functionality by showing colors or images on display, and asks the operator to judge if the output looks correct.
The test can also be used to show an image for idle_timeout
seconds, and
automatically pass itself after timeout is reached.
Test Procedure¶
Idle mode
If idle_timeout
is set and symptoms
is not set:
An image is shown on the display.
If the image looks incorrect, press escape key to fail the test.
The test passes itself after
idle_timeout
seconds.
Normal mode
If idle_timeout
and symptoms
are both not set:
A table of images to be tested is shown.
Operator presses space key to show the image.
For each image, if it looks correct, operator presses enter key to mark the item as passed, otherwise, operator presses escape key to mark the item as failed. Operator can press space key to return to the table view.
The next image would be shown after the previous one is judged.
The test is passed if all items are judged as passed, and is failed if any item is judged as failed.
Symptom mode
If symptom
is set and idle_timeout
is not set:
A table of images and symptoms to be checked is shown.
For each symptom, if it is observed, click the corresponding symptom grid to mark it.
Press enter to end the subtest. The test is passed if all symptoms are not marked, and is failed if any symptom is marked.
The next image would be shown after the previous one is judged.
The test is passed if all items are judged as passed, and is failed if any item is judged as failed.
Dependency¶
- Each item of
items
is either: image-<image_name>
: The corresponding <image_name> should be in thecompressed file
test_images.tar.bz2
. For example, if the item is “image-horizontal-rgbw.bmp”, an image named “horizontal-rgbw.bmp” should be intest_images.tar.bz2
. We support image file formats: apng, avig, bmp, gif, ico, jpeg, png, svg, and webp.
hex-color-<hex_color_code>
.A predefined CSS item listed in
_CSS_ITEMS
.
Examples¶
To test display functionality, add this into test list:
{
"pytest_name": "display",
"label": "Display",
"related_components": [
"test_tags.TestCategory.LCD"
]
}
To test display functionality, show gray image, idle for an hour and pass, add this into test list:
{
"pytest_name": "display",
"label": "Display Gray For An Hour",
"related_components": [
"test_tags.TestCategory.LCD"
],
"args": {
"items": [
"solid-gray-127"
],
"idle_timeout": 3600
}
}
To test images with symptoms, add this into test list:
{
"pytest_name": "display",
"label": "Front Of Screen Test (Symptom mode)",
"related_components": [
"test_tags.TestCategory.LCD"
],
"args": {
"items": [
"image-complex.bmp",
"solid-red",
"hex-color-#afafaf"
],
"symptoms": [
"Symptom1",
"Symptom2",
"Dark Dots",
"Light Leakage",
"Others"
]
}
}
To test display functionality, and show some more images, add this into test list:
{
"pytest_name": "display",
"label": "Front Of Screen Test (More Images)",
"related_components": [
"test_tags.TestCategory.LCD"
],
"args": {
"items": [
"grid",
"rectangle",
"gradient-red",
"image-complex.bmp",
"image-black.bmp",
"image-white.bmp",
"image-crosstalk-black.bmp",
"image-crosstalk-white.bmp",
"image-gray-63.bmp",
"image-gray-127.bmp",
"image-gray-170.bmp",
"image-horizontal-rgbw.bmp",
"image-vertical-rgbw.bmp",
"hex-color-#afafaf",
"hex-color-#abc"
]
}
}
Default images in compressed file test_images.tar.bz2
:
['black.bmp',
'complex.bmp',
'crosstalk-black.bmp',
'crosstalk-white.bmp',
'gray-127.bmp',
'gray-170.bmp',
'gray-63.bmp',
'horizontal-rgbw.bmp',
'vertical-rgbw.bmp',
'white.bmp']
Test Arguments¶
Name |
Type |
Description |
---|---|---|
items |
list |
|
idle_timeout |
int, None |
(optional; default: |
quick_display |
bool |
(optional; default: |
show_timer |
bool |
(optional; default: |
symptoms |
list |
(optional; default: |