Accept test_args to specify which files to test#511
Accept test_args to specify which files to test#511mcabbott merged 4 commits intoJuliaDiff:masterfrom
test_args to specify which files to test#511Conversation
| @time Base.include(@__MODULE__(), path) do ex | ||
| Meta.isexpr(ex, :macrocall) && ex.args[1] == Symbol("@testset") || return ex | ||
| return :(@interpret (() -> $ex)()) # interpret testsets using JuliaInterpreter | ||
| function include_test(path) |
There was a problem hiding this comment.
At this point i think this function could do with a docstring.
test/runtests.jl
Outdated
| @testset "ChainRules" begin # one overall @testset ensures it keeps going after failures | ||
| include("test_helpers.jl") | ||
| println() | ||
| # @testset "rulesets" begin |
There was a problem hiding this comment.
This one can definitely go.
Remove this and un-indent everything else.
Probably we can remove that level of the file hierarchy too.
It's a legacy from when ChainRules and ChainRulesCore was one package.
Probably that should be a seperate PR.
There was a problem hiding this comment.
Can you move files without destroying git blame? Not sure how much that matters for tests, but sometimes nice to have. Although I would vote for less of a hierarchy, all else equal.
There was a problem hiding this comment.
I think you can.
It is crucial IMO that we don't destroy git-blame.
May need some research as to how to do it.
Or git mv might just do it.
test/runtests.jl
Outdated
| include("test_helpers.jl") | ||
| println() | ||
| # @testset "rulesets" begin | ||
| # @testset "Base" begin |
There was a problem hiding this comment.
Historically I have found these levels pretty useful.
but that may be less true, now that we are breaking the API less
|
Mostly my need for this has gone way down since i have TestEnv.jl But I am not at all opposed to this. I don't love having the commented out test set blocks |
oxinabox
left a comment
There was a problem hiding this comment.
I trust you to make appropriate changes as needed and merge when your happy that this is the most useful way.
Not really much to review here 😁
|
Maybe this should be marked RFC. This is a pretty simple mechanism, given that it already has a function which handles Or, as you say, I could learn to use https://github.com/JuliaTesting/TestEnv.jl . You still have to remember to run the |
These statements are all true. |
|
Let's try this out. We can add more levels of testsets back if this is too few. No version bump, won't tag this, since it's mostly for the purpose of local testing on master. |
This lets you select which test files to run, like this:
Only those files whose name or path contains one of the strings you provide will be run. Unless you provide nothing, in which case it runs everything, as before.
I also had a go at reducing the number of recursive levels of un-needed recursive testsets containing levels of testsets which weren't strictly necessary and contain other levels of testsets. Possibly this should go with a quick audit of the names of testsets (containing testsets) in the files being included.