-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[AUDIO_WORKLET] tests in the CI don't appear to be run (in test_browser) #23131
Comments
It seems to stem from the change from |
@sbc100 As per the discussion here: I'd like to get these tests running (at least not silently failing). I've put some fixes in already (e.g. My question is, if I fix these they'll break the CI until other fixes are merged. What's the best way to do this? Would you like a separate PR that breaks things, or do they want rolling into #23508? The more I delve into it the more issues I'm finding, the latest being audio params ( *edit here: it is in the |
If you fix the tests so they correctly start failing you can temporarily mark them as |
And it is what I wrote a few comments back, it's the test being shut down with |
I would love to continue to use My hope is that all browser tests would use btest_exit one day. |
Wait, I thought it was impossible to run any audio tests during CI because they require user-interaction to start the audio? Don't they all need to interactive? |
It'd save me some time if you'd already had a sample of the main thread waiting on a worklet finishing. As for any audio tests running, good point. Chrome at least will start the AW code, which is enough to catch most of the failures. I'll look at it. |
Getting btest_exit to behave nicely with AUDIO_WORKLETS (and WASM_WORKERS in general) can be tricky because IIUC you cannot called Oh I found the PR I was working on: #22776 |
I did a quick test, I built this with
It won't play audio but if you look at the console it will create the worklet and perform most of the steps. It's enough to know in CI that initialisation works (esp. struct offsets and the message passing). I'll take a detour to look at what could be done. |
If I run via Could you try this? Build and launch
The default setting for port 8000 looks to be with audio: Is this a path worth going down to get the audio to more than just build? |
Are you saying that port 8000 is somehow magic. That would seem very odd to me. I will see if I can verify that. We should probably add Or we should move them to |
Sounds odd, but yep. I'm going to repeat this on other machines too (I'm just worried my desktop has had its Chrome install tweaked to make my life easier).
Just compiling catches enough things, e.g., Let me know your finding. Would it be feasible to run the tests on port 8000 (which changes things if it turns out to be magic)? |
Compile-only tests don't need to live in the browser test suite. They can live in |
I don't see anything different about 8000 and, for example, 6931. The audio permissions in both cases is set to "Automatic (default)". |
Not on my home Mac laptop. I'll look into it. |
It's the Media Engagement Index (see If Chrome is passed this flag on launch:
E.g. on Mac:
Then it's possible to run tests without the interaction, and this could be added to tests the same as here, for example: emscripten/.circleci/config.yml Line 313 in ee4fe8a
And for Firefox setting the emscripten/.circleci/config.yml Line 359 in ee4fe8a
|
Funnily enough when I run browser.test_sdl2_mixer_wav without interaction that test will passes with no errors, but I don't hear the audio. When I run it with interaction I do hear audio, so somehow SDL audio is able to run regardless of interaction status. I'm not sure how it does that. Regarding enabling audio tests in CI, perhaps we could try that separately. I think it would involve removing I don't think we could still fix the audio worklet tests regardless though, probably by making them fail correctly and then marking them as |
The SDL implementation uses the traditional audio tag for playback, so doesn't have the same processing thread that never gets called. I'll take a look tomorrow at options for getting these running. I'll start with splitting out the last of my audio tests into their own PR, then look at fixing up everything to make it fail as you suggest. |
#23665 should now fail all of the parameterised Confirmed, they're all failing as expected with the test waiting forever: |
Step one of a fix for #23131 (the second part in #23695). Enabled Chrome's `FakeAudioOutputStream` for the CI machines and bypassed the need for user interaction. The Chrome tests are now enabled with `@requires_sound_hardware`. Many attempts at replicating the same functionally were tried with Firefox (details below) but audio would never run so its `EMTEST_LACKS_SOUND_HARDWARE` was left unchanged.
EDIT: short version, since I think the error is misleading: they're compiling but they're instantly exiting without running.
Testing with the latest Emscripten locally (3.1.74) and seeing the same in the result from CI. Open any of the CI runs and look at the browser tests, e.g.:
https://app.circleci.com/pipelines/github/emscripten-core/emscripten/38495/workflows/353c8dd2-db7a-4691-a83b-c1b8088f8959/jobs/859340
Search for
test_audio_worklet
and the parameterised tests all have the same 404 error with missing files:I noticed this locally, and thought it was just the way my system was set up, then given that I'd seen there was no way the CI was passing tests that should be failing, I dug deeper. The test runner doesn't find
test.aw.js
and if that is copied (or a link created) then it next fails ontest.js
.The tests are all passing though, I'm guessing because the main page opens and exits (interestingly it's only the Audio Worklets missing files, so 14 404s in
test_browser
's log).The text was updated successfully, but these errors were encountered: