Run the integration suite on Windows - #1
Open
lofoneh wants to merge 1 commit into
Open
Conversation
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.
Problem
write_fake_pgbotgenerates the fake pgbot as a POSIX shell script, so thethree integration test files are
#![cfg(unix)]. On Windows they don't fail —they compile away:
22 tests, including
dsn_travels_by_env_not_argvandadd_failure_saves_nothing_and_leaks_nothing.Change
tests/bin/fake_pgbot.rsports the fixture to Rust as afake-pgbotbintarget.
write_fake_pgbotcopies it into the test's temp dir, where it findsinvocations.log/running.<pid>/peaks.logviacurrent_exe().parent()—so the helper's signature is unchanged and no assertion was touched. Drops the
three
#![cfg(unix)]lines, addswindows-latestto CI.saved_file_is_0600stays unix-only.
Also fixes a latent flake:
writeln!emits the value and the newline asseparate writes, so concurrent fakes interleaved into
peaks.logas"22\n\n1\n"and the cap test read a peak of 22. Now onewrite_all.fmt, clippy and
cargo test --lockedpass on Windows; linux and macOSunverified until CI runs.