Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate audio device for running tests on GitHub Actions #12

Open
orhun opened this issue Oct 1, 2023 · 0 comments
Open

Simulate audio device for running tests on GitHub Actions #12

orhun opened this issue Oct 1, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@orhun
Copy link
Owner

orhun commented Oct 1, 2023

Is your feature request related to a problem? Please describe.

Currently we can't run the audio tests on a GitHub runner since it requires a audio device to be present:

ALSA lib confmisc.c:855:(parse_card) cannot find card '0'
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
ALSA lib confmisc.c:422:(snd_func_concat) error evaluating strings
test app::tests::test_handle_key_event ... FAILED

failures:

---- app::tests::test_handle_key_event stdout ----
Error: Stream(DefaultStreamConfigError(DeviceNotAvailable))
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1334:(snd_func_refer) error evaluating name
ALSA lib conf.c:5178:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5701:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM default


failures:
    app::tests::test_handle_key_event

test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.11s

Describe the solution you'd like

Either simulate an audio device (or create it virtually) for running the tests like this:

cargo test --features audio-tests

Describe alternatives you've considered

Update the existing tests for running without an audio device - e.g. create mock objects for sinks etc.

Additional context

@orhun orhun added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Oct 1, 2023
@orhun orhun self-assigned this Oct 1, 2023
@orhun orhun removed their assignment Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant