Skip to content
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

guard with parallel_tests fails #167

Closed
i0n opened this issue Mar 14, 2013 · 7 comments
Closed

guard with parallel_tests fails #167

i0n opened this issue Mar 14, 2013 · 7 comments

Comments

@i0n
Copy link

i0n commented Mar 14, 2013

I get the following output when configuring guard to use parallel_test.parallel_tests runs normally through rake.

/Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/gems/parallel_tests-0.10.0/lib/parallel_tests/cli.rb:65:in parse_options!': invalid option: -f (OptionParser::InvalidOption) from /Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/gems/parallel_tests-0.10.0/lib/parallel_tests/cli.rb:6:inrun'
from /Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/gems/parallel_tests-0.10.0/bin/parallel_rspec:5:in <top (required)>' from /Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/bin/parallel_rspec:19:inload'
from /Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/bin/parallel_rspec:19:in <main>' from /Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/bin/ruby_noexec_wrapper:14:ineval'
from /Users/i0n/.rvm/gems/ruby-1.9.3-p392@global/bin/ruby_noexec_wrapper:14:in `

'

Looks like it is trying to pass RSpec options to parallel_tests?

The configuration looks like this:

guard 'rspec', :parallel => true, :parallel_cli => '-n 2' do
.... stuff....
end

Gems:

rspec: 2.13.0
parallel_tests: 0.10.0
guard: 1.6.2
guard-rspec: 2.5.0

@thibaudgg
Copy link
Member

Could you try with the just released version 2.5.1 ?

@i0n
Copy link
Author

i0n commented Mar 15, 2013

Yes it works now. Thanks!

@i0n i0n closed this as completed Mar 15, 2013
@kainosnoema
Copy link

@thibaudgg I'm still getting this error (invalid option: -f (OptionParser::InvalidOption)) when using parallel_tests when all specs are run, but only after a single spec is run using zeus:

guard :rspec, zeus: true, run_all: { parallel: true, parallel_cli: '-n 4' } do
  # ...
end

Versions:

guard (1.8.2)
guard-rspec (3.0.2)
parallel_tests (0.15.1)

Any ideas?

@thibaudgg
Copy link
Member

And with just zeus & parallel_tests (without guard) you didn't get it?
Have you ~/.rspec or smilier file somewhere with the -f params?

@kainosnoema
Copy link

@thibaudgg zeus works fine on it's own, parallel_tests works fine on its own, and both work fine with guard actually, as long as they're both enabled for all tests. It's the exact configuration above that fails, and only when I run a single spec without parallel_tests first, then try running all specs with parallel_tests. It's almost as if the configuration is getting cached or munged somehow from the previous run.

I do have an .rspec file in the project root, and it has the --format option specified (not the shortened -f version).

@thibaudgg
Copy link
Member

Really strange edge-case, I don't use zeus or parallel_tests so I don't know how to fix it.
Have you try to change/remove your .rspec file?

@charlotte-miller
Copy link

I'm having the same issue... any ideas where to start debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants