File tree Expand file tree Collapse file tree
.github/workflows/test_scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import subprocess
33
44# Thats where our cpps are currently
5- BASE_PATH = "vorkurs/"
6-
5+ BASE_PATH = "files/"
76
87def find_all_cpp_files (findWorking ):
98 vorkurs_path = pathlib .Path (BASE_PATH )
@@ -25,16 +24,17 @@ def test_single_cpp_file(file_path, shouldCompile):
2524 print (f"Error in file { file_path } :\n " )
2625 print (compile_status )
2726 print (20 * "=" + "\n " )
27+
2828 return False
2929 elif compile_status == "" and not shouldCompile :
3030 print ("\n " + 20 * "=" )
3131 print (f"File { file_path } compiles, but should be broken" )
3232 print ("\n " + 20 * "=" )
33+
3334 return False
3435
3536 return True
3637
37-
3838def main ():
3939 error_count_working = 0
4040 error_count_broken = 0
@@ -53,12 +53,13 @@ def main():
5353 print (
5454 f"::error::Found { error_count_working } non compiling files which should compile"
5555 )
56- exit (1 )
57-
56+
5857 if error_count_broken > 0 :
5958 print (
60- f"::error:Found { error_count_broken } files that should be broken but compile"
59+ f"::error:: Found { error_count_broken } files that should be broken but compile"
6160 )
61+
62+ if error_count_broken > 0 or error_count_working > 0 :
6263 exit (1 )
6364
6465 exit (0 )
You can’t perform that action at this time.
0 commit comments