21
21
if __name__ == "__main__" :
22
22
sys .path .append (os .path .dirname (os .path .realpath (__file__ )))
23
23
24
- from util import AutotestException
24
+ from util import AutotestException , TestSpecificationError
25
25
from command_line_arguments import process_arguments
26
26
from copy_files_to_temp_directory import copy_files_to_temp_directory
27
27
from run_tests import run_tests , generate_expected_output
@@ -37,19 +37,25 @@ def main():
37
37
signal .signal (signal .SIGINT , lambda signum , frame : os ._exit (2 ))
38
38
try :
39
39
sys .exit (run_autotest ())
40
+ except TestSpecificationError as e :
41
+ print (f"{ my_name } : { e } " , file = sys .stderr )
42
+ if debug :
43
+ traceback .print_exc (file = sys .stderr )
44
+ print ("\n " + REPO_INFORMATION )
45
+ sys .exit (2 )
40
46
except AutotestException as e :
41
47
print (f"{ my_name } : { e } " , file = sys .stderr )
42
48
if debug :
43
49
traceback .print_exc (file = sys .stderr )
44
- print (REPO_INFORMATION )
50
+ # print('\n' + REPO_INFORMATION)
45
51
sys .exit (2 )
46
52
except Exception :
47
53
etype , evalue , _etraceback = sys .exc_info ()
48
54
eformatted = "\n " .join (traceback .format_exception_only (etype , evalue ))
49
55
print (f"{ my_name } : internal error: { eformatted } " , file = sys .stderr )
50
56
if debug :
51
57
traceback .print_exc (file = sys .stderr )
52
- print (REPO_INFORMATION )
58
+ print (" \n " + REPO_INFORMATION )
53
59
sys .exit (2 )
54
60
55
61
0 commit comments