From 2be366823284a7949fdec530af1b6ca87c252ff0 Mon Sep 17 00:00:00 2001 From: Tom Bohar Date: Thu, 22 Oct 2026 16:42:32 -0400 Subject: [PATCH] Snapshot for release 2026.10.22.2 (internal 466f796) --- BUILD.md | 2 + installer/Publish-Update.ps1 | 21 +- scripts/Run-AllTests.ps1 | 155 ++++++++++++ scripts/Run-GameTest.ps1 | 234 ++++++++++++++++++ .../MainWindow.axaml.cs | 25 +- .../UI/Data/RynthNavAtlasData.cs | 32 +-- .../UI/Data/RynthNavAtlasRecalls.cs | 79 ++++++ .../AtlasRecallsTests.csproj | 24 ++ tools/AtlasRecallsTests/Program.cs | 103 ++++++++ tools/ChatFilterTests/Program.cs | 10 +- tools/LargeAddressAlignmentTests/Program.cs | 6 +- .../NavDataUpdateTests.csproj | 2 + 12 files changed, 666 insertions(+), 27 deletions(-) create mode 100644 scripts/Run-AllTests.ps1 create mode 100644 scripts/Run-GameTest.ps1 create mode 100644 src/RynthCore.Engine/UI/Data/RynthNavAtlasRecalls.cs create mode 100644 tools/AtlasRecallsTests/AtlasRecallsTests.csproj create mode 100644 tools/AtlasRecallsTests/Program.cs diff --git a/BUILD.md b/BUILD.md index 43fae17..8f94d96 100644 --- a/BUILD.md +++ b/BUILD.md @@ -32,6 +32,8 @@ C:\Games\RynthSuite\\ ← each plugin as a managed assembly + its depend | Loader/Shim change, clients running | `scripts\Publish-EngineCoreClr.ps1` — the in-use copies are renamed aside; new launches get the new ones | | Installer | `installer\Build-Installer.ps1` (release plugins stay NativeAOT: the new engine loads them) | | Hot-reload test on a local server | `scripts\Test-ClrWorld.ps1 -Reloads 3` (see its header) | +| Every offline test (RynthCore, RynthSuite, RynthServers) | `scripts\Run-AllTests.ps1` (`-Only ` for one); `installer\Publish-Update.ps1` runs it and won't publish if one fails | +| RynthAi in game (buffing, a kill, looting, missile crafting) | `scripts\Run-GameTest.ps1` (logs a test character in, runs RynthSuite's `GameTests\RynthSelfTest.af`, prints PASS / FAIL / SKIP; see its header) | | Why didn't a generation unload? | `tools\AlcRoots ` (build it: `dotnet build tools\AlcRoots -c Release`) | `-NativeAot` on `Deploy-RynthCore.ps1` and `Build-Installer.ps1` builds the old NativeAOT engine, diff --git a/installer/Publish-Update.ps1 b/installer/Publish-Update.ps1 index 4442926..8dcc940 100644 --- a/installer/Publish-Update.ps1 +++ b/installer/Publish-Update.ps1 @@ -9,7 +9,9 @@ if either repo has uncommitted changes, or if -Version isn't newer than the live feed; with -SkipNavData, also if the last published RynthNav map can't be found or isn't on the server as signed (a feed without it gives new RynthNav players no map). - 2. Builds the installer (Build-Installer.ps1 -Version; it includes the Decal bridge, so the + 2. Runs every offline test program in RynthCore, RynthSuite and RynthServers + (scripts\Run-AllTests.ps1) and stops if any fails: nothing is built or uploaded. + Then builds the installer (Build-Installer.ps1 -Version; it includes the Decal bridge, so the build machine needs Decal installed) and the RynthSuite plugins into installer\Releases\\ — never into the live C:\Games folders. 3. Writes the manifest (sizes + SHA-256 of every file), signs it with the DPAPI key @@ -35,6 +37,9 @@ param( [string]$Notes = "", [switch]$DryRun, # build + sign + verify, upload nothing [switch]$AllowDirty, # publish with uncommitted changes (don't) + # Publish without running the test programs first (step 2). For an emergency hotfix only; the + # release log says the tests were skipped. + [switch]$SkipTests, [string]$SshHost = "aelrynth-vps", [string]$RemoteDir = "/var/www/site/downloads/rynth", [string]$BaseUrl = "https://aelrynth.com/downloads/rynth", @@ -275,6 +280,20 @@ $rel = Join-Path $ScriptDir "Releases\$release" if (Test-Path $rel) { Remove-Item $rel -Recurse -Force } New-Item -ItemType Directory -Force "$rel\plugins", "$rel\build" | Out-Null +# Every offline test program in the three repos, before anything is built (2026-10-22: tests only ran +# when someone remembered to). One failure stops the release; the logs stay in Releases\\tests. +if ($SkipTests) { + Step "Tests SKIPPED (-SkipTests)" + Write-Warning "Publishing $Version without running the tests." +} else { + Step "Running the tests (scripts\Run-AllTests.ps1)" + & (Join-Path $RepoRoot "scripts\Run-AllTests.ps1") -RynthCoreRoot $RepoRoot -RynthSuiteRoot $RynthSuiteRoot ` + -RynthServersRoot $RynthServersRoot -LogDir "$rel\tests" + if ($LASTEXITCODE -ne 0) { + throw "Tests failed (summary above, logs in $rel\tests) - not publishing. Fix them, or pass -SkipTests for an emergency hotfix." + } +} + # Plugins: built MANAGED by default (collectible: a reload frees them; NativeAOT plugins can never be # unloaded, so every reload kept a copy of each one - 220-450 MB of address space per reload, # 2026-10-19). Each managed plugin still ships as one DLL in the feed: their common dependencies diff --git a/scripts/Run-AllTests.ps1 b/scripts/Run-AllTests.ps1 new file mode 100644 index 0000000..a1314e6 --- /dev/null +++ b/scripts/Run-AllTests.ps1 @@ -0,0 +1,155 @@ +#Requires -Version 7 +<# +.SYNOPSIS + Builds and runs every offline test program in RynthCore, RynthSuite and RynthServers. Exit 0 only + when every one passes. + +.DESCRIPTION + The test programs are console apps: RynthCore tools\*Tests, RynthSuite and RynthServers Tools\*Tests, + each run as `dotnet run -c Release` from its own folder (exit 0 = pass, anything else = fail), and the + loader's C tests (a Run-Tests.ps1 beside test.c, built with MSVC). None needs a game client, a server + or the network, and none writes to %APPDATA% or C:\Games (each project's header says what it reads). + + Publish-Update.ps1 runs this before it builds a release and refuses to publish when a test fails + (2026-10-22: tests only ran when someone remembered to; a release went out with Missile Crafting + broken while the tests that existed passed). + + Every folder whose name contains "Test" is run unless $Skip below names it with a reason; skipped ones + are listed in the summary, never dropped silently. Each program's output goes to + \..log, and the summary (also \summary.txt) shows each failure's last lines. + +.EXAMPLE + .\scripts\Run-AllTests.ps1 -RynthSuiteRoot C:\Projects\rel1002\RynthSuite +.EXAMPLE + .\scripts\Run-AllTests.ps1 -Only RynthCore.RynthAiHostTests, ChatFilterTests +#> +param( + [string]$RynthCoreRoot = "", # defaults to this checkout + [string]$RynthSuiteRoot = "", # defaults to ..\RynthSuite beside RynthCore + [string]$RynthServersRoot = "", # defaults to ..\RynthServers beside RynthSuite + [string[]]$Only = @(), # folder names (or repo.name) to run; empty = all + [string]$LogDir = "", # defaults to %TEMP%\rynth-tests\