Skip to content

retest requires you are located in the test/ dir of the package being tested (at least if using ReTest.hijack) #29

Open
@nickrobinson251

Description

@nickrobinson251

...i think that's what's going on :)

Here's the error i ran into when trying out ReTest.jl for the first time (using ReTest v0.3.0)

julia> using ChainRules, ReTest

julia> ReTest.hijack(ChainRules)
Testing ChainRules.jl
Main.ChainRulesTests

julia> retest()
                          Pass
Main.ChainRulesTests:
Testing test_helpers.jl:
                          Pass   Error   Total
  ChainRules          |              1       1

ChainRules: Error During Test at /Users/nick/.julia/packages/ReTest/63MpE/src/ReTest.jl:440
  Got exception outside of a @test
  SystemError: opening file "/Users/nick/repos/ChainRules.jl/test_helpers.jl": No such file or directory
  Stacktrace:
    [1] systemerror(p::String, errno::Int32; extrainfo::Nothing)
      @ Base ./error.jl:174
    [2] #systemerror#68
      @ ./error.jl:173 [inlined]
    [3] systemerror
      @ ./error.jl:173 [inlined]
    [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Nothing, append::Nothing)
      @ Base ./iostream.jl:293
    [5] open
      @ ./iostream.jl:282 [inlined]
    [6] open(f::Base.var"#354#355"{String}, args::String; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Base ./io.jl:328
    [7] open
      @ ./io.jl:328 [inlined]
    [8] read
      @ ./io.jl:436 [inlined]
    [9] _include(mapexpr::Function, mod::Module, _path::String)
      @ Base ./loading.jl:1249
   [10] include(mod::Module, _path::String)
      @ Base ./Base.jl:417
   [11] include
      @ ~/.julia/packages/ReTest/63MpE/src/hijack.jl:194 [inlined]
   [12] macro expansion
      @ ./timing.jl:210 [inlined]
   [13] include_test(path::String)
      @ Main.ChainRulesTests ~/repos/ChainRules.jl/test/runtests.jl:20
   [14] macro expansion
      @ ~/repos/ChainRules.jl/test/runtests.jl:25 [inlined]
   [15] macro expansion
      @ ~/.julia/packages/ReTest/63MpE/src/testset.jl:647 [inlined]
   [16] macro expansion
      @ ~/repos/ChainRules.jl/test/runtests.jl:25 [inlined]
   [17] top-level scope
      @ ~/.julia/packages/ReTest/63MpE/src/ReTest.jl:440
   [18] eval
      @ ./boot.jl:373 [inlined]
   [19] #73
      @ ~/.julia/packages/ReTest/63MpE/src/ReTest.jl:1083 [inlined]
   [20] #137
      @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:354 [inlined]
   [21] run_work_thunk(thunk::Distributed.var"#137#138"{ReTest.var"#73#91"{ReTest.Testset.Format}, Tuple{Module, ReTest.TestsetExpr, ReTest.And, NamedTuple{(:out, :compute, :preview), Tuple{Distributed.RemoteChannel{Channel{Union{Nothing, ReTest.Testset.ReTestSet}}}, Channel{Nothing}, Nothing}}}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}}, print_error::Bool)
      @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63
   [22] remotecall_fetch(::Function, ::Distributed.LocalProcess, ::Module, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:379
   [23] remotecall_fetch(::Function, ::Distributed.LocalProcess, ::Module, ::Vararg{Any})
      @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:379
   [24] remotecall_fetch(::Function, ::Int64, ::Module, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:421
   [25] remotecall_fetch
      @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Distributed/src/remotecall.jl:421 [inlined]
   [26] macro expansion
      @ ~/.julia/packages/ReTest/63MpE/src/ReTest.jl:1080 [inlined]
   [27] (::ReTest.var"#71#89"{Int64, ReTest.Testset.Format, Nothing, ReTest.Testset.ReTestSet, Base.Threads.Atomic{Bool}, Channel{Nothing}, Distributed.RemoteChannel{Channel{Union{Nothing, ReTest.Testset.ReTestSet}}}, Vector{Any}, ReTest.And, Module})()
      @ ReTest ./task.jl:411

ERROR: Some tests did not pass: 0 passed, 0 failed, 1 errored, 0 broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions