-
Notifications
You must be signed in to change notification settings - Fork 356
Description
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:
- copy them over in build.ps1 with: swiftlang/swift@3e883fd
- print a warning in the llvm-lit test driver if they are missing with: e2e6a05
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.