I can use TestItemRunner locally fine. It works both in VSCode's UI and also doing ] test in my package using a basic runtests.jl
using TestItemRunner
@run_package_tests
However, when I run in our CI system, the tests fail because it's trying to run a test from within TestItemRunner itself.
Test threw exception
Expression: TestItemRunner.compute_line_column(content, 1) == (line = 1, column = 1)
UndefVarError: `TestItemRunner` not defined
Stacktrace:
[1] macro expansion
@ /usr/local/julia/share/julia/stdlib/v1.10/Test/src/Test.jl:669 [inlined]
[2] top-level scope
@ /builds/internal/MyPackage.jl/.julia/packages/TestItemRunner/Qioo0/src/TestItemRunner.jl:508
I tried adding a filter to ensure it wouldn't pick up tests in TestItemRunner:
using TestItemRunner
# Filter necessary to avoid some Gitlab errors where it
# was detecting tests in TestItemRunner itself.
@run_package_tests filter = ti -> contains(dirname(ti.filename), "MyPackage")
but this didn't work. Any ideas?