mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #611] [MERGED] tests: cover tools/stale_build.py (TEST-STALE-BUILD) #653
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#653
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/611
Author: @TuroYT
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:test/stale-build📝 Commits (1)
e8a4ae0tests: cover tools/stale_build.py (TEST-STALE-BUILD)📊 Changes
1 file changed (+143 additions, -0 deletions)
View changed files
➕
tests/test_stale_build.py(+143 -0)📄 Description
Claimed in the coordination issue as: TEST-STALE-BUILD (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7127995316)
tools/stale_build.py is imported by make_game.py (vk_pipeline_check) and tools/first_light.py (vk_harness) to decide whether a built runtime/test program is stale, but no test referenced it.
This adds tests/test_stale_build.py, a standard-library unittest that builds small source trees in a temporary folder and sets mtimes explicitly. It covers:
Not covered: include directories other than the including file's folder (see the note below), Windows path separators, the caller side in make_game.py and first_light.py.
Note for the maintainers, not changed here: program_sources only resolves a quoted include relative to the including file. 76 of the 665 quoted includes in runtime/test/*.cpp are bare names resolved through the target include directories (for example runtime/test/pe_loader_test.cpp line 25,
#include "pe_loader.h"; the header is runtime/src/pe_loader.h). program_sources(".", "pe_loader_test") returns only runtime/test/pe_loader_test.cpp, so an edit to runtime/src/pe_loader.h does not mark that program stale. This needs its own claim.Tested:
Not tested: Windows (path separators, os.utime behaviour on FAT or network drives), macOS case-insensitive volumes (not relevant to these inputs).
AI-assisted (Claude Code).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.