-
Notifications
You must be signed in to change notification settings - Fork 8
/
tests.yml
96 lines (84 loc) · 2.45 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
- hosts: localhost
remote_user: root
gather_facts: no
vars:
artifacts: ./artifacts
testcase: dist.modulemd
taskotron_generic_task: true
tasks:
- name: Install required packages
dnf:
name: "{{ item }}"
state: latest
with_items:
- python2-pdc-client
- python2-aexpect
- python2-modulemd
- python2-requests
- python2-enchant
- hunspell-en-US
- libtaskotron-core
- libtaskotron-fedora
register: dnf_output
# retry for network failures
retries: 3
delay: 30
until: dnf_output is succeeded
- name: Print msg of DNF task
debug:
var: dnf_output.results[0].msg
when: "'msg' in dnf_output.results[0]"
- name: Print results of DNF task
debug:
var: dnf_output.results[0].results | sort
when: "'results' in dnf_output.results[0]"
- name: Install avocado from updates-testing
dnf:
name: "{{ item }}"
state: latest
enablerepo: updates-testing
with_items:
- python2-avocado
- python2-avocado-plugins-varianter-yaml-to-mux
register: dnf_output
- name: Print msg of DNF task
debug:
var: dnf_output.results[0].msg
when: "'msg' in dnf_output.results[0]"
- name: Print results of DNF task
debug:
var: dnf_output.results[0].results | sort
when: "'results' in dnf_output.results[0]"
- name: Enable MTF Copr repo
shell: dnf copr -y enable phracek/Modularity-testing-framework
- name: Install MTF from updates-testing
dnf:
name: modularity-testing-framework
state: latest
enablerepo: updates-testing
register: dnf_output
- name: Print msg of DNF task
debug:
var: dnf_output.msg
when: "'msg' in dnf_output"
- name: Print results of DNF task
debug:
var: dnf_output.results | sort
when: "'results' in dnf_output"
- name: Make sure taskotron results dir exists
# this is for placing results.yml file
file:
path: "{{ artifacts }}/taskotron"
state: directory
- name: Create work dir
tempfile:
path: /var/tmp
state: directory
prefix: task-{{ testcase }}_
register: workdir
- name: Run the check
shell: >
./run_check.py {{ taskotron_item }} {{ workdir.path }}
{{ artifacts }} {{ testcase }}
&> {{ artifacts }}/test.log