upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/testing.md
diff options
context:
space:
mode:
authormilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 17:11:26 -0600
committermilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 17:11:26 -0600
commit5431c75a6f7d7cd083b15524d8afe27ab461f28e (patch)
tree298278b7a1e79ffe17aa1390636b1e61ace26880 /docs/testing.md
parent2eb49b1a6fdbba711a5567613297a735503a6fcb (diff)
parent69935f84ee8d670626594c3c5e4a171b2e20fcf0 (diff)
Merge gpu-test/round-f64 into gpu-test/frexp-ldexp: main 6558d5318, with #1012 merged
Takes the updated head of #1034's branch, which holds main 6558d5318 (#1012, GPU-CMP-F64, is merged there). Git merged it without conflicts (git merge-tree, exit 0), and the tree is the one a direct merge of main gives. GitHub had reported a conflict since #1012 merged, with the branch and main on two merge bases (68d1331e5 and 50407827c). Merging #1034's head instead of main leaves this branch with one merge base with main when #1034 merges. The merged tree was tested before the push: every standalone test file under tests/ passes except tests/test_ci_registration.py, which fails on main 6558d5318 alone (#1365 fixes it). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md50
1 files changed, 49 insertions, 1 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 86ead44ee..07e49487b 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -218,6 +218,49 @@ and `vk_presenter_sync`, `xbox_present` and `dxgi_swapchain` pass, while they fa
218compositor for those three. Six still failed with a real display: `device_proxy`, `d3d12_xs_root_signature`, 218compositor for those three. Six still failed with a real display: `device_proxy`, `d3d12_xs_root_signature`,
219`xdxr_build`, `d3d12_xdxr_rt`, `d3d12_present` and `d3d12_compute`. 219`xdxr_build`, `d3d12_xdxr_rt`, `d3d12_present` and `d3d12_compute`.
220 220
221Run one after another as above, the suite takes several seconds per test, although a test started by hand takes 0.1 to
2221 second. Four settings make a local run of the cross-build much faster:
223
224```sh
225export WINEPREFIX="$HOME/.local/share/leonida-wine" WINEDEBUG=-all \
226 WINEDLLOVERRIDES="winedbg.exe=d;winemenubuilder.exe=d"
227mkdir -p "$WINEPREFIX"
228xvfb-run -a sh -c 'wineserver -p; wine wineboot -u </dev/null >/dev/null 2>&1
229 ctest --test-dir runtime/build/windows -j 6 --timeout 120; wineserver -k'
230```
231
232Start the server before `wineboot`: `wineserver -p` does nothing while another server runs for the prefix. Run
233`wineboot` after it, with its output thrown away: the first Wine program a server runs starts the prefix's services,
234which keep that program's output open for as long as the server lives, so a first test that started them would wait
235for the end of its output until the timeout.
236
237- `wineserver -p` keeps one Wine server for the whole run; without it a new one starts for each test.
238- `winedbg.exe=d`: a test that crashes otherwise waits in Wine's debugger until its timeout.
239- `winemenubuilder.exe=d`: without it `wineboot` on a fresh prefix writes `wine-extension-*.desktop` files and the MIME
240 cache into `~/.local/share/applications`, pointing your file associations at the test prefix. Set it before the
241 prefix is first made.
242- `ctest -j 6` runs six tests at a time. The tests that share files under the temp directory (see "Known problems")
243 can then fail now and then; rerun such a failure on its own before you count it.
244
245Measured with Wine 11.22 on llvmpipe, 40 tests of a clang-cl build (`ctest -R '^(d3d12_[a-c]|vk_[a-d]|xg)'`), adding
246one setting at a time:
247
248| Settings | Seconds |
249|---|---|
250| As above: one test after another | 179 |
251| `wineserver -p` (and `wineboot` after it) | 35 |
252| and `WINEDEBUG=-all` | 35 |
253| and `winedbg.exe=d` | 35 |
254| and `ctest -j 6` | 5.6 |
255| `ctest -j 6` and the overrides, without `wineserver -p` | 18 |
256
257The kept server is most of it: a test that takes 0.05 seconds with it took about 3.4 without, the time of a server
258starting and stopping. `WINEDEBUG=-all` and `winedbg.exe=d` changed nothing here because no test crashed; with a crash,
259`winedbg.exe=d` saves the rest of that test's timeout. The full suite (about 310 tests) took about 28 minutes run one
260after another, and 67 seconds with all four settings for two devices (llvmpipe and an integrated GPU) run at the same
261time. `scripts/run_wine_tests.py` (below) does the same: 32 seconds for those 40 tests with `--jobs 1`, 6 with
262`--jobs 6`, and 19 seconds for all 312 tests with `--jobs 6`.
263
221The build type defaults to `RelWithDebInfo`: xwin leaves out the debug CRT, so `Debug` needs `--include-debug-libs`. 264The build type defaults to `RelWithDebInfo`: xwin leaves out the debug CRT, so `Debug` needs `--include-debug-libs`.
222`make_game.py`'s `runtime` stage makes this same build on Linux when the tools and the SDK are there (`--runtime-build 265`make_game.py`'s `runtime` stage makes this same build on Linux when the tools and the SDK are there (`--runtime-build
223runtime/build/windows` takes a folder made by hand like a Windows build). CMake packages are 266runtime/build/windows` takes a folder made by hand like a Windows build). CMake packages are
@@ -290,7 +333,12 @@ WINE=wine WINEPREFIX="$(mktemp -d)" WINEDLLOVERRIDES="mscoree,mshtml=" WINEDEBUG
290 333
291The session script initializes a dedicated prefix and stops its Wine processes at exit. On a headless host, 334The session script initializes a dedicated prefix and stops its Wine processes at exit. On a headless host,
292put `xvfb-run -a` before `bash` so prefix initialization and the tests share one virtual display. The test runner 335put `xvfb-run -a` before `bash` so prefix initialization and the tests share one virtual display. The test runner
293maps the recorded Windows drive to the Linux checkout for shaders referenced by absolute Windows paths. It prints 336maps the recorded Windows drive to the Linux checkout for shaders referenced by absolute Windows paths. It keeps one
337wineserver alive for the run and stops it at the end, and adds `winedbg.exe=d;winemenubuilder.exe=d` to each test's
338`WINEDLLOVERRIDES` (an entry of yours for the same program wins). `--jobs N` runs N tests at a time (default 1): tests
339marked `RUN_SERIAL` run alone, tests that share a `RESOURCE_LOCK` never overlap, and the verdicts are printed in the
340same order as with `--jobs 1`; the tests that share temp files can fail now and then in parallel (see "Known
341problems"). It prints
294every verdict and returns a failure status if any required test fails, skips or is missing. Check the printed 342every verdict and returns a failure status if any required test fails, skips or is missing. Check the printed
295verdicts for failures outside the required set. 343verdicts for failures outside the required set.
296 344