Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftREPL tests fail on Windows due to runtime dependencies issue #9539

Open
weliveindetail opened this issue Nov 7, 2024 · 0 comments
Open

Comments

@weliveindetail
Copy link

weliveindetail commented Nov 7, 2024

When running tests for LLDB in CI, the ones for SwiftREPL fail with an error like this:

$ "t:\5\bin\lldb.exe" "--no-lldbinit" "-S" "T:/5/tools/lldb\test\Shell\lit-lldb-init-quiet" "--repl"
error: failed to stop process at REPL breakpoint

This means that the dummy executable repl_swift.exe didn't reach its main loop, which happens if it lacks runtime dependencies. repl_swift.exe loads the two external binaries at startup: swiftCore.dll and swiftrt.obj.

These binaries are produced in the Swift runtime build step. They don't exist yet, when repl_swift.exe is built, but only at the time when the LLDB build directory is reconfigured for testing. We started to:

Furthermore, LLDB issues a manual lookup for the SDKROOT environment variable in lldb/source/Host/windows/HostInfoWindowsSwift.cpp when running in repl mode. If it fails, then we get the following error from SwiftASTContext::CreateInstance():

Cannot create Swift scratch context (couldn't load the Swift stdlib)

We started to forward SDKROOT from the system's environment to LLDB Shell tests with 42e7e20

With these preparations in place, the following tests are expected to pass:

lldb-shell :: SwiftREPL/Basic.test
lldb-shell :: SwiftREPL/Class.test
lldb-shell :: SwiftREPL/ComputedProperties.test
lldb-shell :: SwiftREPL/Deadlock.test
lldb-shell :: SwiftREPL/DiagnosticOptions.test
lldb-shell :: SwiftREPL/Dict.test
lldb-shell :: SwiftREPL/ErrorReturn.test
lldb-shell :: SwiftREPL/ExclusivityREPL.test
lldb-shell :: SwiftREPL/GenericTypealias.test
lldb-shell :: SwiftREPL/Generics.test
lldb-shell :: SwiftREPL/ImportError.test
lldb-shell :: SwiftREPL/MetatypeRepl.test
lldb-shell :: SwiftREPL/Optional.test
lldb-shell :: SwiftREPL/PropertyWrapperTopLevel.test
lldb-shell :: SwiftREPL/RecursiveClass.test
lldb-shell :: SwiftREPL/Redefinition.test
lldb-shell :: SwiftREPL/RedirectInput.test
lldb-shell :: SwiftREPL/RedirectInputNoSuchFile.test
lldb-shell :: SwiftREPL/SimpleExpressions.test
lldb-shell :: SwiftREPL/Struct.test
lldb-shell :: SwiftREPL/Subclassing.test
lldb-shell :: SwiftREPL/SwiftTypeLookup.test
lldb-shell :: SwiftREPL/SyntaxError.test
lldb-shell :: SwiftREPL/UninitVariables.test
lldb-shell :: SwiftREPL/ZeroSizeStruct.test
lldb-shell :: SwiftREPL/enum-singlecase.test
lldb-shell :: SwiftREPL/one-char-string.test

As of today, this works locally on a development machine, but not when running tests in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant