From: "NARUSE, Yui" Date: 2011-07-24T03:42:49+09:00 Subject: [ruby-dev:44211] Re: [ruby-cvs:39820] naruse:r32642 (trunk): * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base (2011/07/24 0:23), Eric Hodel wrote: > > On Jul 23, 2011, at 4:21 AM, naruse@ruby-lang.org wrote: > >> naruse 2011-07-23 20:21:55 +0900 (Sat, 23 Jul 2011) >> >> New Revision: 32642 >> >> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32642 >> >> Log: >> * test/rake/test_rake_functional.rb (setup): Use __FILE__ for the base >> directory. Current directory is not the top source directory when >> the building process runs on other than there. >> >> * test/rake/test_rake_rake_test_loader.rb: ditto. > > In git, rake uses a separate path to the tests so I can't merge these changes back. > Is there a better way of finding the top source directory than checking: > > File.basename File.expand_path('..', __FILE__) == 'rake' # true for ruby, false for rake It can be @rake_path = File.expand_path("../bin/rake", __FILE__[/.*\/test\//]) until both ruby's and original rake's test is in /test/. > Do you know which tests are changing PWD? > Can we fix them to restore PWD to the top source directory? From the first, my pwd is not the top source directory. My environment is: /home/naruse/ruby # top source directory /home/naruse/obj/ruby # top build directory and I run like: cd /home/naruse/obj/ruby ../../ruby/configure make Anyway, thank you for noticing the commit and merging. -- NARUSE, Yui