Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lkft-android: add android boottime testcase #265

Merged
merged 2 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lava_test_plans/include/android-boottime-definition.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- repository: {{ TEST_DEFINITIONS_REPOSITORY }}
from: git
path: automated/android/boottime/boottime.yaml
name: {{ testname }}
{% if test_operation is defined %}
params:
ANDROID_VERSION: master
OPERATION: {{ test_operation }}
COLLECT_NO: "{{ test_index }}"
{% endif %}
31 changes: 31 additions & 0 deletions lava_test_plans/include/boot_target/boot_target.jinja2
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{## NOTE: PLEASE DON'T ADD BLOCK HERE, AS ONLY THE RENDERED CONTENTS ##}
{## WILL BE RETURNED WHEN INCLUDED, WHICH DOES NOT HAVE THE BLOCK ##}
{## DEFINITION THEN, THE OVERRIDING CALLED AT OTHER PLACES WON'T WORK ##}

{% if kernel_start_message is defined and kernel_start_message %}
parameters:
kernel-start-message: {{ kernel_start_message }}
{% endif %}
{% if lxc_project == true %}
namespace: target
{% endif %}
{% include "include/boot_target/boot_os_prompt.jinja2" %}
{% include "include/boot_target/timeout_and_method.jinja2" %}
{% if FASTBOOT_COMMANDS is defined %}
commands:
{% for fcmd in FASTBOOT_COMMANDS %}
- {{ fcmd }}
{% endfor %}
{% endif %}
{% if lxc_project == true and pre_os_command is defined and pre_os_command == true %}
protocols:
lava-lxc:
- action: auto-login-action
request: pre-os-command
timeout:
minutes: 2
{% endif %}
{% if DOCKER_IMAGE_BOOT is defined %}
docker:
image: {{DOCKER_IMAGE_BOOT}}
{% endif %}
28 changes: 1 addition & 27 deletions lava_test_plans/include/fastboot.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,6 @@ reboot_to_fastboot: {{ reboot_to_fastboot }}

{% block boot_target %}
- boot:
{% if kernel_start_message is defined and kernel_start_message %}
parameters:
kernel-start-message: {{ kernel_start_message }}
{% endif %}
{% if lxc_project == true %}
namespace: target
{% endif %}
{% block boot_commands %}
{% endblock boot_commands %}
{% if auto_login == true %}
Expand All @@ -285,26 +278,7 @@ reboot_to_fastboot: {{ reboot_to_fastboot }}
{% include "include/boot_target/auto_login_commands.jinja2" %}
{% endblock auto_login_commands %}
{% endif %}
{% include "include/boot_target/boot_os_prompt.jinja2" %}
{% include "include/boot_target/timeout_and_method.jinja2" %}
{% if FASTBOOT_COMMANDS is defined %}
commands:
{% for fcmd in FASTBOOT_COMMANDS %}
- {{ fcmd }}
{% endfor %}
{% endif %}
{% if lxc_project == true and pre_os_command is defined and pre_os_command == true %}
protocols:
lava-lxc:
- action: auto-login-action
request: pre-os-command
timeout:
minutes: 2
{% endif %}
{% if DOCKER_IMAGE_BOOT is defined %}
docker:
image: {{DOCKER_IMAGE_BOOT}}
{% endif %}
{% include "include/boot_target/boot_target.jinja2" %}
{% endblock boot_target %}

{% block post_boot_command %}
Expand Down
39 changes: 39 additions & 0 deletions lava_test_plans/testcases/android-boottime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% extends "testcases/master/template-master.jinja2" %}

{% set test_timeout = 210 %}
{% set boottime_timeout = 15 %}
{% set test_name = "boottime" %}

{% block test_target %}

{% with test_timeout=boottime_timeout %}
{% include "include/test_target.jinja2" %}
{% endwith %}

{% with testname="fresh-install", test_operation="COLLECT", test_index="0" %}
{% include "include/android-boottime-definition.jinja2" %}
{% endwith %}
{% with testname="boottime-fresh-install", test_operation="ANALYZE", test_index="0" %}
{% include "include/android-boottime-definition.jinja2" %}
{% endwith %}

{% 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 %}

{% with testname="boottime-" + index|string, test_operation="COLLECT", test_index=index %}
{% include "include/android-boottime-definition.jinja2" %}
{% endwith %}
{% if index == 7 %}
{% with testname="boottime-reboot", test_operation="ANALYZE", test_index=index %}
{% include "include/android-boottime-definition.jinja2" %}
{% endwith %}
{% endif %}
{% endfor %}

{% endblock test_target %}
Loading