Skip to content

Commit

Permalink
Squashed 'packages/TestItemServer/' changes from 2303253b..a31cd339
Browse files Browse the repository at this point in the history
a31cd339 Import testsetups
082e99b9 Remove a diagnostic

git-subtree-dir: packages/TestItemServer
git-subtree-split: a31cd3394c98ed657324aaf1e4648791bfcd67da
  • Loading branch information
davidanthoff committed Feb 11, 2023
1 parent 15045f9 commit 5891ea9
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions src/TestItemServer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ function run_testitem_handler(conn, params::TestserverRunTestitemRequestParams)
end
end

@info "AND WE GOT PAST THIS"

mod = Core.eval(Main, :(module $(gensym()) end))

if params.useDefaultUsings
Expand Down Expand Up @@ -191,6 +189,26 @@ function run_testitem_handler(conn, params::TestserverRunTestitemRequestParams)
end
end

for i in params.testsetups
try
Core.eval(mod, :(using ..Testsetups: $(Symbol(i))))
catch
return TestserverRunTestitemRequestParamsReturn(
"errored",
[
TestMessage(
"Unable to load the `$i` testsetup.",
Location(
params.uri,
Range(Position(params.line, 0), Position(params.line, 0))
)
)
],
nothing
)
end
end

filepath = uri2filepath(params.uri)

code = string('\n'^params.line, ' '^params.column, params.code)
Expand Down

0 comments on commit 5891ea9

Please sign in to comment.