We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdd1218 commit a797483Copy full SHA for a797483
generate_c_header.py
@@ -2,7 +2,8 @@
2
"""
3
import json
4
import os
5
-import subprocess
+import subprocess as sp
6
+from sys import platform
7
8
import ljmmm
9
@@ -49,14 +50,14 @@ def output_reg(file, reg):
49
50
51
def sanity_test():
52
include_dir = os.path.split(OUTPUT_FILE)[0]
- subprocess.check_call([
53
+ sp.run([
54
'gcc',
55
'-o', 'gen_test/test_c_header',
56
SANITY_TEST_FILE,
57
'-I%s' % include_dir
58
])
59
- ret = subprocess.call(['gen_test/test_c_header'])
60
+ ret = sp.run(['gen_test/test_c_header'])
61
if ret != 0:
62
raise Exception("Expected output to be 0, but was: %d" % ret)
63
@@ -86,7 +87,8 @@ def generate():
86
87
88
finish(file)
89
- sanity_test()
90
+ if platform != "win32":
91
+ sanity_test()
92
93
if __name__ == "__main__":
94
generate()
0 commit comments