Support parallel_test options: pattern, exclude-pattern & group-by#41
Support parallel_test options: pattern, exclude-pattern & group-by#41inkstak wants to merge 1 commit intoserpapi:masterfrom
Conversation
9492d22 to
91c7e63
Compare
|
There could be one issue around |
|
I would also suggest another PR to handle properly Fuubar #23 depending on |
|
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.
@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
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.
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