[Rake-devel] testtasks.rb failure

Lionel Thiry lthiry at skynet.be
Mon May 2 17:36:14 EDT 2005


Berger, Daniel a écrit :
> Hi all,
> 
> I add this test to testtasks.rb for future use if you like:
> 
> def test_directory_win32
>    desc "WIN32 DESC"
>    directory 'c:\testdata\a\b\c'
>    assert_equal FileTask, Task['c:\testdata'].class
>    assert_equal FileTask, Task['c:\testdata\a'].class
>    assert_equal FileTask, Task['c:\testdata\a\b\c'].class
>    assert_nil             Task['c:\testdata'].comment
>    assert_equal "WIN32 DESC",   Task['c:\testdata\a\b\c'].comment
>    assert_nil             Task['c:\testdata\a\b'].comment
>    verbose(false) {
>       Task['c:\testdata\a\b'].invoke
>    }
>    assert File.exist?('c:\testdata\a\b')
>    assert ! File.exist?('c:\testdata\a\b\c')
> end
> 
> After applying Lionel's patch, all tests pass for testtasks.rb:
> 
> C:\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4\test>ruby testtasks.rb
> Loaded suite testtasks
> Started
> ..............................
> Finished in 3.705 seconds.
> 
> 30 tests, 77 assertions, 0 failures, 0 errors
> 
> Lionel, are you still seeing failures?
> 
> Regards,
> 
> Dan
> 

Yes, testasks alone works perfectly:
----8<----
C:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4>rake test TEST=test/testtasks.rb
(in C:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.4)

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

I've retested the complete unittesting. I don't understand, I don't have the 
same output as te one I send before. Must have made a manipulation error last 
time, sorry. However, I send the new one in attachment: there are still 2 
failures and 15 errors (and that weird error occuring /during/ the tests
----8<----
-e:1:in `exit': no implicit conversion from nil to integer (TypeError)
	from -e:1)
----8<----
)

-- 
Lionel Thiry

Personal website: http://users.skynet.be/lthiry/
-------------- next part --------------
c:\usr\ruby\lib\ruby\gems\1.8\gems\rake-0.5.4> rake
(in c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.4)
UNABLE TO RUN FUNCTIONAL TESTS
No Session Found
Loaded suite c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.4/lib/rake/rake_test_loader
Started
EEEEEEEEEEEE.......................................................-e:1:in `exit': no implicit conversion from nil to integer (TypeError)
	from -e:1
FE.EF.......E...............................
Finished in 3.859 seconds.

  1) Error:
test_dry_run(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/default
    ./test/functional.rb:77:in `chdir'
    ./test/functional.rb:77:in `test_dry_run'

  2) Error:
test_dry_run_bug(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/dryrun
    ./test/functional.rb:86:in `chdir'
    ./test/functional.rb:86:in `test_dry_run_bug'

  3) Error:
test_env_availabe_at_task_scope(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/default
    ./test/functional.rb:54:in `chdir'
    ./test/functional.rb:54:in `test_env_availabe_at_task_scope'

  4) Error:
test_env_availabe_at_top_scope(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/default
    ./test/functional.rb:48:in `chdir'
    ./test/functional.rb:48:in `test_env_availabe_at_top_scope'

  5) Error:
test_imports(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/imports
    ./test/functional.rb:104:in `chdir'
    ./test/functional.rb:104:in `test_imports'

  6) Error:
test_multi_desc(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/multidesc
    ./test/functional.rb:60:in `chdir'
    ./test/functional.rb:60:in `test_multi_desc'

  7) Error:
test_nosearch(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/nosearch
    ./test/functional.rb:72:in `chdir'
    ./test/functional.rb:72:in `test_nosearch'

  8) Error:
test_rake_default(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/default
    ./test/functional.rb:36:in `chdir'
    ./test/functional.rb:36:in `test_rake_default'

  9) Error:
test_rake_error_on_bad_task(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/default
    ./test/functional.rb:42:in `chdir'
    ./test/functional.rb:42:in `test_rake_error_on_bad_task'

 10) Error:
test_rbext(FunctionalTest):
NameError: uninitialized constant Session::Shell
    ./test/functional.rb:125:in `rake'
    ./test/functional.rb:67:in `test_rbext'
    ./test/functional.rb:67:in `chdir'
    ./test/functional.rb:67:in `test_rbext'

 11) Error:
test_rules_chaining_to_file_task(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/chains
    ./test/functional.rb:115:in `chdir'
    ./test/functional.rb:115:in `test_rules_chaining_to_file_task'

 12) Error:
test_trace_bug(FunctionalTest):
Errno::ENOENT: No such file or directory - test/data/dryrun
    ./test/functional.rb:95:in `chdir'
    ./test/functional.rb:95:in `test_trace_bug'

 13) Failure:
test_ruby(TestFileUtils)
    [./test/testfileutils.rb:101:in `test_ruby'
     ./test/testfileutils.rb:99:in `call'
     ./lib/rake.rb:492:in `sh'
     ./lib/rake.rb:563:in `sh'
     ./lib/rake.rb:558:in `sh'
     ./lib/rake.rb:510:in `ruby'
     ./lib/rake.rb:563:in `ruby'
     ./lib/rake.rb:558:in `ruby'
     ./test/testfileutils.rb:99:in `test_ruby'
     ./test/testfileutils.rb:95:in `verbose'
     ./test/testfileutils.rb:95:in `test_ruby']:
<123> expected but was
<1>.

 14) Error:
test_sh(TestFileUtils):
RuntimeError: Command failed with status (1): [test/shellcommand.rb]
    ./lib/rake.rb:485:in `sh'
    ./lib/rake.rb:484:in `call'
    ./lib/rake.rb:492:in `sh'
    ./lib/rake.rb:563:in `sh'
    ./lib/rake.rb:558:in `sh'
    ./test/testfileutils.rb:56:in `test_sh'
    ./test/testfileutils.rb:56:in `verbose'
    ./test/testfileutils.rb:56:in `test_sh'

 15) Error:
test_sh_multiple_arguments(TestFileUtils):
RuntimeError: Command failed with status (1): [test $RAKE_TEST_SH = someval]
    ./lib/rake.rb:485:in `sh'
    ./lib/rake.rb:484:in `call'
    ./lib/rake.rb:492:in `sh'
    ./lib/rake.rb:563:in `sh'
    ./lib/rake.rb:558:in `sh'
    ./test/testfileutils.rb:63:in `test_sh_multiple_arguments'
    ./test/testfileutils.rb:63:in `verbose'
    ./test/testfileutils.rb:63:in `test_sh_multiple_arguments'

 16) Failure:
test_sh_special_handling(TestFileUtils)
    [./test/testfileutils.rb:81:in `test_sh_special_handling'
     ./test/testfileutils.rb:80:in `call'
     ./lib/rake.rb:492:in `sh'
     ./lib/rake.rb:563:in `sh'
     ./lib/rake.rb:558:in `sh'
     ./test/testfileutils.rb:80:in `test_sh_special_handling'
     ./test/testfileutils.rb:79:in `verbose'
     ./test/testfileutils.rb:79:in `test_sh_special_handling']:
<false> is not true.

 17) Error:
test_create(TestMakefileLoader):
Errno::ENOENT: No such file or directory - test/data/sample.mf
    ./lib/rake/loaders/makefile.rb:11:in `initialize'
    ./lib/rake/loaders/makefile.rb:11:in `open'
    ./lib/rake/loaders/makefile.rb:11:in `load'
    ./test/test_makefile_loader.rb:11:in `test_create'

111 tests, 315 assertions, 2 failures, 15 errors
rake aborted!
Command failed with status (1): [ruby -Ilib -w "c:/usr/ruby/lib/ruby/gems/1...]

Process rake exited with code 1



More information about the Rake-devel mailing list