|
|
(23 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
| = Description =
| | Moved to: https://docs.fedoraproject.org/en-US/ci/standard-test-roles/ |
| | |
| Package <code>standard-test-roles</code> provides shared Ansible roles and inventory scripts implementing the [[CI/Standard_Test_Interface|Standard Test Interface]]. It has support for multiple testing frameworks (such as BeakerLib or Avocado) and in this way allows to easily enable existing tests in Fedora CI.
| |
| | |
| = Links =
| |
| | |
| Pagure and Copr repositories:
| |
| | |
| * https://pagure.io/standard-test-roles/
| |
| * https://copr.fedorainfracloud.org/coprs/g/osci/standard-test-roles/builds/
| |
| | |
| = Install =
| |
| | |
| Install the latest version from the copr repo:
| |
| | |
| dnf/yum copr -y enable @osci/standard-test-roles
| |
| dnf/yum update standard-test-roles
| |
| | |
| = Roles =
| |
| | |
| Here's the list of currently supported roles:
| |
| | |
| * avocado
| |
| * basic
| |
| * beakerlib
| |
| * repo
| |
| * rhts
| |
| * rpm
| |
| * scripts
| |
| * source
| |
| | |
| == BeakerLib ==
| |
| | |
| If you have a set of beakerlib tests, it is recommended to place each test in its own subdirectory.
| |
| | |
| Then, create <code>tests.yml</code> file with contents similar to the following which runs tests using the 'standard-test-beakerlib' role included in the [https://pagure.io/standard-test-roles <code>standard-test-roles</code>] package. The list provided for the 'tests' parameter should be the list of names of your per-test subdirectories, and the 'required_packages' parameter should contain a list of additional packages that need to be installed to run the tests.
| |
|
| |
| <pre>
| |
| ---
| |
| - hosts: localhost
| |
| tags:
| |
| - atomic
| |
| - classic
| |
| - container
| |
| roles:
| |
| - role: standard-test-beakerlib
| |
| tests:
| |
| - cmd-line-options
| |
| required_packages:
| |
| - which # which package required for cmd-line-options
| |
| - rpm-build # upstream-testsuite requires rpmbuild command
| |
| - libtool # upstream-testsuite requires libtool
| |
| - gettext # upstream-testsuite requires gettext
| |
| </pre>
| |
| | |
| '''Note:''' The 'required_packages' parameter is ignored when running on Atomic Host--since there is no way to install additional packages in that environment.
| |
| | |
| == RHTS ==
| |
| | |
| If you have a set of tests you want to run using [http://restraint.readthedocs.io/en/latest/ restraint], each test must be placed in its own subdirectory.
| |
| | |
| Then, create <code>tests.yml</code> file with contents similar to the following which runs tests using the 'standard-test-rhts' role included in the [https://pagure.io/standard-test-roles <code>standard-test-roles</code>] package. The list provided for the 'tests' parameter should be the list of names of your per-test subdirectories, and the 'required_packages' parameter should contain a list of additional packages that need to be installed to run the tests.
| |
| | |
| <pre>
| |
| ---
| |
| - hosts: localhost
| |
| tags:
| |
| - classic
| |
| - docker
| |
| roles:
| |
| - role: standard-test-rhts
| |
| tests:
| |
| - cmd-line-options
| |
| required_packages:
| |
| - which # which package required for cmd-line-options
| |
| - rpm-build # upstream-testsuite requires rpmbuild command
| |
| - libtool # upstream-testsuite requires libtool
| |
| - gettext # upstream-testsuite requires gettext
| |
| </pre>
| |
| | |
| '''Note:''' Tests using the 'standard-test-rhts' role are not compatible with Atomic Host--since it requires the installation of additional packages and there is no way to do so in that environment. We reflect that by omitting <code>atomic</code> from the <tags> section.
| |
| | |
| = Contact =
| |
| | |
| * Andrei Stepanov (astepano)
| |