1
1
import glob
2
2
import os
3
+ import platform
3
4
import subprocess
4
5
5
6
from lit import formats
@@ -75,6 +76,12 @@ def one_line(s):
75
76
.replace ('then ;' , 'then' ) \
76
77
.replace ("' ; '" , r"'\\n'" ) \
77
78
79
+ # We want to be able to disable some checks on macOS, this function allows us to
80
+ # do that by checking the OS and replacing the input with just `exit 0` in case
81
+ # of macOS.
82
+ def exclude_macos (s ):
83
+ return 'exit 0' if platform .system () == 'Darwin' else s
84
+
78
85
79
86
config .substitutions .extend ([
80
87
('%kompile' , 'llvm-kompile-testing' ),
@@ -169,7 +176,7 @@ def one_line(s):
169
176
fi
170
177
''' )),
171
178
172
- ('%check-proof-shm-out' , one_line ('''
179
+ ('%check-proof-shm-out' , exclude_macos ( one_line ('''
173
180
%kore-rich-header %s > %t.header.bin
174
181
%kore-proof-trace --shared-memory --verbose --expand-terms %t.header.bin %test-shm-buffer | diff - %test-proof-diff-out &
175
182
reader_pid="$!"
@@ -181,7 +188,7 @@ def one_line(s):
181
188
echo "kore-proof-trace error while parsing proof hint trace with expanded kore terms and shmem parser"
182
189
exit 1
183
190
fi
184
- ''' )),
191
+ ''' ))) ,
185
192
186
193
('%check-proof-debug-out' , one_line ('''
187
194
out=%test-dir-out/*.proof.debug.out.diff
@@ -220,7 +227,7 @@ def one_line(s):
220
227
done
221
228
''' )),
222
229
223
- ('%check-dir-proof-shm-out' , one_line ('''
230
+ ('%check-dir-proof-shm-out' , exclude_macos ( one_line ('''
224
231
%kore-rich-header %s > %t.header.bin
225
232
count=0
226
233
for out in %test-dir-out/*.proof.out.diff; do
@@ -238,7 +245,7 @@ def one_line(s):
238
245
fi
239
246
count=$(expr $count + 1)
240
247
done
241
- ''' )),
248
+ ''' ))) ,
242
249
243
250
('%run-binary-out' , 'rm -f %t.out.bin && %t.interpreter %test-input -1 %t.out.bin --binary-output' ),
244
251
('%run-binary' , 'rm -f %t.bin && %convert-input && %t.interpreter %t.bin -1 /dev/stdout' ),
0 commit comments