---
name: "gem2deb-test-runner"
section: "1"
platform: "linux"
package: "gem2deb-test-runner"
version: "2.2.5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gem2deb-test-runner"
---

# gem2deb-test-runner(1)

runs test suite contained in Debian Ruby packages

## NAME

gem2deb-test-runner - runs test suite contained in Debian Ruby packages

## SYNOPSIS

**gem2deb-test-runner** \[**OPTIONS**\]

## DESCRIPTION

**gem2deb-test-runner** runs the tests shipped inside a source Debian Ruby package. The way the tests are run is configured in one of the three files: *debian/ruby-test-files.yaml*, *debian/ruby-tests.rake*, *debian/ruby-tests.rb*. See the **FILES** section in [**dh\_ruby**(1)](/dh_ruby/1.md) for details.

If called without argument in the root of the source package after the package is built and installed under debian/*package\_name*, then the tests will be run using the files of the package installed under debian/*package\_name*. This call is part of the [**dh\_ruby**(1)](/dh_ruby/1.md) sequence when building a Ruby package with gem2deb.

If the option **--autopkgtest** is used, the package needs to be installed on the system. **gem2deb-test-runner** will not try to load files under debian/ and will move away temporarily the lib/ and ext/ directory to ensure the test suite is run against the installed package. This is used in the context of automatic as-installed package testing, through the autopkgtest framework.

## OPTIONS

- **--autopkgtest**

  Run the tests against the installed package for automatic as-installed package testing. Useful in conjunction with [**adt-run**(1)](/adt-run/1.md).

- **-c**, **--check-dependencies**

  Before running the tests, checks whether all dependencies of the package, as declared in the Rubygems metadata, are present. Makes the program exit with a non-zero status code (i.e. fails) if they aren't.

- **-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 lists the package as a top-level dependency:

  ```
    gem "foo"
  ```

  This will be tested by calling \`**ruby -rbundler/setup**\`.

  The other type includes the package in a group:

  ```
    group :test do
      gem "foo"
    end
  ```

  That will be tested by calling \`**ruby -rbundler -e 'Bundler.require(:test)'**\`.

## 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

## EXIT STATUS

- •

  0 if tests pass.

- •

  1 if tests fail.

- •

  77 if **--autopkgtest** was passed and **gem2deb-test-runner** cannot determine how to run the test suite.

## SEE ALSO

[**dh\_ruby**(1)](/dh_ruby/1.md), [**gem2deb**(1)](/gem2deb/1.md)
