-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do all filtering of testitems at AST level #179
Conversation
Specifically `name` is required, `tags` is supported, `code` must be passed as a keyword argument.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
People are going to notice this one:) Very nice, Nick!!
I tried it on RAICode and it was much faster! I did run into this one issue when I tried to run a single top-level @test_rel
:
julia> runtests("test"; name="constant-folding-old-periods-old-1")
Activating project at `~/_proj/raicode_master3`
[ Info: Scanning for test items in project `RAICode` at paths: test
┌ Warning: Encountered duplicate @testsetup with name: `LoadJSONSetup`. Replacing...
└ @ ReTestItems ~/.julia/packages/ReTestItems/NieGI/src/ReTestItems.jl:663
ERROR: TaskFailedException
nested task error: LoadError: AssertionError: `tags` keyword must be passed a collection of `Symbol`s, got: $(Expr(:escape, :([:ring1, :integration]))) (Expr)
Stacktrace:
[1] var"@testitem"(__source__::LineNumberNode, __module__::Module, nm::Any, exs::Vararg{Any})
@ ReTestItems ~/.julia/packages/ReTestItems/NieGI/src/macros.jl:264
...
(I has to comment out the top-level evals first)
Thanks for pushing us to do this!
yeah, this is a bug in RAI's |
Follow-up to #170 that allows us to remove the
FilteredVector
and do all filtering of testitems beforeeval
'ing any code, this is possible (after #170) if we special-case the codepath we have to support RAI usage. This adds a bit more RAI-specific code to this package, but (i) speeds up RAI's use-case a lot and (ii) tidies up the filtering story in this package (since we can drop the codepaths that were doing filtering aftereval
ing code).On the RAI test codebase this speeds up filtering of test-items considerably. Here's how long it takes to filter out all the tests (e.g. with
runtests(; name="doesnotexist", tags=[:nosuchtag])
)Closes #41