-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdefaultqemu.jinja2
204 lines (196 loc) · 5.42 KB
/
defaultqemu.jinja2
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{%- set boot_method = boot_method|default("qemu") %}
{%- set boot_media= boot_media|default("tmpfs") %}
metadata:
image.type: 'montjoie-ci'
image.url: {{ BOOT_FQDN }}/{{ PATH }}/{{ KERNELFILE }}
kernel.tree: mainline
kernel.version: {{ KVERSION }}
kernel.endian: {{ ARCHENDIAN }}
kernel.defconfig: {{ K_DEFCONFIG }}
kernel.defconfig_base: {{ K_DEFCONFIG }}
kernel.arch_defconfig: {{ K_DEFCONFIG }}
platform.fastboot: false
platform.name: qemu
platform.mach: {{ MACH }}
test.plan: boot
git.commit: {{ GIT_LASTCOMMIT }}
git.describe: {{ GIT_DESCRIBE }}
git.branch: {{ GIT_BRANCH }}
git.url: http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
device.type: {{ DEVICETYPE }}
job.arch: {{ qemu_arch }}
job.name: {{ JOBNAME }}
job.kernel_url: {{ BOOT_FQDN }}/{{ PATH }}/{{ KERNELFILE }}
job.kernel_image: {{ KERNELFILE }}
job.modules_url: {{ BOOT_FQDN }}/{{ PATH }}/modules.tar.gz
{%- if initrd_path is defined %}
job.initrd_url: {{ RAMD_FQDN }}/{{ initrd_path }}
{%- endif %}
job.dtb_url: {{ BOOT_FQDN }}/{{ PATH }}/dts/{{ DTB }}
{%- if rootfs_method == "nfs" %}
job.nfsrootfs_url: {{ ROOT_FQDN }}{{ rootfs_path }}
{% endif %}
device_type: {{ DEVICETYPE }}
job_name: {{ JOBNAME }}
timeouts:
job:
minutes: 240
action:
minutes: 10
actions:
power-off:
seconds: 30
priority: high
visibility: public
{%- if DEVICETYPE == "qemu" %}
context:
arch: {{ qemu_arch }}
{%- if qemu_no_kvm is defined %}
no_kvm: {{ qemu_no_kvm }}
{%- endif %}
{%- if qemu_cpu is defined %}
cpu: {{ qemu_cpu }}
{%- endif %}
{%- if qemu_machine is defined %}
machine: {{ qemu_machine }}
{%- endif %}
{%- if qemu_memory is defined %}
memory: {{ qemu_memory }}
{%- endif %}
{%- if console_device is defined %}
console_device: {{ console_device }}
{%- endif %}
{%- if qemu_netdevice is defined %}
netdevice: {{ qemu_netdevice }}
{%- endif %}
{%- if qemu_model is defined %}
model: {{ qemu_model }}
{%- endif %}
{%- if guestfs_interface is defined %}
guestfs_interface: {{ guestfs_interface }}
{%- endif %}
{%- if guestfs_driveid is defined %}
guestfs_driveid: {{ guestfs_driveid }}
{%- endif %}
{%- if qemu_extra_options is defined %}
extra_options: {{ qemu_extra_options }}
{%- endif %}
{%- endif %}
actions:
- deploy:
timeout:
minutes: 3
to: {{ boot_media }}
os: oe
images:
kernel:
image_arg: '-kernel {kernel}'
url: {{ BOOT_FQDN }}/{{ PATH }}/{{ KERNELFILE }}
{%- if rootfs_method == "ramdisk" %}
ramdisk:
{%- if DEVICETYPE == "qemu" %}
{%- if image_arg is defined %}
image_arg: '{{ image_arg }}'
{% else %}
image_arg: '-initrd {ramdisk}'
{%- endif %}
{%- endif %}
url: {{ ROOT_FQDN }}{{ rootfs_path }}
{% endif %}
{%- if dtb_path is defined %}
dtb:
{%- if DEVICETYPE == "qemu" %}
image_arg: '-dtb {dtb}'
{%- endif %}
url: {{ BOOT_FQDN }}{{ dtb_path }}
{%- endif %}
{%- if rootfs_method == "nfs" %}
ramdisk:
{%- if image_arg is defined %}
image_arg: '{{ image_arg }}'
{% else %}
image_arg: '-initrd {ramdisk}'
{%- endif %}
url: {{ RAMD_FQDN }}{{ initrd_path }}
nfsrootfs:
url: {{ ROOT_FQDN }}/{{ rootfs_path }}
compression: {{ ROOTFS_COMP }}
{% endif %}
- boot:
timeout:
minutes: 5
method: {{ boot_method }}
media: {{ boot_media }}
{%- if boot_commands is defined %}
commands: {{ boot_commands }}
{%- endif %}
prompts:
- '/ #'
- '~ #'
{%- if auto_login_password %}
auto_login:
login_prompt: "login:"
username: root
password_prompt: 'Password:'
password: {{ auto_login_password }}
{% endif %}
{%- if test_gentoo == 'True' %}
- test:
timeout:
minutes: 30
definitions:
- repository: https://github.com/montjoie/lava-tests.git
from: git
path: execs/gentoo.yaml
name: Gentoo
{% endif %}
{%- if test == 'True' %}
- test:
timeout:
minutes: 240
definitions:
- repository:
metadata:
format: Lava-Test Test Definition 1.0
name: download_modules
description: "Download modules"
run:
steps:
- if [ -e /proc/pnp ];then grep nameserver /proc/pnp >> /etc/resolv.conf;fi
- /bin/sh -c 'grep -q ^name /etc/resolv.conf || sleep 15'
- wget {{ BOOT_FQDN }}/{{ PATH }}/modules.tar.gz
- tar xvzf modules.tar.gz -C /
from: inline
name: downloadmodule
path: inline/dm.yaml
{%- if test_boot == 'True' %}
- repository: https://github.com/montjoie/lava-tests.git
from: git
path: execs/boot.yaml
name: Boot
{%- endif %}
{%- if test_network == 'True' %}
- repository: https://github.com/montjoie/lava-tests.git
from: git
path: execs/network.yaml
name: Network
{%- endif %}
{%- if test_hw == 'True' %}
- repository: https://github.com/montjoie/lava-tests.git
from: git
path: execs/hardware.yaml
name: Hardware
{%- endif %}
{%- if test_crypto == 'True' %}
- repository: https://github.com/montjoie/lava-tests.git
from: git
path: execs/crypto.yaml
name: Crypto
{%- endif %}
{%- if test_misc == 'True' %}
- repository: https://github.com/montjoie/lava-tests.git
from: git
path: execs/misc.yaml
name: Misc
{%- endif %}
{%- endif %}