Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
L
librem5-devkit-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
David Boddie
librem5-devkit-tools
Commits
aaa08d36
Commit
aaa08d36
authored
Nov 01, 2019
by
Guido Gunther
Committed by
Guido Gunther
Dec 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_audio: Use skipif to distinguish phone and devkit test
parent
d255b817
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
pytests/test_audio.py
pytests/test_audio.py
+10
-0
No files found.
pytests/test_audio.py
View file @
aaa08d36
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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment