-
Notifications
You must be signed in to change notification settings - Fork 953
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
wasm Testing Infrastructure #3162
Comments
This sounds interesting for me. I guess running something like the hello-triangle example as a wasm-bindgen test in a headless chrome via GH actions would be a good scope for a first version? |
Getting https://github.com/gfx-rs/wgpu/blob/master/wgpu/tests/device.rs#L3 working would be a good first shot to make sure the |
@cwfitzgerald I started a quick&dirty prototype of what I had in mind: #3238 Maybe it's easier now for exchanging more specific ideas. Could fn init() be reused for the mentioned test in |
I added a couple comments to the PR.
Nothing, that test is just checking that the device is made correctly.
The end goal here is to get the wasm testing adaptations (the canvas/surface setup stuff in init.rs) into initialize_test such that we can run all of our normal tests in wasm without modifying them at all. We don't actually need a surface, except to get the Webgl2 context. I specified device.rs only because it's just testing device creation - so if you get that test working, you should be able to get the test of them working by just appropriately attributing them. |
Ah okay, I think I am starting to understand. Is the idea to add |
Yup! |
We currently are only able to run our tests on native. We should implement support for running our tests on top of WebGL/WebGPU in a headless browser.
This would consist of a couple changes:
Our tests are designed to be run from separate processes, but running single threaded is okay, so we should be fine.
We may need to embed the test images into the binary because we don't have file IO.
The text was updated successfully, but these errors were encountered: