[test] Fix target-based reflection tests for real (#19098)

- Hard-link %target-swift-reflection-test into %t/ for %target-run
  implementations that copy executables, like remote-run.
- Use DYLD_LIBRARY_PATH to undo that for %target-run implementations
  that run the executable in place (host and simulators)

rdar://problem/43809613
This commit is contained in:
Jordan Rose
2018-09-04 08:45:25 -07:00
committed by GitHub
parent 161819b31c
commit e3f3e939cb
32 changed files with 41 additions and 218 deletions

View File

@@ -3,17 +3,11 @@
// RUN: %target-build-swift -lswiftSwiftReflectionTest %s -o %t/functions
// RUN: %target-codesign %t/functions
// Link %target-swift-reflection-test into %t to convince %target-run to copy
// it.
// RUN: ln -s %target-swift-reflection-test %t/swift-reflection-test
// RUN: %target-run %t/swift-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-run-reflection-test %t/functions | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// REQUIRES: objc_interop
// REQUIRES: executable_test
// FIXME: Handle different forms of %target-run more robustly
// REQUIRES: OS=macosx
import SwiftReflectionTest
import Foundation
import CoreGraphics