diff --git a/needles/console/memtest_seven_completed.json b/needles/console/memtest_seven_completed.json new file mode 100644 index 00000000..ef759f91 --- /dev/null +++ b/needles/console/memtest_seven_completed.json @@ -0,0 +1,15 @@ +{ + "area": [ + { + "xpos": 268, + "ypos": 32, + "width": 74, + "height": 16, + "type": "match" + } + ], + "properties": [], + "tags": [ + "memtest_seven_completed" + ] +} \ No newline at end of file diff --git a/needles/console/memtest_seven_completed.png b/needles/console/memtest_seven_completed.png new file mode 100644 index 00000000..c8c4261d Binary files /dev/null and b/needles/console/memtest_seven_completed.png differ diff --git a/needles/console/memtest_ten_percent.json b/needles/console/memtest_ten_percent.json new file mode 100644 index 00000000..e726fe5b --- /dev/null +++ b/needles/console/memtest_ten_percent.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "memtest_ten_percent" + ], + "area": [ + { + "xpos": 269, + "ypos": 16, + "width": 75, + "height": 17, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/console/memtest_ten_percent.png b/needles/console/memtest_ten_percent.png new file mode 100644 index 00000000..a77e9059 Binary files /dev/null and b/needles/console/memtest_ten_percent.png differ diff --git a/needles/console/memtest_twenty_percent.json b/needles/console/memtest_twenty_percent.json new file mode 100644 index 00000000..675dd072 --- /dev/null +++ b/needles/console/memtest_twenty_percent.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "memtest_twenty_percent" + ], + "area": [ + { + "xpos": 269, + "ypos": 16, + "width": 75, + "height": 17, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/console/memtest_twenty_percent.png b/needles/console/memtest_twenty_percent.png new file mode 100644 index 00000000..35acf854 Binary files /dev/null and b/needles/console/memtest_twenty_percent.png differ diff --git a/templates.fif.json b/templates.fif.json index 5774d7c4..744b03f6 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -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, diff --git a/tests/memtest.pm b/tests/memtest.pm new file mode 100644 index 00000000..4be11ad1 --- /dev/null +++ b/tests/memtest.pm @@ -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: