main's 8599cfcc starts build_hw_oracle.cmd from the work folder; keep its paths and
this branch's UTF-8 reads of the script (its /Fo folder is under %TEMP%).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hw_oracle's vcvars script is fixed on main by #2667 (UTF-8 + chcp 65001), so this
branch takes main's runner.py and drops its own 8.3-name version. Two of main's
new hw_oracle tests decoded that UTF-8 script as ASCII, which fails when %TEMP%
holds a non-ASCII user name; they now decode it as UTF-8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review suggestion on #2984: test_audio_wav and test_audio_stage_resume each
had their own copy of the 8.3-short-name helper. Both now call
winbatch.write_python_cmd, so the two can't diverge.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five tests that only the Linux CI runs fail on Windows:
- test_report_paths: the darwin patch kept Windows' os.path.normcase,
which lowercases; use posixpath.normcase there too.
- test_audio_wav, test_audio_stage_resume: cmd.exe decodes the fake
ffmpeg.cmd with the OEM code page, not UTF-8; write non-ASCII paths as
their 8.3 short names, the file in the OEM code page.
- test_make_game_submodule, tools/spirv_metal_set0.py: text=True decodes
UTF-8 child output with the ANSI code page and the reader thread dies;
errors="replace".
- test_spirv_metal_set0_cli_errors: read the Python child's stderr in the
locale encoding it writes, not UTF-8.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only an existing file counts as a completed conversion. Report a blocked path through the per-input failure summary while letting the other conversions finish.
A codec name appearing in a comment packet is not a stream identifier. Read the first Ogg packet for both discovery and trimming so non-Opus files stay out of the conversion queue.
ffmpeg reads stdin for key commands. Every ffmpeg call in tools/audio_wav.py
(audio_digest, decode) and make_game.py (decode_xma) inherited the caller's
stdin, so a run started in the background of a terminal stopped at its first
decode ("Stopped (tty output)"), and input piped to the caller was swallowed.
tests/test_audio_wav.py's own ffmpeg fixture calls did the same: in a
`while read` loop over tests/ with ffmpeg on PATH, they ate the next file
names and four test files were silently skipped.
Give every ffmpeg call stdin=subprocess.DEVNULL, and add fake-ffmpeg tests
that check each call reads nothing from stdin: the decode run and the resume
check of audio_wav.py, and make_game.decode_xma().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQWmXYJ1uVSCTNfvSjPMF7
audio_wav.py previously clamped --jobs below 1 silently to 1 instead of raising a command-line error, allowed main() only without arguments, and did not validate --out when pointing to an existing file before attempting to create directories.
- main(argv=None) now accepts programmatic arguments.
- --jobs < 1 is rejected with ap.error('--jobs must be at least 1').
- --out pointing to an existing file is rejected with ap.error.
- Extracted FakeFfmpegDecodeTest in tests/test_audio_wav.py so fake decode checks run without requiring ffmpeg on PATH.
- Added AudioWavCliTest covering all CLI validation error paths.
Both inputs mapped to x.wav (as did x.ogg and x.OPUS on Windows). Two jobs then decoded into the same
x.wav.part.wav at once, and with --jobs 1 the second replaced the first; either way the summary said
"3 WAV written" while one result was gone. output_names now keeps the extension for inputs that share a stem
(x.ogg.wav, x.opus.wav) and adds ~2, ~3 if a name still clashes. Unique names are unchanged, so WAVs from
earlier runs are still found and skipped.
make_game.py is not affected: it runs this tool on awc_opus.py output, which is all .ogg.
Tests: SameStemTest in tests/test_audio_wav.py, with a fake ffmpeg so it runs without ffmpeg installed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only require ffmpeg when the assets stage will run, so --wav with shaders/runtime only is not blocked. Add tests/test_audio_wav.py: standard-library unittest, skipped without ffmpeg, pinning a 1 s Ogg Opus to an exact 48,000-frame 16-bit mono 48 kHz WAV and checking resume and missing-ffmpeg behaviour.