Skip to content

Commit 476f739

Browse files
committed
break file that should be broken and change test conditions
1 parent 1d04113 commit 476f739

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/test_scripts/check_compilability.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ def find_all_cpp_files(findWorking):
1818

1919

2020
def test_single_cpp_file(file_path, shouldCompile):
21-
compile_status = subprocess.getoutput(f"g++ {file_path}")
21+
compile_status = subprocess.getoutput(f"g++ {file_path} -w")
2222

23-
if (compile_status != "" and shouldCompile) or (
24-
compile_status == "" and not shouldCompile
25-
):
23+
if compile_status != "" and shouldCompile:
2624
print("\n" + 20 * "=")
2725
print(f"Error in file {file_path}:\n")
2826
print(compile_status)
2927
print(20 * "=" + "\n")
3028
return False
29+
elif compile_status == "" and not shouldCompile:
30+
print("\n" + 20 * "=")
31+
print(f"File {file_path} compiles, but should be broken")
32+
print("\n" + 20 * "=")
33+
return False
3134

3235
return True
3336

files/noImport_broken.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <iostream>
2-
31
int main() {
42
std::cout << "Hello world" << std::endl;
53

0 commit comments

Comments
 (0)