scripts/run_conservative_tier3_reference.ps1: validate prereqs, anchor ctest filter, guard stderr and env #1873

Open
github-bot wants to merge 1 commit from github-bot/gh-1873 into main AGit
Owner

@⁠kirigayakazima on GitHub · 2026-11-25 13:49 UTC · original
kirigayakazima:fix/run-conservative-tier3-safety → main · +222 −8 · 2 files · 1 commits · open

Claimed in the coordination issue as: RUN-CONSERVATIVE-TIER3-REF-PS1-SAFETY-AND-TESTS (#1608)

What and why

  • Check for cmake and ctest upfront via Get-Command in scripts/run_conservative_tier3_reference.ps1 so a missing ctest fails before configuring and building runtime.
  • Wrap native cmake / ctest invocations in Invoke-Native with temporary $ErrorActionPreference = "Continue" so benign stderr warnings never raise NativeCommandError under strict error policies while non-zero exit codes still fail cleanly with their exit status.
  • Pass --no-tests=error and anchored exact test filter ^d3d12_conservative_tier3_reference$ to ctest so zero matched tests cannot silently pass.
  • Track $hadPreviousFilter = Test-Path Env:LEONIDA_VK_DEVICE and trim non-empty -Device before invoking ctest, restoring exact prior variable presence/value in finally. Preserve CRLF line endings (PS1_CRLF=68, PS1_LF_ONLY=0).
  • Add regression coverage using temporary PATH shims in tests/test_run_conservative_tier3_reference.py.

Tested

  • Patched: python -I tests/test_run_conservative_tier3_reference.py -v -> Ran 3 tests in 3.279s (OK).
  • Baseline check (upstream/main 5e95fa2f with tests/test_run_conservative_tier3_reference.py copied into detached worktree): Ran 3 tests in 2.800s (FAILED (failures=1, errors=3)).
  • Repo gates: PS1_CRLF=68 PS1_LF_ONLY=0, python -I tests/test_ci_registration.py (Ran 16 tests in 5.041s, OK), python -I tests/test_text_write_line_endings.py (Ran 3 tests in 12.657s, OK), python -I scripts/check_no_game_data.py (exit 0), python -I -m compileall -q (exit 0), git diff --check (exit 0).

GPUs tested: n/a (PowerShell runner prerequisite, ctest filter, and environment isolation tests)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠kirigayakazima** on GitHub · 2026-11-25 13:49 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1873) `kirigayakazima:fix/run-conservative-tier3-safety` → `main` · +222 −8 · 2 files · 1 commits · open Claimed in the coordination issue as: RUN-CONSERVATIVE-TIER3-REF-PS1-SAFETY-AND-TESTS (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why - Check for `cmake` and `ctest` upfront via `Get-Command` in `scripts/run_conservative_tier3_reference.ps1` so a missing `ctest` fails before configuring and building `runtime`. - Wrap native `cmake` / `ctest` invocations in `Invoke-Native` with temporary `$ErrorActionPreference = "Continue"` so benign stderr warnings never raise `NativeCommandError` under strict error policies while non-zero exit codes still fail cleanly with their exit status. - Pass `--no-tests=error` and anchored exact test filter `^d3d12_conservative_tier3_reference$` to `ctest` so zero matched tests cannot silently pass. - Track `$hadPreviousFilter = Test-Path Env:LEONIDA_VK_DEVICE` and trim non-empty `-Device` before invoking `ctest`, restoring exact prior variable presence/value in `finally`. Preserve CRLF line endings (`PS1_CRLF=68, PS1_LF_ONLY=0`). - Add regression coverage using temporary `PATH` shims in `tests/test_run_conservative_tier3_reference.py`. ### Tested - Patched: `python -I tests/test_run_conservative_tier3_reference.py -v` -> `Ran 3 tests in 3.279s` (`OK`). - Baseline check (`upstream/main` `5e95fa2f` with `tests/test_run_conservative_tier3_reference.py` copied into detached worktree): `Ran 3 tests in 2.800s` (`FAILED (failures=1, errors=3)`). - Repo gates: `PS1_CRLF=68 PS1_LF_ONLY=0`, `python -I tests/test_ci_registration.py` (`Ran 16 tests in 5.041s`, `OK`), `python -I tests/test_text_write_line_endings.py` (`Ran 3 tests in 12.657s`, `OK`), `python -I scripts/check_no_game_data.py` (exit 0), `python -I -m compileall -q` (exit 0), `git diff --check` (exit 0). GPUs tested: n/a (PowerShell runner prerequisite, ctest filter, and environment isolation tests) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:09:29 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1873/head:github-bot/gh-1873'
git switch 'github-bot/gh-1873'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1873'
git switch 'github-bot/gh-1873'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1873'
git switch 'github-bot/gh-1873'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1873'
git switch 'main'
git merge --squash 'github-bot/gh-1873'
git switch 'main'
git merge --ff-only 'github-bot/gh-1873'
git switch 'main'
git merge 'github-bot/gh-1873'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.