Differences between revisions 9 and 10
Revision 9 as of 2013-03-13 16:38:39
Size: 2378
Editor: ?markus tornow
Comment: adding Warning that this sub-page will be removed.
Revision 10 as of 2013-03-14 00:52:05
Size: 2350
Editor: GeoffSimmons
Comment: Use internal link.
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
https://wiki.debian.org/Teams/Ruby/Packaging/Tests#preview [[Teams/Ruby/Packaging/Tests]]

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: https://github.com/nulayer/subexec/tags 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 ./run_tests.sh
RUBY=ruby1.9.1 ./run_tests.sh

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