1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

Add testcase for Memtest.

This commit is contained in:
Lukáš Růžička 2021-05-24 10:46:30 +02:00 committed by adamwill
parent 20c1f20880
commit b87049217c
8 changed files with 113 additions and 0 deletions

View File

@ -0,0 +1,15 @@
{
"area": [
{
"xpos": 268,
"ypos": 32,
"width": 74,
"height": 16,
"type": "match"
}
],
"properties": [],
"tags": [
"memtest_seven_completed"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"memtest_ten_percent"
],
"area": [
{
"xpos": 269,
"ypos": 16,
"width": 75,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -0,0 +1,15 @@
{
"properties": [],
"tags": [
"memtest_twenty_percent"
],
"area": [
{
"xpos": 269,
"ypos": 16,
"width": 75,
"height": 17,
"type": "match"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1864,6 +1864,14 @@
"TEST_TARGET": "NONE"
}
},
"memtest": {
"profiles": {
"fedora-universal-x86_64-*-64bit": 30
},
"settings": {
"ENTRYPOINT": "memtest"
}
},
"modularity_tests": {
"profiles": {
"fedora-Server-dvd-iso-aarch64-*-aarch64": 30,

60
tests/memtest.pm Normal file
View File

@ -0,0 +1,60 @@
use base "installedtest";
use strict;
use testapi;
use utils;
# This test checks that MEMTEST can be chosen in the ISO's grub menu.
# The we will see, if such memtest start and progresses to certain
# level.
#
sub run {
# Let's navigate through the Grub menu and choose the memtest item.
# We use plenty of sleeps to slower down the process a little bit
# and to make it visible at the video and for some troubleshooting.
# We do not want to use any needles here to navigate the menu.
# Wait for Grub to settle
sleep 5;
# Choose "Troubleshooting"
send_key "down";
sleep 2;
send_key "ret";
sleep 2;
# Start memtest
send_key "down";
sleep 1;
send_key "down";
sleep 1;
send_key "ret";
# Now Memtest should be running.
send_key "f1";
# Assert that the test has reached 10%
assert_screen "memtest_ten_percent", 120;
# And that it has progressed to 20%
assert_screen "memtest_twenty_percent", 120;
#Then try to select a specific test
send_key "c";
sleep 1;
send_key "1";
sleep 1;
send_key "3";
sleep 1;
send_key "7";
sleep 1;
send_key "ret";
sleep 1;
send_key "0";
#Assert that the test has been completed.
assert_screen "memtest_seven_completed", 240;
}
sub test_flags {
return {fatal => 1};
}
1;
# vim: set sw=4 et: