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:
authorOreoFR <tony37160@hotmail.fr>2026-11-30 15:46:35 +0100
committerOreoFR <tony37160@hotmail.fr>2026-11-30 15:46:35 +0100
commit0703aebb4e6125aa87a6397e2ea3d8f97829328a (patch)
treec08b266fe4265693978428575fc031d739916940 /docs/testing.md
parentb17b22d33155e55ba0d27ea87dd51aac331e5894 (diff)
docs/testing: red and green of a runtime pull request on your fork's CI
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/testing.md b/docs/testing.md
index e84313891..bda8a36f0 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -83,6 +83,48 @@ Run `main` the same way for comparison (`git checkout main`, rebuild, run). Then
83one line per mode, in the form `<GPU>, <driver>, Windows <build>: X of Y passed, K skipped, F failed (native); 83one line per mode, in the form `<GPU>, <driver>, Windows <build>: X of Y passed, K skipped, F failed (native);
84main at <commit>: ...`, plus any `FAIL` lines that differ from `main`. 84main at <commit>: ...`, plus any `FAIL` lines that differ from `main`.
85 85
86#### A runtime pull request, red and green on your fork's CI
87
88A C++ pull request to `runtime/` can be checked red and green on the Runtime workflow of your own fork, with the
89compiler the CI provides, when you cannot build it locally. It uses your fork's Actions minutes, not the project's.
90Starting a run on a fork is described in
91[Without a compiler: a CI-built runtime](#without-a-compiler-a-ci-built-runtime). A fork run does not replace the pull
92request's own CI here, nor someone else's verification: it is one more data point.
93
941. **Bring your fork's `main` up to date** (`git push <fork> origin/main:main`). "Run workflow" lists only a
95 workflow that exists on the fork's default branch.
962. **Make two branches from the same `main` commit**, and write that commit down:
97 - `ci-green/<N>`: `main` plus the pull request, `git merge --no-ff pr-<N>`.
98 - `ci-red/<N>`: `main` plus only the pull request's test and how it is built: the test file(s) **and** the
99 test's registration in `runtime/CMakeLists.txt` (`add_executable` / `add_test`). Apply that part of the pull
100 request's diff (`git diff <merge-base> pr-<N> -- runtime/CMakeLists.txt | git apply --3way`) rather than checking
101 out the pull request's whole `CMakeLists.txt`, which would also undo what `main` has added since.
1023. **Push both branches to the fork and start the runs**:
103 `gh workflow run runtime.yml --repo <you>/<fork> --ref ci-green/<N>`, the same with `ci-red/<N>`, then
104 `gh run list --repo <you>/<fork>` for their ids. A pull request that only adds tests has nothing to remove for
105 red: run `main` itself as the red side.
106
107When the red side proves nothing:
108
109- **The test includes a file the pull request adds** (a new header next to the code): the red branch does not
110 compile (`fatal error: ... No such file or directory`). That shows the test needs the new code, not that it catches
111 the bug. Write "red: does not build without the pull request's new file", not "red: fails".
112- **The test and its CMake lines alone pass on `main`**: the test does not exercise the change, or `main` already
113 behaves. Report "no red".
114- **The test is not registered**: if the CMake lines stay on the green side only, the red build has no such test and
115 `ctest` cannot fail it. Check that the test's name is in the red run's `ctest` output.
116
117Reading the result: open the `windows` job, step "CPU runtime tests"
118(`ctest --test-dir runtime/build --output-on-failure --timeout 300`). Each test is a line
119`k/T Test #i: <name> .... Passed` (or `***Failed`, `***Not Run (Disabled)`); the summary is
120`100% tests passed out of R`, then the tests that did not run and, on a failure, `The following tests FAILED:`.
121`R` excludes disabled tests, so report "R/R passed, D disabled (out of T)". A threaded timing test can fail once
122on a shared runner: rerun that side before calling it a regression. Other jobs (`macos`, `linux-gpu-tools`,
123`wine`) can be red on `main` too; compare with `main`'s latest Runtime run before blaming the pull request.
124
125Comment on the pull request with the two run links, the `main` commit, and per side the test's own line and the
126summary (red: ...; green: ...).
127
86## What you need 128## What you need
87 129
88- **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so 130- **Python 3.12+**, which `make_game.py` requires (it stops with "Python 3.12 or newer is needed" on an older one, so