scripts: Improve gui automation scripts.

This commit is contained in:
Ben Greear
2020-04-15 16:14:59 -07:00
parent ada52b5c53
commit eca5e74ab1
5 changed files with 450 additions and 0 deletions

View File

@@ -86,6 +86,8 @@ sub telnet {
sub doCmd {
my $self = shift;
my $cmd = shift;
my $nowait = shift;
#print "CMD[[$cmd]]\n";
my $t = ${$self->{telnet}};
if ( !$self->cli_send_silent() || (defined $ENV{'LOG_CLI'} && $ENV{'LOG_CLI'} ne "")) {
@@ -93,6 +95,10 @@ sub doCmd {
}
$t->print($cmd);
if (defined($nowait) && ($nowait == 1)) {
return "";
}
my @rslt = $t->waitfor('/ >>RSLT:(.*)/');
if ( !$self->cli_rcv_silent() ) {
print "**************\n@rslt\n................\n\n";