In order to make Jive and other dependencies available when running tests as a script, I added this to the header of runtests.jl:
using Distributed
@everywhere using Pkg
if abspath(PROGRAM_FILE) == @__FILE__
# when run as a script, activate the test environment of this package so that test dependencies are available
@everywhere Pkg.activate(dirname(@__FILE__));
end
using Jive
...
Otherwise the user needs to copy all the dependencies from the package and manually install them in the main environment.
Perhaps this can be part of the documentation of how to use Jive as part of a package definition with dependencies listed there.
In order to make Jive and other dependencies available when running tests as a script, I added this to the header of
runtests.jl
:Otherwise the user needs to copy all the dependencies from the package and manually install them in the main environment.
Perhaps this can be part of the documentation of how to use Jive as part of a package definition with dependencies listed there.