Hi Praveen, On Wed, Aug 20, 2014 at 02:53:35AM +0530, Pirate Praveen wrote: > On Thursday 22 May 2014 11:38 PM, Pirate Praveen wrote: > > Hi > > > > I get lots of errors like this, > > > > 2) Error: > > sidekiq web#test_0020_escape job args and error messages: > > Errno::ENOENT: No such file or directory @ rb_sysopen - > > /usr/lib/ruby/web/views/retries.erb > > > > web/views/*.erb is actually at the root of the library. If someone > > familiar with these templating libraries can have a look it would be > > great. It is a matter of installing these in the correct path and > > setting it, I guess. > I have installed web directory in /usr/share/ruby-sidekiq and patched > lib/sidekiq/web.rb to pick this path but there is another problem. > The tests are run from lib path where as I remember we had to explicitly > add lib directory to load path earlier. it seems to be automatically > taken now, what is the rationale for this change? > in ruby-tests.rake I have added only tests to the load path. The rake/testtask file adds automatically by default the lib/ directory to the load_path. Check e.g. line 81 of /usr/lib/ruby/2.1.0/rake/testtask.rb Therefore if you ant to add *only* test/, and not "lib", you should replace tests.libs by ["test/"] (and not add "test" to that array that contains "lib/"). There was also a missing / from you patch I guess. Another thing is that the files in web should be installed in usr/share/ruby-sidekiq/ before dh_auto_install, since it's the one triggering the tests. So I added to override_dh_auto_install a call to dh_install to install web before the tests are run. (probably debian/ruby-sidekiq.install isn't needed anymore) I pushed these three changes to the team repo. Now the tests in test/test_web.rb are passing. I still get a random number of test failures coming from other parts though. I'll try to have a closer look later. Cheers, Cédric
Attachment:
signature.asc
Description: Digital signature