From joshknowles at gmail.com Tue Apr 12 11:38:49 2005 From: joshknowles at gmail.com (Josh Knowles) Date: Tue Apr 12 11:33:20 2005 Subject: [Rake-devel] Unable to run when ruby is installed in directory with a space Message-ID: With the latest version of rake installed (0.5.3) and ruby 1.8.2 running on Windows installed under "c:\Programe Files" I get the following error: C:\Documents and Settings\jknowles\Desktop\taskthis-0.3>rake test_units (in C:/Documents and Settings/jknowles/Desktop/taskthis-0.3) ruby -Ilib;test c:/program files/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake /rake_test_loader.rb test/unit/taskitem_test.rb test/unit/tasklist_test.rb test/ unit/user_test.rb ruby: No such file or directory -- c:/program (LoadError) rake aborted! Command failed with status (1): [ruby -Ilib;test c:/program files/ruby/lib/...] I have attempted to track down the problem but am having little luck. Can someone point me in the right direction as to where I need to add the ' 's. Thanks. Josh From jim at weirichhouse.org Tue Apr 12 12:47:00 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Tue Apr 12 12:41:28 2005 Subject: [Rake-devel] Unable to run when ruby is installed in directory witha space In-Reply-To: References: Message-ID: <37620.192.223.163.5.1113324420.squirrel@weirichhouse.org> Josh Knowles said: > With the latest version of rake installed (0.5.3) and ruby 1.8.2 > running on Windows installed under "c:\Programe Files" I get the > following error: > > C:\Documents and Settings\jknowles\Desktop\taskthis-0.3>rake test_units > (in C:/Documents and Settings/jknowles/Desktop/taskthis-0.3) > ruby -Ilib;test c:/program > files/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake > /rake_test_loader.rb test/unit/taskitem_test.rb test/unit/tasklist_test.rb > test/ > unit/user_test.rb > ruby: No such file or directory -- c:/program (LoadError) > rake aborted! > Command failed with status (1): [ruby -Ilib;test c:/program > files/ruby/lib/...] > > I have attempted to track down the problem but am having little luck. > Can someone point me in the right direction as to where I need to add > the ' 's. Thanks for the heads up about the problem. It should be simple to fix. In the meantime, you can use an alternate test loader. In your rakefile, add a "t.loader = :testrb" line, something like this ... Rake::TestTask.new do |t| t.test_files = FileList['test/test_*.rb'] t.verbose = true t.loader = :testrb end That will switch to use the testrb loader that comes with Test::Unit. (I generally don't use the testrb loader because it tends to swallow syntax errors without any messages.) I'll have a new version of Rake out in the next day or so. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From lthiry at skynet.be Tue Apr 12 21:06:41 2005 From: lthiry at skynet.be (Lionel Thiry) Date: Tue Apr 12 20:58:07 2005 Subject: [Rake-devel] Re: rake unittests fails In-Reply-To: <425C6D58.8040507@skynet.be> References: <425C6D58.8040507@skynet.be> Message-ID: <425C70A1.20205@skynet.be> Sorry, I had a little problem of subscription. Here it is now: 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. > > There is another problem when testing an older rake version with a newer > version installed: tests are runned with the latest version. > > 8<---8<---8<---8<---8<---8<---8<---8<---8<---8<--- > 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 > 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 test/contrib/testsys.rb test/functional.rb > UNABLE TO RUN FUNCTIONAL TESTS > No Session Found > Loaded suite > c:/usr/ruby/lib/ruby/gems/1.8/gems/rake-0.5.3/lib/rake/rake_test_lo > ader > Started > EEEEEEEEEEEE............................................. > > > > /test/filecreation.rb:1 > 0: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<---8<---8<--- > > -- > Lionel Thiry > From jim at weirichhouse.org Tue Apr 12 23:04:40 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Tue Apr 12 22:58:37 2005 Subject: [Rake-devel] Unable to run when ruby is installed in directory with a space In-Reply-To: References: Message-ID: <200504122304.40344.jim@weirichhouse.org> On Tuesday 12 April 2005 11:38 am, Josh Knowles wrote: > With the latest version of rake installed (0.5.3) and ruby 1.8.2 > running on Windows installed under "c:\Programe Files" I get the > following error: I made a beta version (0.5.3.1) available at http://onestepback.org/betagems. To try out the new version, use ... gems update rake --source http://onestepback.org/betagems I quoted the loader file name (which was causing the problem) and also quoted all the test files. Let me know if that works for you. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From jim at weirichhouse.org Tue Apr 12 23:21:46 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Tue Apr 12 23:15:15 2005 Subject: [Rake-devel] Re: rake unittests fails In-Reply-To: <425C70A1.20205@skynet.be> References: <425C6D58.8040507@skynet.be> <425C70A1.20205@skynet.be> Message-ID: <200504122321.46674.jim@weirichhouse.org> 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 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 > 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). -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From lthiry at skynet.be Wed Apr 13 11:44:40 2005 From: lthiry at skynet.be (Lionel Thiry) Date: Wed Apr 13 11:36:20 2005 Subject: [Rake-devel] rake unittests fails In-Reply-To: <200504122321.46674.jim@weirichhouse.org> References: <425C6D58.8040507@skynet.be> <425C70A1.20205@skynet.be> <200504122321.46674.jim@weirichhouse.org> Message-ID: <425D3E68.6040707@skynet.be> 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 ............................................. /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 ./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 From jim at weirichhouse.org Wed Apr 13 12:55:26 2005 From: jim at weirichhouse.org (Jim Weirich) Date: Wed Apr 13 12:49:52 2005 Subject: [Rake-devel] rake unittests fails In-Reply-To: <425D3E68.6040707@skynet.be> References: <425C6D58.8040507@skynet.be> <425C70A1.20205@skynet.be><200504122321.46674.jim@weirichhouse.org> <425D3E68.6040707@skynet.be> Message-ID: <21192.192.223.163.5.1113411326.squirrel@weirichhouse.org> Lionel Thiry said: > 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. Thanks for the feedback ... it looks like there are problems with the unittests on windows platforms. The looping problem happens because Rake is trying to create a file with an later time stamp (for file dependency testing). Unfortunately, the File.delete method fails with an access error and a later file is never created. I fixed that, but there seems to be other issues with the FileUtils module on windows. I'll investigate further. Again, thanks for the feedback. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) From joshknowles at gmail.com Wed Apr 13 13:14:48 2005 From: joshknowles at gmail.com (Josh Knowles) Date: Wed Apr 13 13:09:13 2005 Subject: [Rake-devel] Unable to run when ruby is installed in directory with a space In-Reply-To: <200504122304.40344.jim@weirichhouse.org> References: <200504122304.40344.jim@weirichhouse.org> Message-ID: Grabbed Rake 0.5.3.2 and it appears to fix the bug I was seeing, now to just fix my failing tests.... :) On 4/12/05, Jim Weirich wrote: > On Tuesday 12 April 2005 11:38 am, Josh Knowles wrote: > > With the latest version of rake installed (0.5.3) and ruby 1.8.2 > > running on Windows installed under "c:\Programe Files" I get the > > following error: > > I made a beta version (0.5.3.1) available at http://onestepback.org/betagems. > > To try out the new version, use ... > > gems update rake --source http://onestepback.org/betagems > > I quoted the loader file name (which was causing the problem) and also quoted > all the test files. Let me know if that works for you. > > -- > -- Jim Weirich jim@weirichhouse.org http://onestepback.org > ----------------------------------------------------------------- > "Beware of bugs in the above code; I have only proved it correct, > not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas) > _______________________________________________ > Rake-devel mailing list > Rake-devel@rubyforge.org > http://rubyforge.org/mailman/listinfo/rake-devel > From lthiry at skynet.be Sat Apr 30 20:30:54 2005 From: lthiry at skynet.be (Lionel Thiry) Date: Sat Apr 30 20:21:50 2005 Subject: [Rake-devel] still the same bug in unittest of rake 0.5.4 Message-ID: <4274233E.6020105@skynet.be> Hello! The exact same bug is still here in rake-0.5.4. I worked some on it and I found where it lies. I changed this part in test/filecreation.rb ----8<---- module FileCreation def create_timed_files(oldfile, newfile) return if File.exist?(oldfile) && File.exist?(newfile) old_time = create_file(oldfile) while create_file(newfile) <= old_time sleep(0.1) File.delete(newfile) rescue nil end end ... end ----8<---- into ----8<---- module FileCreation def create_timed_files(oldfile, newfile) return if File.exist?(oldfile) && File.exist?(newfile) old_time = create_file(oldfile) while create_file(newfile) <= old_time sleep(0.1) begin File.delete(newfile) rescue Exception => e puts e end end end ... end ----8<---- I then have the following output when running rake test: ----8<---- 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_lo ader Started EEEEEEEEEEEE...............................................Permission denied - t estdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new Permission denied - testdata/new ./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 ----8<---- I do not actually understand why the permission is denied. By the way, if in file_creation.rb I just remove the "rescue nil" after File.delete(newfile), there is no more loop problem. But there are a lot of "Errno::EACCES: Permission denied - testdata/a.a" and alike (about 41). If I explore testdata and try some deletion myself, there is nothing wrong. I really don't understand. Any clue? -- Lionel Thiry Personal website: http://users.skynet.be/lthiry/