Skip to content

Commit e295aff

Browse files
kateinoigakukunrunner
authored andcommitted
[wasm][test] HACK: Disable objc-interop and lldb related tests
1 parent 82d4da2 commit e295aff

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
@@ -1822,6 +1822,32 @@ elif run_os == 'wasi':
18221822
config.target_sdk_name = "wasi"
18231823
config.target_runtime = "native"
18241824

1825+
# Exclude test cases that use objc-interop because clang doesn't support it
1826+
# with WebAssembly binary file yet.
1827+
def use_objc_interop(path):
1828+
try:
1829+
with open(path) as f:
1830+
return '-enable-objc-interop' in f.read()
1831+
except:
1832+
return False
1833+
def lldb_related_test(path):
1834+
try:
1835+
with open(path) as f:
1836+
return 'lldb-moduleimport-test' in f.read()
1837+
except:
1838+
return False
1839+
1840+
def disabled_filenames(path):
1841+
matches = []
1842+
for root, dirnames, filenames in os.walk(path):
1843+
for filename in filenames:
1844+
filepath = os.path.join(root, filename)
1845+
if use_objc_interop(filepath) or lldb_related_test(filepath):
1846+
matches.append(os.path.basename(filepath))
1847+
return matches
1848+
1849+
config.excludes += disabled_filenames(config.test_source_root)
1850+
18251851
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")
18261852

18271853
config.target_build_swift = ' '.join([

0 commit comments

Comments
 (0)