For those who still haven’t heard: tmt is now fully-supported in Packit, Fedora Continuous Integration (CI) system, and the RHEL CI system. Now you can use the same concise and consistent config to enable tests across all of them, more easily open source tests, share test coverage across releases ,and run tests as early as possible.

In the coming weeks we’ll be sharing short, bite-sized examples demonstrating tmt usage. With these, new users can get started quickly and existing users won’t miss various interesting and useful features hidden under the hood.

Here we go with the first set of examples showing how to quickly enable a simple smoke test for your component, assuming you are in your project git repository:

    sudo dnf install -y tmt
    cd git/fedora/rpms/foo
    tmt init --template mini
    vim plans/example.fmf

Adjust the example plan to run the desired command:

    summary: Basic smoke test
        script: foo --version

The very minimal config is really just two lines:

        script: make test

Now submit the pull request and wait for the results:

    git add .
    git checkout -b smoke-test
    git commit -m "Enable a simple smoke test"
    git push fork -u smoke-test

Eager to learn more? Not patient enough to wait for the results from the CI pipeline? Willing to safely execute tests from your laptop right now? Check the rest of the first chapter of our brand new guide to learn more.