Add option to set pexpect timeout
This commit is contained in:
+5
-1
@@ -828,7 +828,7 @@ def testString():
|
|||||||
|
|
||||||
def parseArgs():
|
def parseArgs():
|
||||||
"Parse command line arguments and run"
|
"Parse command line arguments and run"
|
||||||
global LogToConsole, NoKVM, Branch, Zip
|
global LogToConsole, NoKVM, Branch, Zip, TIMEOUT
|
||||||
parser = argparse.ArgumentParser( description='Mininet VM build script',
|
parser = argparse.ArgumentParser( description='Mininet VM build script',
|
||||||
epilog=buildFlavorString() + ' ' +
|
epilog=buildFlavorString() + ' ' +
|
||||||
testString() )
|
testString() )
|
||||||
@@ -852,6 +852,8 @@ def parseArgs():
|
|||||||
parser.add_argument( '-t', '--test', metavar='test', default=[],
|
parser.add_argument( '-t', '--test', metavar='test', default=[],
|
||||||
action='append',
|
action='append',
|
||||||
help='specify a test to run' )
|
help='specify a test to run' )
|
||||||
|
parser.add_argument( '-w', '--timeout', metavar='timeout', type=int,
|
||||||
|
default=0, help='set expect timeout' )
|
||||||
parser.add_argument( '-r', '--run', metavar='cmd', default='',
|
parser.add_argument( '-r', '--run', metavar='cmd', default='',
|
||||||
help='specify a command line to run before tests' )
|
help='specify a command line to run before tests' )
|
||||||
parser.add_argument( '-p', '--post', metavar='cmd', default='',
|
parser.add_argument( '-p', '--post', metavar='cmd', default='',
|
||||||
@@ -878,6 +880,8 @@ def parseArgs():
|
|||||||
Branch = args.branch
|
Branch = args.branch
|
||||||
if args.zip:
|
if args.zip:
|
||||||
Zip = True
|
Zip = True
|
||||||
|
if args.timeout:
|
||||||
|
TIMEOUT = args.timeout
|
||||||
if not args.test and not args.run and not args.post:
|
if not args.test and not args.run and not args.post:
|
||||||
args.test = [ 'sanity', 'core' ]
|
args.test = [ 'sanity', 'core' ]
|
||||||
for flavor in args.flavor:
|
for flavor in args.flavor:
|
||||||
|
|||||||
Reference in New Issue
Block a user