Building SourceKitLSPPackageTests with cross-compilation enabled fails with
```
error: Could not find target named 'mypackagePackageTests_586B622B321A3B86_PackageProduct'
error: fatalError
```
For testing, we work around this by disabling cross-compilation. This is not possible for building, so we need to explicitly build all products.
When we build SourceKit-LSP in a unified SwiftPM workspace, a simple `swift build` invocation will build all products in the unified workspace (not just SourceKit-LSP products).
Currently, when building an open source toolchain, SourceKit-LSP is only built for x86_64. Copy the necessary cross-compilation parts from SwiftPM’s build script to also produce a fat sourcekit-lsp executable for both x86_64 and arm64.
rdar://78039145
Running tests in parallel causes nondeterministic failures on Linux (rdar://92260631). Disable parallel testing on all platforms except Darwin until that issue has been fixed.
Add new flags '--cross-compile-host' and '--cross-compile-config' and use them to
cross-compile, gated only for Android for now. Add a '--prefix' flag to install
to a cross-compiled toolchain instead and set 'SWIFT_EXEC' when using SPM, so it
uses the right Swift toolchain.
We have a couple of non-deterministic CI failures right now, and they
may be triggered by, or made more frequent by doing parallel testing.
Disbaling while I continue to investigate.
rdar://61837752
rdar://61965529
It's slightly faster and it helps supress the test output when tests
succeed (which avoids false positives in Jenkins' error regexes, for
example the error from "let pack" in a test).
When invoked with the `install` action, build-script-helper.py will
rsync the produced sourcekit-lsp to the toolchain's bin directory. On
Linux, we add an extra relative rpath to find the swift corelibs
(unfotunately we currently have no way to remove the absolute rpath; the
same is true for all other swift-built binaries in the toolchain). On
macOS, we replace the rpath.
This builds on the indexer changes to support test projects using the
tibs build system. See the commit message from IndexStoreDB for more
information.
This commit adds a couple of simple tests using test fixtures in the
INPUTS directory. It is a fairly minimal change for using the indexer's
test support code to prove the model works. One missing piece here is
support for mutable sources and updating the index, which is supported
on the IndexStoreDB side, but needs a bit more work here. This also
doesn't include any tests using swiftpm's build system.
Always use the latest indexstore-db and swiftpm from the corresponding
branch (currently master). This is important for swiftpm, because it
does not *guarantee* stable behaviour, so we need to match the version.
It also makes sourcekit-lsp behave more like the rest of the swift
toolchain projects, who all live on HEAD for their dependencies.
This is a lightweight wrapper for `swift build` and `swift test` to
facilitate building indexstore-db along with a swift toolchain using the
swift `build-script`.