lid_switch¶
Source code: lid_switch.py
Tests lid switch functionality.
Description¶
Test lid switch functionality by listening to lid switch event.
Test Procedure¶
If a BFT fixture is set: - ask the fixture to simulate a lid close event - confirm the event is received - ask the fixture to simulate a lid open event - confirm the event is received
If there is no BFT fixture, the operator should close and open the lid manually.
Dependency¶
Depends on ‘evdev’ module to monitor events.
If
ok_audio_path
is set, depends on audio function to play a sound to indicate the lid close event is received.
Examples¶
LidSwitch
is defined in the generic_common test list, it calls this test
with default arguments.
Test Arguments¶
Name |
Type |
Description |
---|---|---|
timeout_secs |
int |
(optional; default: |
ok_audio_path |
str, None |
(optional; default: |
audio_volume |
int |
(optional; default: |
device_filter |
int, str, None |
(optional; default: |
bft_fixture |
dict, None |
(optional; default:
The default value of |
bft_retries |
int |
(optional; default: |
bft_pause_secs |
int, float |
(optional; default: |
brightness_path |
str, None |
(optional; default: |
brightness_when_closed |
int, None |
(optional; default: |
check_delayed_backlight |
bool |
(optional; default: |
bft_control_name |
str |
(optional; default: |