diff mbox series

[isar-cip-core,v1,2/5] tests/templates: Add template files required to generate M-COM job defintions

Message ID 20250207150439.392479-3-Sai.Sathujoda@toshiba-tsip.com (mailing list archive)
State Accepted
Headers show
Series Automate CIP Core testing on M-COM x86 in LAVA | expand

Commit Message

Sai.Sathujoda@toshiba-tsip.com Feb. 7, 2025, 3:04 p.m. UTC
From: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>

Signed-off-by: sai ashrith sathujoda <sai.sathujoda@toshiba-tsip.com>
---
 tests/templates/M-COM-x86.yml                 | 52 +++++++++++++++++++
 .../templates/swupdate-test-action-M-COM.yml  | 18 +++++++
 2 files changed, 70 insertions(+)
 create mode 100644 tests/templates/M-COM-x86.yml
 create mode 100644 tests/templates/swupdate-test-action-M-COM.yml
diff mbox series

Patch

diff --git a/tests/templates/M-COM-x86.yml b/tests/templates/M-COM-x86.yml
new file mode 100644
index 0000000..4716225
--- /dev/null
+++ b/tests/templates/M-COM-x86.yml
@@ -0,0 +1,52 @@ 
+# Copyright (c) 2025, Siemens AG, Quirin Gylstorff <quirin.gylstorff@siemens.com>
+# SPDX-License-Identifier:      AGPL-3.0
+# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+job_name: mtda-mcom-#test_function#
+device_type: mcom-mtda
+timeouts:
+  job:
+    minutes: 180
+  action:
+    minutes: 95
+  connection:
+    minutes: 25
+priority: medium
+visibility: public
+context:
+  lava_test_results_dir: /home/lava/%s
+notify:
+  criteria:
+    status: finished
+  recipients:
+  - to:
+     method: email
+     email: cip-testing-results@lists.cip-project.org
+
+# ACTION_BLOCK
+actions:
+- deploy:
+    timeout:
+      minutes: 60
+    to: flasher
+    images:
+      image:
+        url: #project_url#/#branch#/x86-uefi/cip-core-image-security-cip-core-#distribution#-x86-uefi.wic.xz
+
+# BOOT BLOCK
+- boot:
+    method: minimal
+    timeout:
+      minutes: 30
+    reset: true
+    failure_retry: 1
+    prompts: ["root@demo:~#"]
+    auto_login:
+      login_prompt: "demo login:"
+      username: "root"
+      password_prompt: "Password:"
+      password: "CIPsecurity@123"
+    transfer_overlay:
+      transfer_method: http
+      download_command: "curl -H 'Connection: close' -v --trace-time --output overlay-1.1.1.4.tar.gz"
+      unpack_command: rm -rf /home/lava; mkdir /home/lava; tar -C /home/lava/ -xf
diff --git a/tests/templates/swupdate-test-action-M-COM.yml b/tests/templates/swupdate-test-action-M-COM.yml
new file mode 100644
index 0000000..02b0b03
--- /dev/null
+++ b/tests/templates/swupdate-test-action-M-COM.yml
@@ -0,0 +1,18 @@ 
+# TEST BLOCK 1
+# Fail the job if software update application failed
+- test:
+    timeout:
+      minutes: 15
+    definitions:
+    - repository:
+        metadata:
+          format: Lava-Test Test Definition 1.0
+          name: sample-test
+          description: "Test software update"
+        run:
+          steps:
+            - curl -v --trace-time http://$LAVA_DISPATCHER_IP/tmp/$LAVA_JOB_ID/downloads/common/cip-core-image-security-cip-core-bookworm-x86-uefi.swu --output test.swu
+            - if swupdate -i test.swu; then echo software update is successful!!; else lava-test-raise "Fail job"; fi
+      from: inline
+      name: sample-test-1
+      path: inline/sample-test.yaml