| |
@@ -48,11 +48,30 @@
|
| |
- "/usr/share/restraint/*"
|
| |
- "rpm.py"
|
| |
|
| |
+ # Using different variable to workaround bug https://github.com/ansible/ansible/issues/22025
|
| |
+ - set_fact:
|
| |
+ test_list: "{{ tests }}"
|
| |
+
|
| |
+ - name: Generate test list
|
| |
+ command: "{{ tests_generator_cmd }}"
|
| |
+ register: cmd_output
|
| |
+ when:
|
| |
+ - tests_generator_cmd is defined
|
| |
+ - tests_generator_cmd != ""
|
| |
+
|
| |
+ - set_fact:
|
| |
+ test_list: "{{ test_list + cmd_output.stdout_lines }}"
|
| |
+ when:
|
| |
+ - tests_generator_cmd is defined
|
| |
+ - tests_generator_cmd != ""
|
| |
+
|
| |
- name: Copy tests to test environment
|
| |
synchronize:
|
| |
- src: "{{ playbook_dir }}/"
|
| |
+ src: "{{ item }}"
|
| |
dest: "{{ tenv_workdir }}"
|
| |
ssh_args: "-o UserKnownHostsFile=/dev/null"
|
| |
+ with_items:
|
| |
+ - "{{ test_list }}"
|
| |
|
| |
- name: Fix up beakerlib at tests environment
|
| |
shell: >
|
| |
@@ -93,7 +112,7 @@
|
| |
echo "FAIL test {{ item }} does not appear to be a file or directory"
|
| |
fi
|
| |
with_items:
|
| |
- - "{{ tests }}"
|
| |
+ - "{{ test_list }}"
|
| |
|
| |
always:
|
| |
- name: Make the master tests summary log artifact
|
| |
@@ -111,7 +130,7 @@
|
| |
echo "UNKNOWN {{ item }}" >> {{ remote_artifacts }}/test.log
|
| |
fi
|
| |
with_items:
|
| |
- - "{{ tests }}"
|
| |
+ - "{{ test_list }}"
|
| |
|
| |
- include_role:
|
| |
name: str-common
|
| |
JIRA issue: https://projects.engineering.redhat.com/browse/RHELPLAN-3428
This commit adds new variable to standard-role-beakerlib
tests_generator_cmd
which should contain bash command producing absolute paths to tests (one path per line) you wish to add to list of tests being run with the playbook.Usage:
tests_generator_cmd
can be either written into playbook as variable:Pull request also changes task which copies tests to working directory (name: Copy tests to test environment), as I found the original way was redundant, I would appreciate feedback on this as well the whole pull request.
Task/variable names are subject to change.