Commit 9289dc8a authored by Martin Kepplinger's avatar Martin Kepplinger
Browse files

pytests: add touchscreen firmware version check

only tests if the screen is on but this will make us definitely find
a wrong version soon enough.
parent d78a8a7d
from . import boardtype
import pytest
def read_firmware_version():
with open('/sys/kernel/debug/edt_ft5x06/fw_version') as f:
return int(f.read())
@pytest.mark.skipif(not boardtype.is_librem5(), reason="Not a phone")
@pytest.mark.skipif(abs(read_firmware_version()) > 100,
reason="Firmware version only readable while screen on.")
def test_firmware_version():
assert(read_firmware_version() == 3)
def test_touch_controller():
if boardtype.is_librem5():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment