Improve docs about relative paths - #165
Conversation
| ``` | ||
|
|
||
| !!! note | ||
| When using relative paths in `runtests.jl`, remember to run the script in the correct directory. |
There was a problem hiding this comment.
While this is correct, I don't think people should use stuff like pwd in the first place.
There was a problem hiding this comment.
Yes, I agree, but pwd() was suggested before and it is still explained how to define a custom testsuite with relative paths: https://juliatesting.github.io/ParallelTestRunner.jl/stable/advanced/#Customizing-the-test-suite
There was a problem hiding this comment.
Yeah, as I said above, switching pwd to dir is a good call! I don't think we should encourage pwd, because then causes this. The solution is just not to rely on pwd, not to be in the right directory
There was a problem hiding this comment.
Ok, then how do you suggest to update the cited part of the docs? Should include("basic.jl") be replaced by something like include(joinpath(@__DIR__, "basic.jl"))?
There was a problem hiding this comment.
Yup! If there are other references to pwd, should be all changed to DIR.
Unfortunately
ParallelTestRunner.jl/src/ParallelTestRunner.jl
Line 1004 in fe496d8
|
Can you please also change ? Hopefully we're done with this. |
|
Thank you for your contribution! |
I'm trying to use this package after attending today’s talk at JuliaCon and ran into a minor issue caused by loading files via relative paths. While this probably was totally my own fault, I think that this change might prevent others from having the same problem.
Basically the issue was that when using
testsuite = find_tests(pwd()), one can't simply run theruntests.jlscript from the base directory, since this will include all.jlfiles, even those insrc.