-
Notifications
You must be signed in to change notification settings - Fork 33
Support parallel_test options: pattern, exclude-pattern & group-by #41
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
base: master
Are you sure you want to change the base?
Conversation
9492d22 to
91c7e63
Compare
|
There could be one issue around |
|
I would also suggest another PR to handle properly Fuubar #23 depending on |
ilyazub
left a comment
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.
Thanks for your contribution, @inkstak!
Let me think if we want turbo_tests to depend more on parallel_tests.
|
Hey, @ilyazub! Do you have a decision about the level of dependency on NOTE: as I know, these options belong to |
|
+1, this doesn't increase the dependency on Any chance you could merge, @ilyazub? |
|
FYI: For example, we use a CI script to launch our specs : if parallel
command = "bundle exec parallel_rspec"
command = "bundle exec turbo_tests" if parallel == "turbo_tests"
command += " --exclude-pattern spec/system" if arg == "unit"
command += " --pattern spec/system" if arg == "system"
else
command = "bundle exec rspec"
command += " --exclude-pattern 'system/**/*_spec.rb'" if arg == "unit"
command += " --pattern 'system/**/*_spec.rb'" if arg == "system"
endIn this PR, I forward those arguments to parallel_tests so it uses its implementation and not the one from RSpec. |
ilyazub
left a comment
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.
@inkstak @kalashnikovisme @steobrien Thanks for your work and sorry for not reviewing this PR sooner.
Let's record runtime log only when --group-by runtime is passed.
Because we want to support most of the ParallelTests options, may we call ParallelTests::CLI.send(:parse_options!, @argv) in TurboTests::CLI#run?
turbo_tests/lib/turbo_tests/cli.rb
Line 20 in b4b8856
| parallel_options = {} |
b4b8856 to
ddedb01
Compare
PR updated ! You can pass any options supported by parallel_tests after bundle exec turbo_tests -n 4 -- --only-group 1 --pattern spec/systemBecause OptionParser raises an exception on unknown options, I found it easier to split options like this. |
|
|
||
| subprocess_opts = { | ||
| record_runtime: use_runtime_info | ||
| record_runtime: @parallel_options[:group_by] == :runtime |
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.
Let's record runtime log only when
--group-by runtimeis passed.
Not sure if this line is still relevant...
ddedb01 to
7860d71
Compare
7860d71 to
42afe29
Compare
|
PR rebased |
|
@ilyazub any chance to get this merged? We would also benefit from that functionality. |
This PR adds suport for some parallel_test options:
EDIT: See #41 (comment)
This PR will now adds suport to any options supported by parallel_tests.
You can pass these options after
--:bundle exec turbo_tests -n 4 -- --only-group 1 --pattern spec/system