[Rake-devel] rake unittests fails

Lionel Thiry lthiry at skynet.be
Wed Apr 13 11:44:40 EDT 2005


Jim Weirich a écrit :
> On Tuesday 12 April 2005 09:06 pm, Lionel Thiry wrote:
> 
>>Lionel Thiry a écrit :
>>
>>>On win2k, when running rake tests, it seems to loop at some point (and
>>>there are errors). I've done it with rake-0.5.3.
> 
> [...]
> 
>>>C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.3>rake
>>>(in C:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3)
>>>ruby -Ilib -w
> 
> [...]
> 
>>>UNABLE TO RUN FUNCTIONAL TESTS
>>>No Session Found
>>>Started
>>>EEEEEEEEEEEE.............................................
> 
> 
> I've not seen the looping test problem before.  I am using a new test loader 
> (after testrb caused its own problems).  Try the following.
> 
> The Session class is needed for the functional tests, unfortunately it doesn't 
> work properly under Windows ... so the functional tests are disabled.  So try 
> running just the unittests.  Like this ...
> 
>   rake unittests

Still doesn't work.

8<---8<---8<---8<---8<---8<---8<---8<---
C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.3>rake unittests
(in C:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3)
ruby -Ilib -w c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake/rake_test_l
oader.rb test/testclean.rb test/testfilelist.rb test/testfileutils.rb test/testf
tp.rb test/testpackagetask.rb test/testtasks.rb test/testtesttask.rb test/test_m
akefile_loader.rb
Loaded suite c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake/rake_test_lo
ader
Started
.............................................

<I control-C here>

/test/filecreation.rb:10:in `sleep'
: Interrupt
         from ./test/filecreation.rb:10:in `create_timed_files'
         from ./test/testtasks.rb:125:in `test_file_depends_on_task_depend_on_fil
e'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
          ... 6 levels...
         from c:/usr/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit.rb:285
         from c:/usr/ruby/lib/ruby/1.8/test/unit.rb:283
Terminer le programme de commandes (O/N) ? O

C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.3>
8<---8<---8<---8<---8<---8<---8<---8<---


> 
> If that doesn't help, try switching to an alternative test loader.  Edit the 
> rakefile to say ...
> 
>   Rake::TestTask.new(:unittests) do |t|
>     t.test_files = FileList['test/test*.rb']
>     t.warning = true
>     t.verbose = false
>     t.loader = :testrb                    # add this line
>   end
> 

Still looping, but the output is different. Here it is:

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.3>rake unittests
(in C:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3)
ruby -Ilib -w -S testrb c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake/r
uby182_test_unit_fix.rb test/testclean.rb test/testfilelist.rb test/testfileutil
s.rb test/testftp.rb test/testpackagetask.rb test/testtasks.rb test/testtesttask
.rb test/test_makefile_loader.rb
Loaded suite [c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake/ruby182_tes
t_unit_fix.rb, test/testclean.rb, test/testfilelist.rb, test/testfileutils.rb, t
est/testftp.rb, test/testpackagetask.rb, test/testtasks.rb, test/testtesttask.rb
, test/test_makefile_loader.rb]
Started
EE......................................EEE-e:1:in `exit': no implicit conversio
n from nil to integer (TypeError)
         from -e:1
FE.EF................EE

<I control-C here>

./test/filecreation.rb:10:in `sleep': Interrupt
         from ./test/filecreation.rb:10:in `create_timed_files'
         from ./test/testtasks.rb:125:in `test_file_depends_on_task_depend_on_fil
e'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
          ... 7 levels...
         from c:/usr/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `
start'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in
`run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run'
         from c:/usr/ruby/bin/testrb:5
rake aborted!
Command failed with status (1): [ruby -Ilib -w -S testrb c:/usr/ruby/lib/ru...]

Terminer le programme de commandes (O/N) ? O

C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.3>
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

> 
>>There is another problem when testing an older rake version with a newer 
>>version installed: tests are runned with the latest version.
> 
> 
> Hmmm ... I test cross versions all the time, but usually it is an older 
> version testing a newer version.  The unit tests are run as a separate 
> process and the load paths are setup to pick up the version under test.
> 
> Try this command (from the top directory of the Rake source tree):
> 
>   ruby -Ilib bin/rake --version
> 
> It should report the version of the rake software being tested (rather than 
> the version of rake installed).  
> 

It works (once --version is removed). But rake-0.5.0 and rake-0.4.15 loop at the 
same point as rake-0.5.3.

8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---
./test/filecreation.rb:10:in `sleep': Interrupt
         from ./test/filecreation.rb:10:in `create_timed_files'
         from ./test/testtasks.rb:124:in `test_file_depends_on_task_depend_on_fil
e'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testcase.rb:70:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run'
          ... 7 levels...
         from c:/usr/ruby/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `
start'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in
`run'
         from c:/usr/ruby/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run'
         from c:/usr/ruby/bin/testrb:5
rake aborted!
8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---8<---

--
Lionel Thiry


More information about the Rake-devel mailing list