Repository navigation
Isolate cargo target dir in auto build tests - #2803
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The targeted test changes consistently isolate build output, with no unresolved findings.
0 open findings
What changed in this PR
This PR isolates Cargo build artifacts for the auto-build integration tests, preventing parallel tests from rewriting the same output file.
Changes:
- Sets
CARGO_TARGET_DIRto each test’s sandbox directory for eight deploy and upload auto-build cases.
| File | Description |
|---|---|
cmd/crates/soroban-test/tests/it/integration/auto_build.rs |
Gives each affected test an isolated build target directory. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This change may be unnecessary after this is fixed: But in general it seems like a better idea to have build tests be isolated, so I think it is still a good idea to merge this. If we find that over time the tests take too long as a result we could wind this back, or look at other solutions. |
|
Making this change doesn't appear to negatively impact the RPC tests runtime. I guess because they run concurrently. 🎉 |
What
Give each auto-build integration test its own
CARGO_TARGET_DIRinside its sandbox temp dir.Why
Parallel tests building the same fixture share one target dir, and the CLI rewrites the output wasm in place after cargo releases its lock, so a concurrent test can read an empty file and fail with
unexpected end-of-file (at offset 0x0)(failed run).Known limitations
Each test now compiles its dependencies from scratch, and concurrent
stellar contract buildruns on one workspace can still collide for users since the in-place rewrite inbuild.rsis not atomic.