#358 Add a basic standard-test-zuul role
Opened 2 years ago by fbo. Modified 2 years ago
fbo/standard-test-roles standard-test-zuul  into  master

@@ -0,0 +1,18 @@ 

+ # Ansible role for tests using Zuul

+ 

+ Put this role in your `tests.yml` playbook. The playbook will first install

+ package dependencies listed on playbook on test node, then it will proceed

+ to run testing.  You can redefine the following variables:

+ 

+  * **tests**: A list of test cases

+  * **required_packages**: A list of prerequisite packages required by tests.

+ 

+ Example usage:

+ 

+     - hosts: fedora-rawhide

+       roles:

+       - role: standard-test-zuul

+         tests:

+         - getfattr-ignores-NULs-in-output-when-using-text

+         required_packages:

+         - attr

@@ -0,0 +1,2 @@ 

+ tests: []

+ required_packages: []

@@ -0,0 +1,12 @@ 

+ ---

+ - name: Install packages

+   package:

+     name: "{{ required_packages }}"

+     state: latest

+   become: true

+ 

+ - name: Run tests

+   command: ansible-playbook runtest.yml

+   args:

+     chdir: "{{ item }}"

+   with_items: "{{ tests }}"

This role is simple and does not manage any node provisionning
as done by nodepool in the Zuul world.

The role installs required packages and starts ansible playbook
on the specified tests.

Hi, I think this could be hosted inside on dist-git tests itself. STR provides generic STI implementation for https://docs.fedoraproject.org/en-US/ci/standard-test-interface/ and takes care for example of artifacts on test-runner and test-environment and other situations. I do not see reason to create a new role, just to host 2 Anisible-tasks.

ACK to close without merging.