Skip to content

Commit d9b2c3a

Browse files
kateinoigakukunAnka
authored andcommitted
[wasm][test] HACK: Disable objc-interop and lldb related tests
1 parent 29596f1 commit d9b2c3a

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
@@ -1842,6 +1842,32 @@ elif run_os == 'wasi':
18421842
config.target_sdk_name = "wasi"
18431843
config.target_runtime = "native"
18441844

1845+
# Exclude test cases that use objc-interop because clang doesn't support it
1846+
# with WebAssembly binary file yet.
1847+
def use_objc_interop(path):
1848+
try:
1849+
with open(path) as f:
1850+
return '-enable-objc-interop' in f.read()
1851+
except:
1852+
return False
1853+
def lldb_related_test(path):
1854+
try:
1855+
with open(path) as f:
1856+
return 'lldb-moduleimport-test' in f.read()
1857+
except:
1858+
return False
1859+
1860+
def disabled_filenames(path):
1861+
matches = []
1862+
for root, dirnames, filenames in os.walk(path):
1863+
for filename in filenames:
1864+
filepath = os.path.join(root, filename)
1865+
if use_objc_interop(filepath) or lldb_related_test(filepath):
1866+
matches.append(os.path.basename(filepath))
1867+
return matches
1868+
1869+
config.excludes += disabled_filenames(config.test_source_root)
1870+
18451871
config.target_swift_autolink_extract = inferSwiftBinary("swift-autolink-extract")
18461872

18471873
config.target_build_swift = ' '.join([

0 commit comments

Comments
 (0)