-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjob-template.yaml.j2
More file actions
132 lines (123 loc) · 3.9 KB
/
Copy pathjob-template.yaml.j2
File metadata and controls
132 lines (123 loc) · 3.9 KB
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
{# LAVA job template for BSP HIL testing with Robot Framework #}
{# Rendered by bsp/lava_job_builder.py — see module docstring for context #}
{# #}
{# Available context variables: #}
{# device_type - LAVA device type label #}
{# job_name - human-readable job name #}
{# image_url - full URL to the primary image artifact #}
{# artifact_url - base URL where build artifacts are served #}
{# build_path - relative build output directory path #}
{# device_slug - device slug (e.g. "qemu-arm64") #}
{# release_slug - release slug (e.g. "scarthgap") #}
{# feature_slugs - list of active feature slugs #}
{# lava_tags - list of LAVA device tags #}
{# robot_suites - list of Robot Framework .robot file paths #}
{# robot_variables - dict of Robot Framework --variable pairs #}
{# timeout_minutes - overall job timeout in minutes #}
job_name: "{{ job_name }}"
device_type: {{ device_type }}
{% if lava_tags %}
tags:
{% for tag in lava_tags %}
- {{ tag }}
{% endfor %}
{% endif %}
{% if context %}
context:
arch: {{ context.device_arch }}
# machine: {{ context.device_machine }}
extra_options:
- -cpu
- max
{% endif %}
timeouts:
job:
minutes: {{ timeout_minutes }}
action:
minutes: {{ [timeout_minutes // 2, 5] | max }}
connection:
minutes: 5
priority: medium
visibility: public
{% if image_url %}
actions:
- deploy:
timeout:
minutes: {{ [timeout_minutes // 4, 10] | max }}
to: tmpfs
images:
rootfs:
url: {{ image_url }}
# image_arg: "-drive file={rootfs},if=ide,format=raw -cpu max"
image_arg: "-drive file={rootfs},format=raw,if=none,id=rootfs -device virtio-blk-device,drive=rootfs"
- boot:
timeout:
minutes: 10
method: qemu
media: tmpfs
auto_login:
login_prompt: "login:"
username: root
prompts:
- "root@"
- "\\$"
{% if robot_suites %}
- test:
timeout:
minutes: {{ [timeout_minutes // 2, 15] | max }}
definitions:
{% for suite in robot_suites %}
- repository: https://github.com/Advantech-EECC/bsp-registry
from: git
name: "{{ suite | basename | replace('.robot', '') }}"
path: {{ suite }}
{% if robot_variables %}
parameters:
{% for var_name, var_value in robot_variables.items() %}
{{ var_name }}: "{{ var_value }}"
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
- test:
timeout:
minutes: {{ [timeout_minutes // 2, 10] | max }}
definitions:
- repository: https://github.com/Linaro/test-definitions.git
from: git
path: automated/linux/smoke/smoke.yaml
name: smoke
{% endif %}
{% else %}
{# No image URL — health-check only (useful for pre-provisioned DUTs) #}
actions:
- boot:
timeout:
minutes: 5
method: ssh
prompts:
- "root@"
- test:
timeout:
minutes: {{ timeout_minutes }}
definitions:
{% if robot_suites %}
{% for suite in robot_suites %}
- repository: {{ suite }}
from: file
name: "{{ suite | basename | replace('.robot', '') }}"
path: {{ suite }}
{% if robot_variables %}
parameters:
{% for var_name, var_value in robot_variables.items() %}
{{ var_name }}: "{{ var_value }}"
{% endfor %}
{% endif %}
{% endfor %}
{% else %}
- repository: https://github.com/Linaro/test-definitions.git
from: git
path: automated/linux/smoke/smoke.yaml
name: smoke
{% endif %}
{% endif %}