Julia TestItemRunner

Currently there’s no way to specify or even run the testitemrunner tests outside of vscode in any meaningful repl way.

Package structure is:

MainPackage:
Package.toml
test/
Package.toml
runtests.jl

runtests.jl contains:

using TestItemRunner

@run_package_tests verbose = true

The tests show and run fine in the VSCode testrunner.

The tests run fine when doing Pkg.test() in the MainPackage.

Any attemt to call the runtests.jl file directly fails with either TestItemRunner missing when called from MainPackage (as thats a test dep) or with MainPackage missing when called from the test folder package.

Any attempt to filter tests using the generic julia Pkg.test() infrastructure doesn’t work and there doesn’t seem to be a way to pass parameters at runtime when .test() is called to the @run_package_tests as its a macro, also run_tests form the testItemRunner package is not exported, so as it stands it only runs ALL tests all the time. Is there a way to make it apply filters ad hoc so i can do something like:

/MainPackage/julia runtests.jl filterRegExphere

and parse my regexp and so on in that file or just anything similar where i can constraint the exact test / file / case i want to run from the terminal.

The only relevant bit of documentation is the fact we can have a filter lamba passed to the testitemrunner macro but no info at all on how to make that lambda take dynamic parameters either from the Pkg.test infrastrcture or from the terminal. Clearly it’s possible by just using the unexported symbol run_tests since VsCode does exactly that in the test runner, but no idea how to replicate with the publicly available api.