-
-
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
Changes from 4 commits
d86b37c
7e7393c
6a4acc0
93cf6d9
2379294
7ff6322
49abbf3
eadb699
1ce1d75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1569,6 +1569,49 @@ 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 | ||
working_directory = pwd() | ||
cd(tempdir()) | ||
try | ||
tmp_file = relpath(mktemp()[1]) | ||
proc = addprocs_with_testenv(1) | ||
include(tmp_file) | ||
remotecall_fetch(include, proc[1], tmp_file) | ||
rmprocs(proc) | ||
rm(tmp_file) | ||
cd(working_directory) | ||
return true | ||
catch e | ||
try rm(tmp_file) end | ||
cd(working_directory) | ||
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 | ||
working_directory = pwd() | ||
cd(tempdir()) | ||
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.
will automatically go back to the original working directory even on failure, bit cleaner |
||
try | ||
tmp_file = relpath(mktemp()[1]) | ||
tmp_dir = relpath(mktempdir()) | ||
proc = addprocs_with_testenv(1, dir=tmp_dir) | ||
include(tmp_file) | ||
remotecall_fetch(include, proc[1], tmp_file) | ||
rmprocs(proc) | ||
rm(tmp_dir) | ||
rm(tmp_file) | ||
cd(working_directory) | ||
return true | ||
catch e | ||
try rm(tmp_dir) end | ||
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. better as 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. Right, that should be better. |
||
try rm(tmp_file) end | ||
cd(working_directory) | ||
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()) | ||
|
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.
it seems like this may confuse the SOURCE_PATH pop in
include_from_node1
.I think it'll be clearer to be explicit here:
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.
@vtjnash Looks nice. But is there a reason why the list of dependencies receives the regular path instead of explicitly absolute one?
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.
because
abspath(abspath())
seems unnecessary