Commit aaa08d36 authored by Guido Gunther's avatar Guido Gunther Committed by Guido Gunther

test_audio: Use skipif to distinguish phone and devkit test

parent d255b817
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")
......
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