mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
lit.py currently allows any substring of `target_triple` to be used as a feature in REQUIRES/UNSUPPORTED/XFAIL. This results in various forms of the OS spread across the tests and is also somewhat confusing since they aren't actually listed in the available features. Modify all OS-related features to use the `OS=` version that Swift adds instead. We can later remove `config.target_triple` so that these don't the non-OS versions don't work in the first place.
27 lines
930 B
Swift
27 lines
930 B
Swift
// RUN: %empty-directory(%t)
|
|
|
|
// RUN: %target-build-swift-dylib(%t/%target-library-name(first)) %S/Inputs/dsohandle-first.swift -emit-module -module-name first
|
|
// RUN: %target-build-swift-dylib(%t/%target-library-name(second)) %S/Inputs/dsohandle-second.swift -emit-module -module-name second
|
|
// RUN: %target-build-swift -I %t -L %t -lfirst -lsecond %s -o %t/main %target-rpath(%t)
|
|
// RUN: %target-codesign %t/main %t/%target-library-name(first) %t/%target-library-name(second)
|
|
// RUN: %target-run %t/main %t/%target-library-name(first) %t/%target-library-name(second)
|
|
|
|
// REQUIRES: executable_test
|
|
|
|
// UNSUPPORTED: OS=linux-gnu
|
|
|
|
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()
|