Closed jeygeethan closed 12 years ago
can you try to replace line 77 with this
output.putc (c.is_a?(Fixnum) ? c.chr : c)
No it didnt work.
I figured that STDOUT.flush in testrunner is causing this problem.
This the following full stacktrace :
C:/Ruby/lib/ruby/gems/1.8/gems/autotest-standalone-4.5.2/lib/unit_diff.rb:77:in write': Invalid argument (Errno::EINVAL) from C:/Ruby/lib/ruby/gems/1.8/gems/autotest-standalone-4.5.2/lib/unit_diff.rb:77:in
putc'
from C:/Ruby/lib/ruby/gems/1.8/gems/autotest-standalone-4.5.2/lib/unit_diff.rb:77:in parse_input' from C:/Ruby/lib/ruby/gems/1.8/gems/autotest-standalone-4.5.2/lib/unit_diff.rb:196:in
unit_diff'
from C:/Ruby/lib/ruby/gems/1.8/gems/autotest-standalone-4.5.2/lib/unit_diff.rb:56:in unit_diff' from C:/Ruby/lib/ruby/gems/1.8/gems/autotest-standalone-4.5.2/bin/unit_diff:44 C:/Ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:113:in
flush': Invalid argument (Errno::EINVAL)
from C:/Ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:113:in output_single' from C:/Ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:97:in
test_finished'
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in to_proc' from C:/Ruby/lib/ruby/1.8/test/unit/util/observable.rb:78:in
call'
from C:/Ruby/lib/ruby/1.8/test/unit/util/observable.rb:78:in notify_listeners' from C:/Ruby/lib/ruby/1.8/test/unit/util/observable.rb:78:in
each'
from C:/Ruby/lib/ruby/1.8/test/unit/util/observable.rb:78:in notify_listeners' from C:/Ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:47:in
run_suite'
... 11 levels...
from C:/Ruby/lib/ruby/1.8/test/unit/autorunner.rb:216:in run' from C:/Ruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in
run'
from C:/Ruby/lib/ruby/1.8/test/unit.rb:278
from -e:1
that`s strange, does removing flush help ?
I removed the two @io.flush statements from the testrunner.rb and still it showed the errorat unit_diff.rb:77.
Then I changed the output.putc to output.putc (c.is_a?(Fixnum) ? c.chr : c) at unit_diff.rb:77 and still the same error at unit_diff.rb:77
unit_diff.rb:77:in `write': Invalid argument (Errno::EINVAL)
so only changing to print helps ? I think ill install some windows+ruby somewhere and try to poke it a bit :>
Yea, print helps. I'll try another version of ruby (possibly 1.9.2) and let you know about this
I can confirm that by replacing to print fixes the error. I had the same issue. Windows 7, ruby 1.8.6, autotest-standalone-4.5.8. The weird thing is that I had it running ok for a few days, then the error showed up consistently every time I tried to run autotest.
see if you got ZenTest or autotest-standalone installed (or both), can you try something like
begin write xxx rescue Errno::EINVAL print xxx end
maybe thats a good solution to have color if possible and some output if not
I have autotest but not ZenTest. Tried your snippet, seems to be working. I have not enabled color so can't check that.
please give 4.5.9 a try :)
ok, i updated autoinstall and get the following:
(druby://localhost:49963) c:/Ruby187/lib/ruby/1.8/drb/drb.rb:1558:in
write': Invalid argument (Errno::EINVAL)
from (druby://localhost:49963) c:/Ruby187/lib/ruby/1.8/drb/drb.rb:1558:in puts' from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/formatters/progress_formatter.rb:25:in
start_dump'
from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb:74:in send' from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb:74:in
notify'
from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb:73:in each' from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb:73:in
notify'
from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb:21:in finish' from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/reporter.rb:14:in
report'
from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb:21:in run' from (druby://192.168.1.129:49943) c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/monkey/spork/test_framework/rspec.rb:5:in
run_tests'
from (druby://192.168.1.129:49943) ./magazine_slave.rb:22:in run' from (druby://127.0.0.1:8989) c:/Ruby187/lib/ruby/gems/1.8/gems/spork-0.8.5/lib/spork/run_strategy/magazine.rb:87:in
run'
from (druby://127.0.0.1:8989) c:/Ruby187/lib/ruby/gems/1.8/gems/spork-0.8.5/lib/spork/server.rb:47:in run' from c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/drb_command_line.rb:19:in
run'
from c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:76:in run_over_drb' from c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:63:in
run'
from c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in autorun' from c:/Ruby187/lib/ruby/gems/1.8/gems/rspec-core-2.7.1/exe/rspec:4
thats coming from rspec, which means your system is somehow broken, and every 'write' causes this error. you can either contact the rspec guys with this error or just try to e.g. reinstall ruby and see if it goes away (my recommendation: do not use windows or use vagrant in windows to get an unix environment, to avoid these kind of issues)
I get this error when trying to run autotest-standalone. When I replaced putc of lib/autotest.rb @ 284 to 'print', it worked fine. I know 'print' breaks the coloring on windows machines. Is this a problem with autotest or my ruby version?
Gems installed : autotest (4.4.5) autotest-rails-pure (4.1.2)
ruby --version : ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]