/
custom_simple_job.jinja
107 lines (101 loc) · 2.11 KB
/
custom_simple_job.jinja
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
device_type: {{ device_type }}
job_name: {{ job_name}}
timeouts:
job:
minutes: {{ timeout }}
action:
minutes: 5
actions:
power-off:
seconds: 25
tftp-deploy:
minutes: 8
connection:
minutes: 2
priority: high
visibility: public
# ACTION_BLOCK
actions:
- deploy:
to: tftp
{%- if kernel %}
kernel:
url: {{ kernel }}
type: {% if kernel.endswith("/Image") %}image{% else %}zimage{% endif %}
{%- endif %}
{%- if rootfs %}
{{ rootfs_type }}:
url: {{ rootfs }}
compression: gz
{%- if rootfs_type == "ramdisk" %}
add-header: u-boot
{% endif %}
{%- endif %}
{%- if modules %}
modules:
url: {{ modules }}
compression: xz
{%- endif %}
{%- if device_tree %}
dtb:
url: {{ device_tree }}
{%- endif %}
os: oe
# BOOT_BLOCK
- boot:
method: u-boot
{%- if rootfs_type == "ramdisk" %}
commands: ramdisk
{% else %}
commands: nfs
{% endif %}
prompts:
# escape the brackets to ensure that the prompt does not match
# kernel debug lines which may mention initramfs
- '\(initramfs\)'
- 'root@linaro'
- '/ #'
auto_login:
login_prompt: 'login:'
username: 'root'
timeout:
minutes: 3
# TEST_BLOCK
- test:
timeout:
minutes: {{ timeout }}
definitions:
- repository:
metadata:
format: Lava-Test Test Definition 1.0
name: shell-test
description: "test the shell"
os:
- oe
scope:
- functional
run:
steps:
- lava-test-case shell --shell true
from: inline
name: shell-test
path: inline/shell-test.yaml
- repository: git://github.com/free-electrons/test_suite.git
from: git
path: tests/custom.yaml
name: custom-tests
parameters:
DEVICE: "{{ device_type }}"
TEST: "{{ test }}"
{% if notify %}
notify:
recipients:
{%- for email in notify %}
- to:
method: email
email: {{ email }}
{%- endfor %}
criteria:
status: finished
verbosity: verbose
{% endif %}