[Ironruby-core] AutoSpec exits after executing

Shri Borde Shri.Borde at microsoft.com
Wed Jan 20 16:50:25 EST 2010


open with a "|" seems to be the same as popen/popen3. We support both of those, so it should not be too hard to support open with a "|". Could even be written in Ruby code building on top of popen/popen3 (if you want a workaround right away).

-----Original Message-----
From: ironruby-core-bounces at rubyforge.org [mailto:ironruby-core-bounces at rubyforge.org] On Behalf Of Jimmy Schementi
Sent: Wednesday, January 20, 2010 2:22 AM
To: ironruby-core at rubyforge.org
Subject: Re: [Ironruby-core] AutoSpec exits after executing

> Hello,
> 
> I've been trying to get AutoSpec to work again.
> 
> I execute it using the following command:
> pretty:Kona Ben$ ir autospec
> 
> However, it just exits.
> 
> Any ideas why?
> 
> Thanks
> 
> Ben

So after doing this:

  > igem install ZenTest
  > cd C:\ironruby\lib\ironruby\gems\1.8\gems\ZenTest-4.1.4
  > ir -Ilib bin\autospec

Autospec tries to execute this command:

C:\ironruby\bin\ir.exe -I.;lib;test:../../minitest/dev/lib -rubygems -e "%w[minitest/autorun test/test_focus.rb test/test_autotest.rb test/test_zentest_mapping.rb test/test_unit_diff.rb test/test_zentest.rb].each { |f| require f }" | unit_diff -u

The problem is unit_diff will fail to load, since there is no unit_diff.bat or something like that on the path. To get past that I just commented out the unit_diff part of lib/autospec.rb#422. However, it still quits, though the command that is generated does run on its own. 

It quits because IronRuby doesn't support the call to open it is using (open with a "|"), and they are swallowing the error msg. Here's a smaller repro:

>>> open("| ir.exe -e \"puts 'hi'\"", 'r')
:0:in `open': Exception of type 'IronRuby.Builtins.NotImplementedError' was thrown. (NotImplementedError)
        from :0:in `open'
        from (ir):1

Tomas, is there any work-around to this? ... reading a process like a file, character by character?

To get autotest working right now, you can replace the entire open(){} call in lib/autotest.rb#243 with simply this:

      puts `#{cmd}`

It won't print out the test results as they happen, but it'll at least show the results when done, and rerun the tests when you change something.

~Jimmy
_______________________________________________
Ironruby-core mailing list
Ironruby-core at rubyforge.org
http://rubyforge.org/mailman/listinfo/ironruby-core



More information about the Ironruby-core mailing list