serpapi / turbo_tests

Run RSpec tests on multiple cores. Like parallel_tests but with incremental summarized output. Originally extracted from the Discourse and Rubygems source code.
https://rubygems.org/gems/turbo_tests
MIT License
173 stars 25 forks source link

TurboTests spawns several sub-processes even no tests match the filters #58

Open ilyazub opened 2 months ago

ilyazub commented 2 months ago

TurboTests, grosser/parallel_tests, and briandunn/flatware spawn several sub-processes even no tests match filters and outputs Run options: include {:not_exists=>true} multiple times. RSpec filters tests correctly in this case.

It works this way because it's required to load test files with RSpec to filter the tests. I'll try to find a work-around.

TurboTests command:

bundle exec turbo_tests ./spec/ --tag not_exists

TurboTests output:

3 processes for 3 specs, ~ 1 specs per process
Run options: include {:not_exists=>true}

All examples were filtered out
Run options: include {:not_exists=>true}

All examples were filtered out
Run options: include {:not_exists=>true}

All examples were filtered out

Finished in 3.67 seconds (files took 0.00396 seconds to load)

ParallelTests command:

bundle exec parallel_rspec -- --tag not_exists -r ./spec/spec_helper.rb -r ./lib/turbo_tests.rb -- ./spec/

ParallelTests output:

3 processes for 3 specs, ~ 1 spec per process
Run options: include {:"not_exists"=>true}

All examples were filtered out

Finished in 0.00026 seconds (files took 0.20091 seconds to load)
0 examples, 0 failures

Run options: include {:"not_exists"=>true}

All examples were filtered out

Finished in 0.0003 seconds (files took 0.21081 seconds to load)
0 examples, 0 failures

Run options: include {:"not_exists"=>true}

All examples were filtered out

Finished in 0.00066 seconds (files took 3.25 seconds to load)
0 examples, 0 failures

0 examples, 0 failures

Took 3 seconds

Flatware command:

bundle exec flatware rspec --tag non_exists

Flatware output:

Run options: include {:non_exists=>true}

All examples were filtered out
Run options: include {:non_exists=>true}

All examples were filtered out
Run options: include {:non_exists=>true}

All examples were filtered out

Finished in 0.00239 seconds (files took 3.52 seconds to load)

RSpec command:

bundle exec rspec ./spec/ --tag not_exists

RSpec output:

Run options: include {:not_exists=>true}

All examples were filtered out

Finished in 0.00212 seconds (files took 3.21 seconds to load)
0 examples, 0 failures