mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Most of this is just "remember to specify the inputs and outputs on the command line, so remote-run can see them". A bit is "prefix environment variables with '%env-'". And the last few are "yeah, this was never going to work in a remote environment". In the few cases where I couldn't think of anything reasonable, I just marked the test as "UNSUPPORTED: remote_run", a new "feature".
27 lines
1.0 KiB
Swift
27 lines
1.0 KiB
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: (cd %t && %target-build-swift %S/Inputs/dsohandle-first.swift -emit-library -emit-module -module-name first -Xlinker -install_name -Xlinker '@executable_path/libfirst.dylib')
|
|
// RUN: (cd %t && %target-build-swift %S/Inputs/dsohandle-second.swift -emit-library -emit-module -module-name second -Xlinker -install_name -Xlinker '@executable_path/libsecond.dylib')
|
|
// RUN: %target-build-swift -I %t -L %t -lfirst -lsecond %s -o %t/main
|
|
// RUN: %target-codesign %t/main %t/libfirst.%target-dylib-extension %t/libsecond.%target-dylib-extension
|
|
// RUN: %target-run %t/main %t/libfirst.%target-dylib-extension %t/libsecond.%target-dylib-extension
|
|
|
|
// REQUIRES: executable_test
|
|
|
|
// UNSUPPORTED: linux
|
|
|
|
import first
|
|
import second
|
|
|
|
import StdlibUnittest
|
|
|
|
let DSOHandleTests = TestSuite("DSOHandle")
|
|
|
|
DSOHandleTests.test("Unique handles for different images") {
|
|
let firstHandle = getFirstDSOHandle()
|
|
let secondHandle = getSecondDSOHandle()
|
|
expectNotEqual(firstHandle, secondHandle)
|
|
}
|
|
|
|
runAllTests()
|