#58 standard-test-source: A new standard role to extract sources
Merged by merlinm. Opened by stefw.
stefw/standard-test-roles standard-test-source  into  master

Download 58.patch

This logic is used when invoking tests that are packaged in the
upstream tarball or sources. It is a technique used by the rpm-ostree
and cockpit tests.

Put this role in your tests.yml playbook. The playbook
will extract the upstream source tarball as described in
the package spec file into a test/source/ directory. You
can then use or execute files (usually tests) from the
upstream sources in your playbook.

You can redefine the following variables:

  • srcdir: A directory to extract sources into. This defaults
    to {{ playbook_dir }}/source/

rebased onto 84bdd683fe79f5a90e24510c736abec1c76e9e06

Updated with a 'flatten' variable

Tested it out. Works as documented as long as (1) a current enough version of fedpkg is installed that supports the --release option and (2) tests are run from within a dist-git repo.

Pull-Request has been merged by merlinm

Thanks for merging.

  1. The test specification [0] says the tests must be run from within a dist-git repo.
  2. Which version doesn't support --dist? On Fedora 24 I see --release in fedpkg --help

The test specification [0] says the tests must be run from within a dist-git repo.

Right. When I first tried running it directly from an upstreamfirst repo, it didn't work. I think this is the first case I've run across that needs to be run from within a dist-git repo.

Which version doesn't support --dist? On Fedora 24 I see --release in fedpkg --help

The F25 host I happened to select as my testing system still had a very outdated version of fedpkg installed. Version 1.25-1 it seems. Upon updating to 1.29-4, all was well.

Metadata