1
1
Fork 0
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:
Matthew Kilgore 2022-09-16 23:59:07 -04:00
parent b06e5dd70b
commit 2deac87b60
2 changed files with 9 additions and 0 deletions

View file

@ -82,6 +82,8 @@ jobs:
- name: Test
shell: bash
env:
CI_TESTING: y
run: tests/run_tests.sh
- name: Create QB64-PE Artifact

View file

@ -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"