fix(tests): anchor example reads to DUNE_SOURCEROOT (#37) #52
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "worktree-fix-example-path-anchor"
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?
Closes #37.
test_e2e,test_golden, andtest_evalreadexamples/through the cwd-relative../../../examples, which escapes the build sandbox into a shared parent directory. Run from an in-repo worktree, that resolves to the main checkout'sexamples/— the phantombisect-a.bel: unexpected characterfailures from #35 were stale syntax bleeding in from the other checkout.Fix
Anchor to the absolute source root of the current build context via
DUNE_SOURCEROOT(dune sets it forruntest/exec), falling back to the old relative path when a test binary is run bare. This also letstest_evaldrop itsSys.argv.(0)build-dir derivation.Verification
dune runtestgreen (all suites).test_e2e.exefrom an unrelated cwd (/tmp): bogusDUNE_SOURCEROOT→ tests fail (examples not found); correctDUNE_SOURCEROOT→ all 26 pass. Proves the anchor is cwd-independent and keyed to the build context, not the shared parent.Follow-up to #35.