[ONOS-6619] Allow different bash prompts in TestON components, Also including part of ONOS-6595
Change-Id: I31c923347dd8fac018aaf47868394552a2deefbc
diff --git a/TestON/drivers/common/cli/emulator/scapyclidriver.py b/TestON/drivers/common/cli/emulator/scapyclidriver.py
index f1457ea..f61536c 100644
--- a/TestON/drivers/common/cli/emulator/scapyclidriver.py
+++ b/TestON/drivers/common/cli/emulator/scapyclidriver.py
@@ -38,7 +38,7 @@
ScapyCliDriver is the basic driver which will handle
the Scapy functions"""
def __init__( self ):
- super( Emulator, self ).__init__()
+ super( ScapyCliDriver, self ).__init__()
self.handle = self
self.name = None
self.home = None
@@ -147,7 +147,7 @@
try:
self.handle.sendline( "" )
i = self.handle.expect( [ '>>>',
- '\$',
+ self.prompt,
pexpect.EOF,
pexpect.TIMEOUT ],
timeout )
@@ -171,7 +171,7 @@
if fileName:
self.handle.sendline( "" )
- self.handle.expect( '\$' )
+ self.handle.expect( self.prompt )
self.handle.sendline(
"sudo kill -9 \`ps -ef | grep \"" +
fileName +