GEM2DEB-TEST-RUNNER(1)

πŸ’– GEM2DEB-TEST-RUNNER πŸ’–

okay bestie, welcome to the gem2deb-test-runner corner of the GEM2DEB-TEST-RUNNER(1) manual πŸ’… she runs the test suite that lives inside Debian Ruby packages, and she is so good at it. grab a strawberry πŸ“ and let's go.


✨ NAME ✨

gem2deb-test-runner β€” runs the test suite contained in Debian Ruby packages 🧚


🌸 SYNOPSIS 🌸

gem2deb-test-runner [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: gem2deb-test-runner runs the tests that ship inside a source Debian Ruby package. the way those tests get run is configured in one of these three files:

  • debian/ruby-test-files.yaml
  • debian/ruby-tests.rake
  • debian/ruby-tests.rb

if you want the full tea on those, check the FILES section in dh_ruby(1). iykyk πŸ’œ

if you call it with no arguments, from the root of the source package, after the package has been built and installed under debian/package_name β€” then the tests will be run using the files of the package that's installed under debian/package_name. no cap. this call is literally part of the dh_ruby(1) sequence when you build a Ruby package with gem2deb, so she's out here doing main character work behind the scenes πŸ‘‘

and then there's --autopkgtest. if you use that option, the package needs to be installed on the system. gem2deb-test-runner will not try to load files under debian/, and it will move the lib/ and ext/ directories away temporarily 😭 so that the test suite gets run against the installed package. this is the whole point in the context of automatic as-installed package testing, through the autopkgtest framework. iconic behaviour fr fr.


πŸ’… OPTIONS πŸ’…

  • --autopkgtest β€” run the tests against the installed package, for automatic as-installed package testing. super useful in conjunction with adt-run(1). ✨
  • -c, --check-dependencies β€” before running the tests, she checks whether all the dependencies of the package (as declared in the Rubygems metadata) are actually present. if they aren't, the program exits with a non-zero status code β€” i.e. it fails. so like, a vibe check on your deps πŸ’€
  • -b, --check-bundler β€” check that the package can be correctly loaded by bundler. this tests that the package can be loaded properly by bundler with the following two types of Gemfiles. one of them lists the package as a top-level dependency:
gem "foo"

that one gets tested by calling ruby -rbundler/setup. 🫢

the other type includes the package in a group:

group :test do
  gem "foo"
end

and that one gets tested by calling ruby -rbundler -e 'Bundler.require(:test)'. slay.


🌈 ENVIRONMENT 🌈

  • GEM2DEB_TEST_RUNNER β€” used to pass options to gem2deb-test-runner via the environment. for example, to make gem2deb-test-runner check dependencies during package build, you can add the following to debian/rules:
export GEM2DEB_TEST_RUNNER = --check-dependencies

set it and forget it, bestie. 😌


πŸŽ€ EXIT STATUS πŸŽ€

  • 0 if tests pass. we love to see it πŸ’–
  • 1 if tests fail. </3
  • 77 if --autopkgtest was passed and gem2deb-test-runner cannot determine how to run the test suite. girl is confused and she's honest about it πŸ™ˆ

⭐ SEE ALSO ⭐

dh_ruby(1), gem2deb(1)


okay that's the whole page, go forth and run your tests πŸ’œ

this gorgeous little manual page is from the GEM2DEB-TEST-RUNNER(1) crew, dated 2026-05-15. mwah, periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from