diff --git a/needles/console/console_initial_setup.json b/needles/console/console_initial_setup.json new file mode 100644 index 00000000..e2d4ccc3 --- /dev/null +++ b/needles/console/console_initial_setup.json @@ -0,0 +1,15 @@ +{ + "properties": [], + "tags": [ + "console_initial_setup" + ], + "area": [ + { + "xpos": 3, + "ypos": 610, + "width": 100, + "height": 12, + "type": "match" + } + ] +} \ No newline at end of file diff --git a/needles/console/console_initial_setup.png b/needles/console/console_initial_setup.png new file mode 100644 index 00000000..86bbbf15 Binary files /dev/null and b/needles/console/console_initial_setup.png differ diff --git a/needles/console/console_initial_setup_done.json b/needles/console/console_initial_setup_done.json new file mode 100644 index 00000000..7abacf29 --- /dev/null +++ b/needles/console/console_initial_setup_done.json @@ -0,0 +1,29 @@ +{ + "area": [ + { + "xpos": 360, + "ypos": 624, + "width": 98, + "height": 14, + "type": "match" + }, + { + "xpos": 361, + "ypos": 658, + "width": 65, + "height": 12, + "type": "match" + }, + { + "xpos": 33, + "ypos": 690, + "width": 65, + "height": 11, + "type": "match" + } + ], + "tags": [ + "console_initial_setup_done" + ], + "properties": [] +} \ No newline at end of file diff --git a/needles/console/console_initial_setup_done.png b/needles/console/console_initial_setup_done.png new file mode 100644 index 00000000..b811994b Binary files /dev/null and b/needles/console/console_initial_setup_done.png differ diff --git a/templates b/templates index 181944f1..d9fc1d3a 100755 --- a/templates +++ b/templates @@ -28,6 +28,17 @@ }, test_suite => { name => "install_default" }, }, + { + machine => { name => "ARM" }, + prio => 60, + product => { + arch => "arm", + distri => "fedora", + flavor => "Minimal-raw_xz-raw.xz", + version => "*", + }, + test_suite => { name => "install_arm_image_deployment_upload" }, + }, { machine => { name => "64bit" }, prio => 10, @@ -787,7 +798,7 @@ }, test_suite => { name => "install_kickstart_firewall_disabled" }, }, -{ + { machine => { name => "64bit" }, prio => 40, product => { @@ -1010,6 +1021,19 @@ { key => "PART_TABLE_TYPE", value => "gpt"} ], }, + { + backend => "qemu", + name => "ARM", + settings => [ + { key => "QEMU", value => "arm" }, + { key => "QEMUCPUS", value => "2"}, + { key => "QEMUMACHINE", value => "virt"}, + { key => "QEMURAM", value => "1024"}, + { key => "QEMU_NO_KVM", value => "1"}, + { key => "TIMEOUT_SCALE", value => "5" }, + { key => "SERIALDEV", value => "ttyAMA0" } + ], + }, ], Products => [ { @@ -1157,6 +1181,15 @@ { key => "DESKTOP", value => "kde" } ], version => "*", + }, + { + arch => "arm", + distri => "fedora", + flavor => "Minimal-raw_xz-raw.xz", + name => "", + settings => [ + ], + version => "*", } ], TestSuites => [ @@ -1173,6 +1206,13 @@ { key => "STORE_HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" }, ], }, + { + name => "install_arm_image_deployment_upload", + settings => [ + { key => "ENTRYPOINT", value => "install_arm_image_deployment" }, + { key => "STORE_HDD_1", value => "disk_%FLAVOR%_%MACHINE%.qcow2" }, + ], + }, { name => "install_package_set_minimal", settings => [ diff --git a/tests/install_arm_image_deployment.pm b/tests/install_arm_image_deployment.pm new file mode 100644 index 00000000..c4363586 --- /dev/null +++ b/tests/install_arm_image_deployment.pm @@ -0,0 +1,73 @@ +use base "installedtest"; +use strict; +use testapi; + +sub run { + my $self = shift; + assert_screen "console_initial_setup", 150; + # IMHO it's better to use sleeps than to have needle for every text screen + wait_still_screen 5; + + # Set timezone + type_string "2\n"; + wait_still_screen 5; + type_string "1\n"; # Europe + wait_still_screen 5; + type_string "37\n"; # Prague + wait_still_screen 7; + + # Set root password + type_string "4\n"; + wait_still_screen 5; + type_string get_var("ROOT_PASSWORD") || "weakpassword"; + send_key "ret"; + wait_still_screen 5; + type_string get_var("ROOT_PASSWORD") || "weakpassword"; + send_key "ret"; + wait_still_screen 7; + + # Create user + type_string "5\n"; + wait_still_screen 5; + type_string "1\n"; # create new + wait_still_screen 5; + type_string "3\n"; # set username + wait_still_screen 5; + type_string get_var("USER_LOGIN", "test"); + send_key "ret"; + wait_still_screen 5; + type_string "4\n"; # use password + wait_still_screen 5; + type_string "5\n"; # set password + wait_still_screen 5; + type_string get_var("USER_PASSWORD", "weakpassword"); + send_key "ret"; + wait_still_screen 5; + type_string get_var("USER_PASSWORD", "weakpassword"); + send_key "ret"; + wait_still_screen 5; + type_string "6\n"; # make him an administrator + wait_still_screen 5; + type_string "c\n"; + wait_still_screen 7; + + assert_screen "console_initial_setup_done", 30; + type_string "c\n"; # continue + assert_screen "text_console_login", 60; + + # Try to log in as an user + $self->console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword")); +} + + +sub test_flags { + # without anything - rollback to 'lastgood' snapshot if failed + # 'fatal' - whole test suite is in danger if this fails + # 'milestone' - after this test succeeds, update 'lastgood' + # 'important' - if this fails, set the overall state to 'fail' + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: