From 684f4d982db6a163b1c6e7a3f481f6ff9776dbe2 Mon Sep 17 00:00:00 2001
From: Luis Araujo <luis.araujo@collabora.co.uk>
Date: Wed, 11 Dec 2019 17:20:26 +0800
Subject: [PATCH] Change matched prompts in LAVA job templates

This commit changes the prompt that LAVA needs to match in the images
during tests execution.

For SDK images the 'user@apertis:' prompt is the initial prompt after
login and 'root@apertis:' is used after becoming root.

And for the rest of the images '\$ ' is the initial prompt after login,
the '/home/user #' is used right after becoming root, and '/tmp #' is
used during test execution.

Signed-off-by: Luis Araujo <luis.araujo@collabora.co.uk>
---
 templates/common-boot-tpl-reboot.yaml      | 6 ++----
 templates/common-boot-tpl.yaml             | 4 ++--
 templates/common-minnowboard-boot-tpl.yaml | 4 ++--
 templates/common-qemu-boot-tpl.yaml        | 3 +--
 4 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/templates/common-boot-tpl-reboot.yaml b/templates/common-boot-tpl-reboot.yaml
index ff4c2d1a..3f0db6e5 100644
--- a/templates/common-boot-tpl-reboot.yaml
+++ b/templates/common-boot-tpl-reboot.yaml
@@ -17,8 +17,6 @@
         login_commands:
           - sudo su
       prompts:
-        - 'user@apertis:'
         - '\$ '
-        - ' # '
-
-
+        - '/home/user #'
+        - '/tmp #'
diff --git a/templates/common-boot-tpl.yaml b/templates/common-boot-tpl.yaml
index db369a2e..7a876ce3 100644
--- a/templates/common-boot-tpl.yaml
+++ b/templates/common-boot-tpl.yaml
@@ -118,9 +118,9 @@ actions:
         login_commands:
           - sudo su
       prompts:
-        - 'user@apertis:'
         - '\$ '
-        - ' # '
+        - '/home/user #'
+        - '/tmp #'
 
   - test:
       timeout:
diff --git a/templates/common-minnowboard-boot-tpl.yaml b/templates/common-minnowboard-boot-tpl.yaml
index 203cb928..a053a39d 100644
--- a/templates/common-minnowboard-boot-tpl.yaml
+++ b/templates/common-minnowboard-boot-tpl.yaml
@@ -119,9 +119,9 @@ actions:
         login_commands:
           - sudo su
       prompts:
-        - 'user@apertis:'
         - '\$ '
-        - ' # '
+        - '/home/user #'
+        - '/tmp #'
 
   - test:
       timeout:
diff --git a/templates/common-qemu-boot-tpl.yaml b/templates/common-qemu-boot-tpl.yaml
index 86a3c743..8cf33242 100644
--- a/templates/common-qemu-boot-tpl.yaml
+++ b/templates/common-qemu-boot-tpl.yaml
@@ -67,8 +67,7 @@ actions:
           - sudo su
       prompts:
         - 'user@apertis:'
-        - '\$ '
-        - ' # '
+        - 'root@apertis:'
 
   - test:
       timeout:
-- 
GitLab