-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Fixed relative path include on remote machines #21832
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d86b37c
Fixed relative path include on remote machines
Gollor 7e7393c
Removed trailing whitespace
Gollor 6a4acc0
Added tests for remote including
Gollor 93cf6d9
Remote include tests use temp files now
Gollor 2379294
Fixed remote include tests
Gollor 7ff6322
Remote include tests close io streams
Gollor 49abbf3
Added @vtjnash code except for relative path in dependency tracker
Gollor eadb699
Removed explicitly absolute path
Gollor 1ce1d75
Test trigger.
Gollor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1569,6 +1569,41 @@ catch ex | |
@test ex.captured.ex.exceptions[2].ex == UndefVarError(:DontExistOn1) | ||
end | ||
|
||
@test let | ||
# creates a new worker in the same folder and tries to include file on both procs | ||
try | ||
touch("temp.jl") | ||
proc = addprocs_with_testenv(1) | ||
include("temp.jl") | ||
remotecall_fetch(include, proc[1], "temp.jl") | ||
rmprocs(proc) | ||
rm("temp.jl") | ||
return true | ||
catch e | ||
try rm("temp.jl") end | ||
return false | ||
end | ||
end == true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test that passes on both versions. |
||
|
||
@test let | ||
# creates a new worker in the different folder and tries to include file on both procs | ||
try | ||
mkdir("temp_folder") | ||
touch("temp.jl") | ||
proc = addprocs_with_testenv(1, dir="temp_folder") | ||
include("temp.jl") | ||
remotecall_fetch(include, proc[1], "temp.jl") | ||
rmprocs(proc) | ||
rm("temp_folder") | ||
rm("temp.jl") | ||
return true | ||
catch e | ||
try rm("temp_folder") end | ||
try rm("temp.jl") end | ||
return false | ||
end | ||
end == true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test that requires the fix to pass. |
||
|
||
# Run topology tests last after removing all workers, since a given | ||
# cluster at any time only supports a single topology. | ||
rmprocs(workers()) | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid assuming the current working directory is writable, in some installations it won't be - a
mktemp() do
block might work well here