def parse_args():
parser = OptionParser()
parser.add_option('--detailed_output', nargs=1,
help='specify path where detailed logs can be found')
parser.add_option('--monitored_output', nargs=1,
help='specify path where monitored logs can be found')
parser.add_option('--test_suite', nargs=1, choices=['availability.service_tests', ],
help='specify the test suite (python module) that you wish to execute')
(options, args) = parser.parse_args()
if not options.test_suite: # Python 2.6 strikes again! Use argparse after Python upgrade
parser.error('test_suite not given')
if not options.monitored_output:
parser.error('monitored_output not given')
if not options.detailed_output:
parser.error('detailed_output not given')
return options
评论列表
文章目录