Commit Graph

16 Commits

Author SHA1 Message Date
ec9b6cf22b tools: text reports are written with LF line ends on every platform (BUILD-468)
open(path, "w") without newline= turns each \n into \r\n on Windows, so the same JSON report, manifest or assembly
listing was CRLF there and LF elsewhere. 91 text-mode writes (open, os.fdopen, Path.write_text) under tools/, scripts/,
make_game.py and runtime/test/shaders/ now pass newline="\n". tests/test_text_write_line_endings.py reads the source
with ast and fails for a writer that forgets it; CONTRIBUTING.md names the convention.

AI-assisted (Claude), on behalf of dev-ewann.
2026-11-22 14:20:30 +00:00
61a8499b85 Merge pull request #1701 from Jolymmiles 2026-11-22 08:38:34 -05:00
b0c587ea27 Wine tests: ship generated test shaders and map the build checkout's drive
d3d12_compute, d3d12_draw, d3d12_r9g9b9e5_uav, d3d12_descriptor and d3d12_indirect_rt open their GLSL test
shaders through absolute paths compiled into them (LEONIDA_TEST_*_SPV, D:/a/Leonida/Leonida/runtime/build/
generated/*.spv). The runtime-windows artifact didn't carry generated/*.spv and Wine has no such D: drive, so
they failed under Wine (copy_file threw, exit 3, or the shader read failed).

The artifact now includes runtime/build/generated/*.spv, and run_wine_tests.py points the drive of
--windows-root at --root in the Wine prefix for the run (a dosdevices link to a scratch folder), leaving a
drive the prefix already has untouched and removing both links afterwards.
2026-11-22 17:15:41 +04:00
36dbff0049 Merge pull request #1561 from Zebraine 2026-11-22 08:08:04 -05:00
19fcbb2027 Treat scalar CTest output expressions as single patterns 2026-11-22 20:45:05 +08:00
cdbacc418d Merge pull request #1571 from liang-kai-shui 2026-11-22 07:38:17 -05:00
622d58b763 Merge pull request #1561 from Zebraine 2026-11-22 07:38:12 -05:00
07aac8aa68 run_wine_tests: create the summary folder and report an unwritable summary
--summary was opened after the whole run, so a missing folder ended the
job in a FileNotFoundError and an unwritable path raised as well. Create
the folder before writing and report an unwritable summary as one ERROR
line with exit 1 after the results, as the other report writers do.
Extend tests/test_run_wine_tests.py with both cases.
2026-11-22 20:19:11 +08:00
47e1ea7393 Honor CTest output expressions in the Wine test runner 2026-11-22 20:14:39 +08:00
33985fc88e Merge pull request #1481 from bbareth 2026-11-22 07:07:50 -05:00
07cf61c659 Wine tests: reject invalid launch commands and non-finite timeouts 2026-11-22 12:40:50 +01:00
5ba8667c9b Wine tests: treat host-signal termination as a failure 2026-11-22 12:33:16 +01:00
f966fc159b Tests: cover the Wine test runner, and stop it crashing on bad input
scripts/run_wine_tests.py is what runtime.yml's wine job runs, and it was the
only script in the tree with no test. tests/test_run_wine_tests.py drives it
with the Python interpreter as the "wine" command and tiny exit-code scripts
as build artifacts, so every status and exit code is checked without Wine.

That exposed three real defects, fixed here: a --tests file that is not JSON
(and JSON that is not ctest --show-only=json-v1 output) ended in a
JSONDecodeError/AttributeError before any test ran; a wine command that cannot
be started ended in FileNotFoundError out of subprocess.run, losing every
result; and WILL_FAIL/ctest booleans were read with Python truthiness, so the
JSON string "0" inverted the check. --timeout now refuses 0 and negatives,
which previously raised ValueError inside subprocess.run.

Negative control on main: 1 failure and 17 errors. With the change: 24/24.
Standard library only, no Wine, no game data.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
2026-11-21 23:36:48 -06:00
9e9138829a CI: run the Wine job on WineHQ stable as well as Ubuntu's Wine
A matrix entry installs winehq-stable from WineHQ's repository next to
Ubuntu's Wine 9.0, closer to what Proton users run. The job summary
names the Wine version (run_wine_tests.py --label).
2026-11-22 03:55:52 +00:00
f674a125d9 CI: pe_loader_bounds off the default EXE base; host-tool tests skip under Wine
test_pe_loader_bounds maps images at 0x140000000 like loader_test, so it
links with GTA6RT_HOST_BASE too (under Wine every case was rejected with
"preferred base is taken").

run_wine_tests.py: a test whose command is a tool of the Windows runner
(gameinput's cmake -P, d3d12_trace's python) is reported as skipped with
that reason instead of failing as missing from the artifact.
2026-11-22 03:55:50 +00:00
c86977584a CI: run the Windows runtime tests under Wine on Linux
The Windows job uploads its executables, DLLs and the CTest list; a new
wine job runs them with scripts/run_wine_tests.py on ubuntu-24.04
(Wine, Xvfb, llvmpipe). The loader tests and gta6rt --run tiny_game must
pass; the other tests are reported in the job summary.
2026-11-22 02:13:39 +00:00