File tree 1 file changed +7
-12
lines changed
suite/auto-sync/src/autosync
1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ def get_changed_files(base_ref: str, cmp_ref: str) -> list[dict]:
26
26
capture_output = True ,
27
27
)
28
28
if result .stderr :
29
- log .fatal (f"git diff failed with: { result .stderr } " )
30
- exit (1 )
29
+ fail_exit (f"git diff failed with: { result .stderr } " )
31
30
32
31
if not result .stdout :
33
32
# Nothing changed
@@ -51,9 +50,7 @@ def compare_files(changed_files: list[dict]) -> bool:
51
50
in_capstone = (
52
51
get_path ("{CS_ARCH_MODULE_DIR}" ).joinpath (f ["arch" ]).joinpath (f ["filename" ])
53
52
)
54
- generated = (
55
- get_path ("{C_INC_OUT_DIR}" ).joinpath (f ["arch" ]).joinpath (f ["filename" ])
56
- )
53
+ generated = get_path ("{C_INC_OUT_DIR}" ).joinpath (f ["filename" ])
57
54
if not in_capstone .exists ():
58
55
log .error (f"{ in_capstone } does not exist." )
59
56
success = False
@@ -99,13 +96,11 @@ def main():
99
96
force = True ,
100
97
)
101
98
changed_files = get_changed_files (args .base_ref , args .cmp_ref )
102
- print (changed_files )
103
- if not compare_files (changed_files ):
104
- log .error ("Some files were not correctly generated." )
105
- exit (1 )
106
- log .error ("Files were correctly generated." )
107
- log .error ("\n \n If you did not change anything: please notify us.\n \n " )
108
- exit (0 )
99
+ if compare_files (changed_files ):
100
+ log .info ("Files were correctly generated." )
101
+ exit (0 )
102
+ log .error ("If you did not change anything: please notify us." )
103
+ fail_exit ("Some files were not correctly generated." )
109
104
110
105
111
106
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments