[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

gem2deb 0.9.0 in NEW, provides autopkgtest support



Dear all,

A new version of gem2deb 0.9.0 has been uploaded and is waiting in the
NEW queue at the moment. The reason for it to pass through the NEW queue
again is that it provides a new binary package: gem2deb-test-runner.

With this new version, gem2deb has gain support for automatic
as-installed package testing, also known as autopkgtest. The new
gem2deb-test-runner package provides a `gem2deb-test-runner` binary
which is in charge of running the test suite, during the package build
(through dh_ruby, as before) but also when running autopkgtest.

Concretely, what changes for Debian Ruby packages:
--------------------------------------------------

- Created packages with dh-make-ruby from gem2deb 0.9.0 will get new
  templates in debian/tests/ that will control the tests run for
  autopkgtest.

- When upgrading a new package, you'll be able to get these templates
  by running `dh-make-ruby .` from the root of your source package.

These templates contains fields needing to be updated, such that the
dependencies for the test suite. Note that these dependency are probably
a strict subset of the build-dependency of the package, with gem2deb
replaced by gem2deb-test-runner.

If you want to try to run the autopkgtest, you can try

	adt-run -B .// --- null

from the root of your source package. Consult

	file:///usr/share/doc/autopkgtest/README.running-tests.html

for more ways to run the tests.

Some caveats:
-------------

gem2deb-test-runner running in autopkgtest mode will move away lib/ and
ext/ directory, but will also *not* add the current directory to the
loadpath. As a consequence, if for example your Dir.glob expression for tests in
debian/ruby-tests.rb has "tests/**/test_*.rb", you need to change it to
have it prefixed with "./", to have something like "./tests/**/test_*.rb".

Many of the test suites will issue warning and thus write to stderr.
This is particularly true for those using RSpec. You may need to add

	Restrictions: allow-stderr

to the the paragraph describing the test suite in debian/tests/control.

Best regards,

Cédric

Attachment: signature.asc
Description: Digital signature


Reply to: