debian-forge-composer/schutzbot/test_runner_image.yml
Lars Karlitski e4df938152 schutzbot: remove all timeouts except the global one
When we ran into these timeouts, they were always false negatives. It is
hard to find right values for them.

If someone does introduce a bug that hangs one of the tests, we still
have the global timeout.

Fixes #648
2020-05-20 07:21:13 -05:00

46 lines
1.5 KiB
YAML

---
- name: Setup test case prefix based on distro and release
set_fact:
test_case_prefix: >-
{%- if ansible_distribution == "Fedora" -%}
fedora_{{ ansible_distribution_version }}-{{ ansible_machine }}
{%- else -%}
rhel_{{ ansible_distribution_version }}-{{ ansible_machine }}
{%- endif -%}
- block:
- name: "Run image test case: {{ test_case_prefix }}-{{ test_case }}"
command: |
{{ image_test_executable }} -test.v \
{{ image_test_case_path }}/{{ test_case_prefix }}-{{ test_case }}
args:
chdir: "{{ tests_working_directory }}"
environment: "{{ env_vars }}"
register: test_cmd
- name: "Mark test case as passed: {{ test_case_prefix }}-{{ test_case }}"
set_fact:
passed_tests: "{{ passed_tests + [ test_case_prefix + '-' + test_case ] }}"
rescue:
- name: "Mark test case as failed: {{ test_case_prefix }}-{{ test_case }}"
set_fact:
failed_tests: "{{ failed_tests + [ test_case_prefix + '-' + test_case ] }}"
always:
- name: "Write log for test case: {{ test_case_prefix }}-{{ test_case }}"
copy:
dest: "{{ workspace }}/{{ test_case_prefix }}-{{ test_case }}.log"
content: |
Logs from test case: {{ test_case_prefix }}-{{ test_case }}
----------------------------------------------------------------------
stderr:
{{ test_cmd.stderr }}
----------------------------------------------------------------------
stdout:
{{ test_cmd.stdout }}