You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/TestItemControllers.jl
+38-5Lines changed: 38 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -396,8 +396,8 @@ function start(tp::TestProcess, controller)
396
396
packageUri = i.packageUri,
397
397
useDefaultUsings = i.useDefaultUsings,
398
398
testSetups = i.testSetups,
399
-
line = i.line,
400
-
column = i.column,
399
+
line = i.codeLine,
400
+
column = i.codeColumn,
401
401
code = i.code,
402
402
) for i in tp.testitems_to_run
403
403
],
@@ -492,6 +492,10 @@ end
492
492
493
493
function create_testrun_request(endpoint::JSONRPC.JSONRPCEndpoint, params::TestItemControllerProtocol.CreateTestRunParams, controller::JSONRPCTestItemController)
494
494
@info "Creating new test run"
495
+
496
+
valid_test_items = [i for i in params.testItems if i.packageName !==missing&& i.packageUri !==missing]
497
+
test_items_without_package = [i for i in params.testItems if i.packageName ===missing|| i.packageUri ===missing]
@@ -674,6 +678,11 @@ function create_testrun_request(endpoint::JSONRPC.JSONRPCEndpoint, params::TestI
674
678
end
675
679
end
676
680
681
+
# Finally, we send error notifications for all test items that didn't have a package
682
+
for i in test_items_without_package
683
+
put!(controller.combined_msg_queue, (source=:testcontroller, msg=(event=:errored, testitemid=i.id, testrunid=params.testRunId, message="Test item '$(i.label)' is not inside a Julia package. Test items must be inside a package to be run.", uri=i.uri, line=i.line, column=i.column)))
684
+
end
685
+
677
686
nothing
678
687
end
679
688
@@ -729,6 +738,30 @@ function Base.run(controller::JSONRPCTestItemController)
0 commit comments