for mode in options.mode:
for arch in options.arch:
- code = Execute(arch, mode, args, options, suites, workspace)
- exit_code = exit_code or code
+ try:
+ code = Execute(arch, mode, args, options, suites, workspace)
+ exit_code = exit_code or code
+ except KeyboardInterrupt:
+ return 2
return exit_code
print "No tests to run."
return 0
- try:
- print(">>> Collection phase")
- progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
- runner = execution.Runner(suites, progress_indicator, ctx)
+ print(">>> Collection phase")
+ progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
+ runner = execution.Runner(suites, progress_indicator, ctx)
- exit_code = runner.Run(options.j)
- if runner.terminate:
- return exit_code
-
- except KeyboardInterrupt:
- return 1
+ exit_code = runner.Run(options.j)
print(">>> Analysis phase")
num_tests = 0
print "No tests to run."
return 0
- try:
- print(">>> Deopt fuzzing phase (%d test cases)" % num_tests)
- progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
- runner = execution.Runner(suites, progress_indicator, ctx)
-
- exit_code = runner.Run(options.j)
- if runner.terminate:
- return exit_code
+ print(">>> Deopt fuzzing phase (%d test cases)" % num_tests)
+ progress_indicator = progress.PROGRESS_INDICATORS[options.progress]()
+ runner = execution.Runner(suites, progress_indicator, ctx)
- except KeyboardInterrupt:
- return 1
-
- return exit_code
+ code = runner.Run(options.j)
+ return exit_code or code
if __name__ == "__main__":