diff --git a/lldb/test/Shell/SwiftREPL/lit.local.cfg b/lldb/test/Shell/SwiftREPL/lit.local.cfg index 29d485ea63774..539418112b925 100644 --- a/lldb/test/Shell/SwiftREPL/lit.local.cfg +++ b/lldb/test/Shell/SwiftREPL/lit.local.cfg @@ -2,3 +2,14 @@ config.suffixes = ['.test'] if 'lldb-repro' in config.available_features: config.unsupported = True + +def check_exists(path): + import os + if not os.path.isfile(path): + lit_config.warning(f"Runtime dependency not found: {path}") + +# Check runtime dependencies for SwiftREPL tests on Windows +if sys.platform == "win32": + host_arch = config.host_triple.split("-")[0] + check_exists(f"{config.swift_libs_dir}/windows/{host_arch}/swiftrt.obj") + check_exists(f"{config.llvm_shlib_dir}/swiftCore.dll") diff --git a/lldb/test/Shell/lit.site.cfg.py.in b/lldb/test/Shell/lit.site.cfg.py.in index 5e4e2676219f3..d0b8a6be6f9cd 100644 --- a/lldb/test/Shell/lit.site.cfg.py.in +++ b/lldb/test/Shell/lit.site.cfg.py.in @@ -17,6 +17,7 @@ config.cmake_sysroot = lit_config.substitute("@CMAKE_SYSROOT@") config.target_triple = "@LLVM_TARGET_TRIPLE@" config.python_executable = "@Python3_EXECUTABLE@" config.swiftc = "@LLDB_SWIFTC@" +config.swift_libs_dir = '@LLDB_SWIFT_LIBS@' config.lldb_enable_swift = @LLDB_ENABLE_SWIFT_SUPPORT@ config.have_zlib = @LLVM_ENABLE_ZLIB@ config.objc_gnustep_dir = "@LLDB_TEST_OBJC_GNUSTEP_DIR@"