Commit Graph

7 Commits

Author SHA1 Message Date
Daniel Rodríguez Troitiño
8f0382c109 [test] Replace swift_obj_root for alternates that work in LLVM unified builds (#66167)
In LLVM unified builds `%swift_obj_root` points to `<LLVM build dir>/tools/swift`,
and folders like `bin`, `lib` and `share` are not under `swift_obj_root`, which
makes some tests fail.

For the cases in which `%swift_obj_root/lib` was used, replace it by
using `%swift-lib-dir` instead. Replicate `%swift-lib-dir` to create
`%swift-bin-dir` and `%swift-share-dir`, and use those instead of
`%swift_obj_root/bin` and `%swift_obj_root/share`.

This alternates work both in Swift build-script builds and also in LLVM
unified builds.
2023-05-26 08:39:31 -07:00
Alastair Houghton
9833e09b58 [Tests] Disable path lookup test for OS stdlib.
Path lookup needs the new stdlib.

rdar://107399270
2023-03-30 09:39:40 +01:00
Saleem Abdulrasool
9df349e0da test: adjust Runtime Paths test for unified builds
When building the toolchain in unified mode, we fail to search for
headers and libraries.  Adjust the invocation to account for the layout
differences.
2023-03-09 13:33:22 -08:00
Alastair Houghton
fdb010433d [Remote Test] Fix remote-run to process environment variables.
`remote-run` should look in the environment for input/output paths as
well as considering command line arguments.

With this change, `test/Runtime/Paths.cpp` should work for remote testing
and device testing.

rdar://106294557
2023-03-07 16:01:10 +00:00
Alastair Houghton
35a2f17d35 [Backtracing] Add missing void cast to the paths test.
We need to cast in order to call `free()`.

rdar://103071801
2023-03-01 13:43:15 +00:00
Alastair Houghton
69bad8cb09 [Backtracing] Rename a couple of functions, some comment changes.
Renamed a couple of functions following review feedback.  Also added some
extra words to the comments.

rdar://103071801
2023-03-01 13:43:15 +00:00
Alastair Houghton
f02f62f1e3 [Backtracing] Add support for looking up paths for auxiliary executables.
We need to be able to locate `swift-backtrace` relative to the current
location of the runtime library.

This needs to work:

* In a Swift build directory.
* On Darwin, where we're installed in /usr/lib/swift and /usr/libexec/swift.
* On Linux, where we're in /usr/lib/swift/linux and /usr/libexec/swift/linux.
* On Windows, where we may be in a flat directory layout (because of limitations
  of Windows DLL lookups).

rdar://103071801
2023-03-01 13:43:15 +00:00