Commit c9f02d94 authored by Harald Sitter's avatar Harald Sitter

reduce the wait time for sudo a bit and stop waiting

this takes screenshots as quickly as it can to decrease time between
state change and matching making everything faster if a prompt appears.
at the same time we'll reduce the overall time the prompt has to appear
from 3 to 2 seconds to make the no-prompt scenario faster as well.

ultimately this is a bit sucky because of the fact that we cannot really
tell the two states apart, so we end up waiting when no prompt is going
to appear anyway, or we wait not long enough when a prompt needs to appear.

it may be worth considering to switch the qa images to not cache sudo at all
that we we always know a prompt must appear. then again always having
to wait for the prompt and entering password may end up slower with
many sudo calls. all very meh
parent 6eef8215
......@@ -108,7 +108,7 @@ sub script_sudo($$) {
}
testapi::type_string "sudo $prog\n";
if ($need_auth) {
if (testapi::check_screen "sudo-passwordprompt", 3) {
if (testapi::check_screen "sudo-passwordprompt", 2, no_wait => 1) {
testapi::type_password;
testapi::send_key "ret";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment