Jive.jl icon indicating copy to clipboard operation
Jive.jl copied to clipboard

making test dependencies available

Open guyvdbroeck opened this issue 5 years ago • 1 comments

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.

guyvdbroeck avatar Dec 28 '19 02:12 guyvdbroeck

thanks for the issue. fixed and released Jive v0.2.3, and here are examples.

  • https://github.com/wookay/TestJiveDistributed.jl
  • https://github.com/wookay/TestProbabilisticCircuits.jl

wookay avatar Dec 28 '19 14:12 wookay