Skip to content

Commit f5f7b3e

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 1bfee4d + 670ad8f commit f5f7b3e

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/lit.cfg.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import glob
22
import os
3+
import platform
34
import subprocess
45

56
from lit import formats
@@ -75,6 +76,12 @@ def one_line(s):
7576
.replace('then ;', 'then') \
7677
.replace("' ; '", r"'\\n'") \
7778

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+
7885

7986
config.substitutions.extend([
8087
('%kompile', 'llvm-kompile-testing'),
@@ -169,7 +176,7 @@ def one_line(s):
169176
fi
170177
''')),
171178

172-
('%check-proof-shm-out', one_line('''
179+
('%check-proof-shm-out', exclude_macos(one_line('''
173180
%kore-rich-header %s > %t.header.bin
174181
%kore-proof-trace --shared-memory --verbose --expand-terms %t.header.bin %test-shm-buffer | diff - %test-proof-diff-out &
175182
reader_pid="$!"
@@ -181,7 +188,7 @@ def one_line(s):
181188
echo "kore-proof-trace error while parsing proof hint trace with expanded kore terms and shmem parser"
182189
exit 1
183190
fi
184-
''')),
191+
'''))),
185192

186193
('%check-proof-debug-out', one_line('''
187194
out=%test-dir-out/*.proof.debug.out.diff
@@ -220,7 +227,7 @@ def one_line(s):
220227
done
221228
''')),
222229

223-
('%check-dir-proof-shm-out', one_line('''
230+
('%check-dir-proof-shm-out', exclude_macos(one_line('''
224231
%kore-rich-header %s > %t.header.bin
225232
count=0
226233
for out in %test-dir-out/*.proof.out.diff; do
@@ -238,7 +245,7 @@ def one_line(s):
238245
fi
239246
count=$(expr $count + 1)
240247
done
241-
''')),
248+
'''))),
242249

243250
('%run-binary-out', 'rm -f %t.out.bin && %t.interpreter %test-input -1 %t.out.bin --binary-output'),
244251
('%run-binary', 'rm -f %t.bin && %convert-input && %t.interpreter %t.bin -1 /dev/stdout'),

0 commit comments

Comments
 (0)