Fix intermittent Base CI failure due to misdetected juliadir #948
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.
We have an intermittent Revise test failure in Julia base CI, e.g. https://buildkite.com/organizations/julialang/pipelines/julia-master/builds/49637/jobs/0198728e-c6d1-4db8-8dd8-84eb87f72c6d/log
The apparent cause is that the Revise test job runs on the same node that built the original binary. Upon further investigation, that cause is apparent - when setting
juliadir, we only check whether the original build dir exists, not whether it actually belongs to the julia executable we're testing. On the buildbots, they will happily accept the next build job, causing the path to exist again (in the same location), but actually we're not testing a source build. Fix this by always trying to use the canonical build directory (which should be created by the build system), even in a source build. If it doesn't exist (e.g. because the build systme ran incompletely), we try to fallback to the original directory. If an only ifSys.BINDIRpoints to where it would in an ordinary source build. Lastly we fall back to the ascending search procedure, though I'm a bit skeptical about it, since it could easily find the wrong installation. I added a warning for users to let us know if they encounter this frequently.