From e8802935f9e523461a5575b195f8d95030732420 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 26 Nov 2019 08:26:27 -0800 Subject: [PATCH] Tweak text_console_login match area On Rawhide Cloud_Base boots, there's some SSH key and network information printed above the 'login:' prompt, so we can't expect empty space there. Also tweak console_login() to clear the screen after logging in, so the login prompt is cleared and doesn't confuse things on subsequent runs (like it did first time we tried this). And add a new user logged in needle, as it seems after we clear the screen the tilde appears in a slightly different position and the existing needle doesn't match. https://openqa.fedoraproject.org/tests/489003#step/_console_wait_login/7 Signed-off-by: Adam Williamson --- lib/utils.pm | 6 ++++++ needles/console/text_console_login.json | 8 ++++---- .../user_logged_in-hightilde-20191127.json | 16 ++++++++++++++++ .../user_logged_in-hightilde-20191127.png | Bin 0 -> 483 bytes 4 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 needles/console/user_logged_in-hightilde-20191127.json create mode 100644 needles/console/user_logged_in-hightilde-20191127.png diff --git a/lib/utils.pm b/lib/utils.pm index c7f8eda6..1e4c5c42 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -237,6 +237,9 @@ sub console_login { assert_screen [$good, 'console_password_required'], 30; # on a live image, just the user name will be enough if (match_has_tag $good) { + # clear the screen (so the remaining login prompt text doesn't + # confuse subsequent runs of this) + type_string "clear\n"; _console_login_finish(); return; } @@ -262,6 +265,9 @@ sub console_login { $timeout = 90 if (get_var("ARCH") eq "aarch64"); assert_screen($good, $timeout); } + # clear the screen (so the remaining login prompt text doesn't + # confuse subsequent runs of this) + type_string "clear\n"; } _console_login_finish(); } diff --git a/needles/console/text_console_login.json b/needles/console/text_console_login.json index 8510f26d..cc2b9908 100644 --- a/needles/console/text_console_login.json +++ b/needles/console/text_console_login.json @@ -1,11 +1,11 @@ { "area": [ { - "height": 30, + "height": 15, "type": "match", - "width": 56, + "width": 61, "xpos": 72, - "ypos": 49 + "ypos": 64 } ], "properties": [], @@ -15,4 +15,4 @@ "ENV-DISTRI-fedora", "ENV-FLAVOR-develop" ] -} +} \ No newline at end of file diff --git a/needles/console/user_logged_in-hightilde-20191127.json b/needles/console/user_logged_in-hightilde-20191127.json new file mode 100644 index 00000000..160b3e75 --- /dev/null +++ b/needles/console/user_logged_in-hightilde-20191127.json @@ -0,0 +1,16 @@ +{ + "area": [ + { + "height": 14, + "xpos": 246, + "ypos": 0, + "width": 27, + "type": "match" + } + ], + "properties": [], + "tags": [ + "user_logged_in", + "user_console" + ] +} \ No newline at end of file diff --git a/needles/console/user_logged_in-hightilde-20191127.png b/needles/console/user_logged_in-hightilde-20191127.png new file mode 100644 index 0000000000000000000000000000000000000000..f58a5109e332204ab70c3c460292d5309ac071d0 GIT binary patch literal 483 zcmeAS@N?(olHy`uVBq!ia0y~yU;#3j85o&?R6|L-ACO`T@Ck7R(yLaj5>Bpv!@$5e z!_&nvq~g}wtLyV_2S^-yD9$R$!xpleZSg4uabb}Z8CDtIce@rf@=Hp)hF%Of_`u;Q zuS%A=$&-*-^VnrR$a+6l{~7;D|8~ua$FCT7tNfgjGk@|H8+FO3b%z%|-IT4({^k18 z-0z-Rzg3d&mL2ojwafp&*B7^U?RF*5T`#R~?6N|0iX1$v9 zZco{PkkU7=Gp+S3xAbgHxtBU?)vq(Rmqh=Sobl}Gh3l8U8R)l1`I+i}PMf(b^}c@b z{F2#Una};scHo;De0HVpvX?erR{s6Vq_@4{qwa#&!Oxfc-c@xV==X7}`%HX~=WI0c z4ekG4$y=VAV=uRFOYG_`)80F$W@H|}CTFB`@|FCe63?Q&7k}?>FaIT8@}7MkyH7dK zk2xy#lU3~RwJo<_|6?luw}*_tK%^Zw@c*qj&!!gR6Hd2eLAH3h`njxgN@xNADZ;i< literal 0 HcmV?d00001