Skip to content

Commit e29824d

Browse files
[WASM] Fix reading non-utf8 file contents
1 parent 05c8232 commit e29824d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/lit.cfg

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,11 +1391,17 @@ elif run_os == 'wasi':
13911391
# Exclude test cases that use objc-interop because clang doesn't support it
13921392
# with WebAssembly binary file yet.
13931393
def use_objc_interop(path):
1394-
with open(path) as f:
1395-
return '-enable-objc-interop' in f.read()
1394+
try:
1395+
with open(path) as f:
1396+
return '-enable-objc-interop' in f.read()
1397+
except:
1398+
return False
13961399
def lldb_related_test(path):
1397-
with open(path) as f:
1398-
return 'lldb-moduleimport-test' in f.read()
1400+
try:
1401+
with open(path) as f:
1402+
return 'lldb-moduleimport-test' in f.read()
1403+
except:
1404+
return False
13991405

14001406
def disabled_filenames(path):
14011407
matches = []

0 commit comments

Comments
 (0)