libs/vulkan/zerocopy/agent_docs/ui_tests.md
When updating UI test files (tests/ui-* or zerocopy-derive/tests/ui-*) or
functionality which could affect compiler error output or derive output, run:
./tools/update-expected-test-output.sh.
Note: We maintain separate UI tests for different toolchains (ui-msrv,
ui-stable, ui-nightly) because compiler output varies. The script handles
this automatically.
To share test code across toolchains while allowing for different error output, we use a symlink pattern:
ui-nightly directory holds the actual source
files (.rs).ui-stable and ui-msrv directories contain symlinks
to the .rs files in ui-nightly.
tests/ui-stable/foo.rs -> ../ui-nightly/foo.rs.stderr files..rs file in ui-nightly.ui-stable and ui-msrv pointing to the
new file in ui-nightly../tools/update-expected-test-output.sh to generate the .stderr files..rs file in ui-nightly../tools/update-expected-test-output.sh to update the .stderr files..rs file from ui-nightly.ui-stable and ui-msrv..stderr files from all three directories.NEVER edit .stderr files directly. Only update them via the script or the
commands it runs. If a .stderr file is causing a test failure and updating it
via tooling does not fix the failure, that indicates a bug.