elif blocking: # blocked output mode (stdout blocked until test finishes, then result is returned) import ui.blocking as pylot_blocking try: pylot_blocking.main(agents, rampup, interval, duration, tc_xml_filename, log_msgs, output_dir, test_name) except KeyboardInterrupt: print '\nInterrupt' sys.exit(1) else: # console/shell mode import ui.console as pylot_console print '\n-------------------------------------------------' print 'Test parameters:' print ' number of agents: %s' % agents print ' test duration in seconds: %s' % duration print ' rampup in seconds: %s' % rampup print ' interval in milliseconds: %s' % interval print ' test case xml: %s' % tc_xml_filename print ' log messages: %s' % log_msgs if test_name: print ' test name: %s' % test_name if output_dir: print ' output directory: %s' % output_dir print '\n' try: pylot_console.main(agents, rampup, interval, duration, tc_xml_filename, log_msgs, output_dir, test_name) except KeyboardInterrupt: print '\nInterrupt' sys.exit(1)
import ui.blocking as pylot_blocking try: pylot_blocking.main(agents, rampup, interval, duration, tc_xml_filename, log_msgs, output_dir, test_name) except KeyboardInterrupt: print '\nInterrupt' sys.exit(1) else: # console/shell mode import ui.console as pylot_console print '\n-------------------------------------------------' print 'Test parameters:' print ' number of agents: %s' % agents print ' test duration in seconds: %s' % duration print ' rampup in seconds: %s' % rampup print ' interval in milliseconds: %s' % interval print ' test case xml: %s' % tc_xml_filename print ' log messages: %s' % log_msgs if test_name: print ' test name: %s' % test_name if output_dir: print ' output directory: %s' % output_dir print '\n' try: pylot_console.main(agents, rampup, interval, duration, tc_xml_filename, log_msgs, output_dir, test_name,is_block=False) except KeyboardInterrupt: print '\nInterrupt' sys.exit(1)