Translation(s): none

Warning: This page will be merged with: Teams/Ruby/Packaging/Tests If you add more test-failures add them there. Don't add content here anymore.


Collecting errors related to ruby-tests, which are described here:

missing test folder from rubygems org

Error: gem2deb couldn't create a spec or test folder, as it is missing in the gem. At upstream, usually github, it is existent.

Solution: create a directory with the ruby-gem name and make it an empty git repo

mkdir ruby-subexec
cd !$
git init

Download the upstream tarball from github. Add tags to the homepage URL, so you will get a tar.gz file: You can download it like usual from there (or wget if you prefer)

import the upstream version to git with

git-import-orig --pristine-tar ~/Downloads/subexec-0.2.2.tar.gz 

You can now copy the complete debian directory gem2deb created for you and then go on like usual:

cp -a path/to/gem2deb_build/ruby-subexec/debian path/to/actual_build/ruby-subexec 

Tests failure due to interactions

Sometimes, The tests may pass perfectly when they are run separately and fail when we are building it because then the tests are running together and they may interact with each other. To see if the tests run okay individually run the following commands inside the test directory.

RUBY=ruby1.8 ./
RUBY=ruby1.9.1 ./

If the tests are passing now, you may want to figure out a way and edit the debian/ruby-tests.rb file by which the tests can run without interacting with each other. One such fix made to the ruby-tests.rb file is as follows.

Dir['test/*_test.rb'].each do |f|
  puts f        
  system("#{ENV['RUBY_TEST_BIN']} -Idebian/ruby-timecop/usr/lib/ruby/vendor_ruby:./test  #{f}") or raise        

The new ruby-tests.rb has a loop: for every test file, call ruby with this test file, and raise an exception if the test fails this way, all the tests are run separately.

placeholder for next error