Skip to content
Snippets Groups Projects
Commit aaa08d36 authored by Guido Gunther's avatar Guido Gunther :zzz: Committed by Guido Gunther
Browse files

test_audio: Use skipif to distinguish phone and devkit test

parent d255b817
No related branches found
No related tags found
No related merge requests found
Pipeline #49670 passed
from . import boardtype
import os
import pytest
import subprocess
......@@ -10,12 +12,20 @@ def tempdir():
yield tmpdir
@pytest.mark.skipif(not boardtype.is_devkit(), reason="Not a devkit")
def test_sgtl5000():
"Check if the sgtl5000 audio codec is there"
out = subprocess.check_output(["aplay", "-l"])
assert b"[sgtl5000]" in out
@pytest.mark.skipif(not boardtype.is_librem5(), reason="Not a phone")
def test_wm8962():
"Check if the audio codec is there"
out = subprocess.check_output(["aplay", "-l"])
assert b"[wm8962]" in out
def test_headphone_detection():
"Check if we registered the headphone detection IRQ"
f = open("/proc/interrupts")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment