Skip to content

Commit a0aeae7

Browse files
kateinoigakukunrunner
authored andcommitted
[wasm][test] HACK: Disable objc-interop and lldb related tests
1 parent 9d7d80f commit a0aeae7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

test/lit.cfg

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,32 @@ elif run_os == 'wasi':
18081808
config.target_sdk_name = "wasi"
18091809
config.target_runtime = "native"
18101810

1811+
# Exclude test cases that use objc-interop because clang doesn't support it
1812+
# with WebAssembly binary file yet.
1813+
def use_objc_interop(path):
1814+
try:
1815+
with open(path) as f:
1816+
return '-enable-objc-interop' in f.read()
1817+
except:
1818+
return False
1819+
def lldb_related_test(path):
1820+
try:
1821+
with open(path) as f:
1822+
return 'lldb-moduleimport-test' in f.read()
1823+
except:
1824+
return False
1825+
1826+
def disabled_filenames(path):
1827+
matches = []
1828+
for root, dirnames, filenames in os.walk(path):
1829+
for filename in filenames:
1830+
filepath = os.path.join(root, filename)
1831+
if use_objc_interop(filepath) or lldb_related_test(filepath):
1832+
matches.append(os.path.basename(filepath))
1833+
return matches
1834+
1835+
config.excludes += disabled_filenames(config.test_source_root)
1836+
18111837
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")
18121838

18131839
config.target_build_swift = ' '.join([

0 commit comments

Comments
 (0)