mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 11:18:03 +00:00
lf_testmod: Make sure settings are flushed.
Utils: Add option to doCmd to allow waiting for arbitrary text, that way we can ignore intervening 'RSLT' lines when doing batched cmds.
This commit is contained in:
@@ -87,6 +87,11 @@ sub doCmd {
|
||||
my $self = shift;
|
||||
my $cmd = shift;
|
||||
my $nowait = shift;
|
||||
my $waitfor = shift;
|
||||
|
||||
if (!defined($waitfor)) {
|
||||
$waitfor = '/ >>RSLT:(.*)/';
|
||||
}
|
||||
|
||||
#print "CMD[[$cmd]]\n";
|
||||
my $t = ${$self->{telnet}};
|
||||
@@ -99,7 +104,7 @@ sub doCmd {
|
||||
return "";
|
||||
}
|
||||
|
||||
my @rslt = $t->waitfor('/ >>RSLT:(.*)/');
|
||||
my @rslt = $t->waitfor($waitfor);
|
||||
if ( !$self->cli_rcv_silent() ) {
|
||||
print "**************\n@rslt\n................\n\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user