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
Wildcard support in launcher #3200
Conversation
@sksamuel what do you think. Wanna give me a code review ? :) |
@LeoColman No. That one is very specific to gradle. Here is a comment by @sksamuel
It remains to be seen if what I am doing here is the "better" way. But I am motivated to push this to completion. :) Happy to accomodate any comments and revisions. |
@LeoColman one of my tests failed. I fixed it, it requires your approval to run these tests. Can you please retrigger them, sorry about that. Also I notice a lot of tests in this repo get skipped, is this expected ? |
I'm a little confused about what we're doing here - I'm pretty sure most of this functionality exists in these two files: kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/spec/interceptor/SystemPropertySpecFilterInterceptor.kt and kotest-framework/kotest-framework-engine/src/commonMain/kotlin/io/kotest/engine/test/status/SystemPropertyTestFilterEnabledExtension.kt all you should have to do iirc is set the sysprop/envvar appropriately before starting your runner |
@jschneidereit If this PR is merged you will be able to use the
The launcher already supports Not only this but you would be able to use this to write a runner like this
There is some conversation in here #2416 as well |
Changed the description. Thanks for asking @jschneidereit I should added more description in the PR |
I approved the run again.
I stand corrected, I overlooked the "wildcard" keyword only :P |
Looks like the tests have passed. What are the next steps @LeoColman |
What I was getting at is I think this is a duplicate implementation |
@jschneidereit can you elaborate. I highlighted the reasons on why it is different. You can target test, subtest etc by providing the right parameters |
I don't think the existing stuff supports the wildcard @jschneidereit ? |
I'm probably misunderstanding something here, but I recall adding test filtering by regex here: |
Would that approach apply if I am using the fat jar |
It might be that that fat jar author didn't know about the test/spec filter settings, or that I'm completely wrong 😂 |
I think this is reasonable extension to the far jar launcher unless you are considering removing it. I am looking forward to using the launcher binary. Can we please merge this since it builds on the existing functionality and I don't think it conflicts with gradle filter feature. |
I think this feature is good because in the future the launcher will need to know tests before we get into the engine, as we build out our own gradle plugin. The existing filter code works, but only when the tests are known in advance (like in the current plugin). |
We can merge this once green. |
Supporting wildcard in kotest launcher based on the discussion here #2416 (comment)
I am extending the
testpath
to support wildcard. In the future we can support regexes with very small changes.After this PR is merged you will be able to use the kotest-framework-engine-launcer with the following args
The launcher already supports --testpath argument. And this PR is just extending that testpath option to be more flexible. It is written with the same reasoning in mind as the original --testpath arg.
Not only this but you would be able to use this to write a runner like this