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

autotest check flawed on windows #1

Open
DrusTheAxe opened this issue Sep 17, 2009 · 1 comment
Open

autotest check flawed on windows #1

DrusTheAxe opened this issue Sep 17, 2009 · 1 comment

Comments

@DrusTheAxe
Copy link

Very nice plugin, but on Windows you see on the console
...
ps : illegal option -- o
Loaded suite C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
...
That 'ps' line is due to init.rb, line 3

Assumes Unix (Linux?); doesn't work on Windows. Simple fix, don't do this on Windows -- wrap the current while...end loop with a not-windows check:

if ENV['RAILS_ENV'] == 'test' && !%w{false none}.include?(ENV['BENCHMARK'])
unless RAILS =~ /mswin32/
while (pid ||= $$).to_i > 0
pid, *process = ps -p #{pid} -o ppid -o args.strip.split("\n").last.split
@autotest ||= process.join =~ /autotest/i
end
end

require File.dirname(__FILE__) + "/lib/test_benchmark" unless @autotest

end

@DrusTheAxe
Copy link
Author

Sorry, cut/paste error. That should be

unless RUBY_PLATFORM =~ /mswin32/

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

1 participant