@@ -319,8 +319,11 @@ def Main():
319
319
320
320
for mode in options .mode :
321
321
for arch in options .arch :
322
- code = Execute (arch , mode , args , options , suites , workspace )
323
- exit_code = exit_code or code
322
+ try :
323
+ code = Execute (arch , mode , args , options , suites , workspace )
324
+ exit_code = exit_code or code
325
+ except KeyboardInterrupt :
326
+ return 2
324
327
return exit_code
325
328
326
329
@@ -409,17 +412,11 @@ def Execute(arch, mode, args, options, suites, workspace):
409
412
print "No tests to run."
410
413
return 0
411
414
412
- try :
413
- print (">>> Collection phase" )
414
- progress_indicator = progress .PROGRESS_INDICATORS [options .progress ]()
415
- runner = execution .Runner (suites , progress_indicator , ctx )
415
+ print (">>> Collection phase" )
416
+ progress_indicator = progress .PROGRESS_INDICATORS [options .progress ]()
417
+ runner = execution .Runner (suites , progress_indicator , ctx )
416
418
417
- exit_code = runner .Run (options .j )
418
- if runner .terminate :
419
- return exit_code
420
-
421
- except KeyboardInterrupt :
422
- return 1
419
+ exit_code = runner .Run (options .j )
423
420
424
421
print (">>> Analysis phase" )
425
422
num_tests = 0
@@ -462,19 +459,12 @@ def Execute(arch, mode, args, options, suites, workspace):
462
459
print "No tests to run."
463
460
return 0
464
461
465
- try :
466
- print (">>> Deopt fuzzing phase (%d test cases)" % num_tests )
467
- progress_indicator = progress .PROGRESS_INDICATORS [options .progress ]()
468
- runner = execution .Runner (suites , progress_indicator , ctx )
469
-
470
- exit_code = runner .Run (options .j )
471
- if runner .terminate :
472
- return exit_code
462
+ print (">>> Deopt fuzzing phase (%d test cases)" % num_tests )
463
+ progress_indicator = progress .PROGRESS_INDICATORS [options .progress ]()
464
+ runner = execution .Runner (suites , progress_indicator , ctx )
473
465
474
- except KeyboardInterrupt :
475
- return 1
476
-
477
- return exit_code
466
+ code = runner .Run (options .j )
467
+ return exit_code or code
478
468
479
469
480
470
if __name__ == "__main__" :
0 commit comments