Files
swift-mirror/validation-test/execution/dsohandle-multi-module.swift
Jordan Rose 01a0de27ec [test] Update for remote-run-ing tests on a different macOS (#18966)
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".
2018-08-27 14:50:40 -07:00

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()