mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-06-26 17:10:38 +00:00
Fix Linux build agent audio problems
It's still not entirely clear what the underlying issue is, but the ALSA device provided by pulseaudio stops working after so many tests use it. I've tried various approaches, but simply restarting pulseaudio after every test is a bruteforce but successful solution. In practice it also doesn't have any noticeable performance penalty, so it seems like a file solution. The `CI_TESTING` environment variable is used to avoid restarting pulseaudio if the tests aren't being run in the CI environment (we don't want to restart your pulseaudio instance if you're running them locally!)
This commit is contained in:
parent
b06e5dd70b
commit
2deac87b60
2
.github/workflows/build-process.yml
vendored
2
.github/workflows/build-process.yml
vendored
|
@ -82,6 +82,8 @@ jobs:
|
|||
|
||||
- name: Test
|
||||
shell: bash
|
||||
env:
|
||||
CI_TESTING: y
|
||||
run: tests/run_tests.sh
|
||||
|
||||
- name: Create QB64-PE Artifact
|
||||
|
|
|
@ -87,6 +87,13 @@ do
|
|||
|
||||
[ "$testResult" == "$expectedResult" ]
|
||||
assert_success_named "result" "Result is wrong:" show_incorrect_result "$expectedResult" "$testResult"
|
||||
|
||||
# Restart pulseaudio between each test to make sound tests work on Linux
|
||||
if [ "$CI_TESTING" == "y" ] && command -v pulseaudio > /dev/null
|
||||
then
|
||||
pulseaudio -k
|
||||
pulseaudio -D
|
||||
fi
|
||||
else
|
||||
! (exit $ERR)
|
||||
assert_success_named "Compile" "Compilation Success, was expecting error:" show_failure "$category" "$testName"
|
||||
|
|
Loading…
Reference in a new issue