Skip to content

Commit 3346fd0

Browse files
kateinoigakukunrunner
authored andcommitted
[wasm][test] HACK: Disable objc-interop and lldb related tests
1 parent c87857b commit 3346fd0

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
@@ -1809,6 +1809,32 @@ elif run_os == 'wasi':
18091809
config.target_sdk_name = "wasi"
18101810
config.target_runtime = "native"
18111811

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

18141840
config.target_build_swift = ' '.join([

0 commit comments

Comments
 (0)