-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Sorry, I'm not sure it's appropriate to ask a question here, I am new to lava, I hope to know how to use loop in lava test.
Because our system needs to save some content when rebooting, I hope to test this function, such as rebooting 5000 times, but I don’t know how to add a loop to lava device (jinja2) or job (yaml).
I find the file https://github.com/Linaro/lava-test-plans/blob/master/lava_test_plans/testcases/android-boottime.yaml, It looks like the "-boot" action can be controlled through a for loop.
{% for index in range(1,8) %}
{% with FASTBOOT_COMMANDS=Null %}
- boot:
{% include "include/boot_target/boot_target.jinja2" %}
{% endwith %}
{% with test_timeout=boottime_timeout %}
{% include "include/test_target.jinja2" %}
{% endwith %}
But when I try the following code,
{% for index in range(1,8) %}
- boot:
method: minimal
timeout:
minutes: 10
auto_login:
login_prompt: 'tegra-ubuntu login:'
username: root
password_prompt: "Password:"
password: "root"
login_commands:
- ifconfig
prompts:
- 'root@tegra-ubuntu:'
parameters:
kernel-start-message: ''
transfer_overlay:
download_command: cd /tmp ; wget
unpack_command: tar -m -C / -xzf
{% endfor %}
lava report error: line22 is "{% for index in range(1,8) %}"
Invalid definition: Loading job submission failed: while scanning for the next token found character that cannot start any token in "", line 22, column 2.
where did I go wrong?
