Repository navigation
test: make the suite pass on Windows and run it there in CI - #10
Merged
Merged
Conversation
Sync tests isolated the agent log locations through HOME only, but os.homedir() reads USERPROFILE on Windows, so syncs scanned the real user's logs. Stub HOME, USERPROFILE, APPDATA, LOCALAPPDATA and the XDG base directories to the temp home, and restore them after each test. The unknown-model test removed the pricing cache, so its sync fetched models.dev over the network and could time out on a slow connection, leaving that sync running into the next test. Keep it offline. The Amp fixtures used POSIX paths and drive-less file URLs, which Windows resolves differently. Build them from native paths. Run the whole suite in the Windows CI job instead of only the project path tests.
Contributor
Author
|
Bumping this one — it's the follow-up to #9, same Windows theme. Makes the suite pass on Windows and adds a job so CI catches it there. Green on both, no conflicts with main. @ephraimduncan you took #9, so this should be familiar ground if you have time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #9, Windows CI only runs
src/lib/usage, and the rest of the suite fails on Windows (12 tests onmain).HOME, butos.homedir()usesUSERPROFILEon Windows, so they were syncing my real agent logs. I stubHOME,USERPROFILE,APPDATA,LOCALAPPDATAand the XDG dirs now, and restore them after each test.file://URLs. They're built from native paths now; the adapter itself is unchanged.fetchstub as the pricing tests.All 125 tests pass on Windows across 8 runs. One thing I left out: about 20 agent-specific vars like
CODEX_HOMEstill pass through to the sync tests. Happy to stub those too if you'd like.