Skip to content

Commit e0d1cd7

Browse files
committed
Fix compilability script
1 parent 476f739 commit e0d1cd7

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/test_scripts/check_compilability.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import subprocess
33

44
# Thats where our cpps are currently
5-
BASE_PATH = "vorkurs/"
6-
5+
BASE_PATH = "files/"
76

87
def 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-
3838
def 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)

0 commit comments

Comments
 (0)