android test fixes

This commit is contained in:
Alex Lorenz
2024-05-03 18:00:38 -07:00
parent 57b89d5303
commit 0f9a69c712
34 changed files with 76 additions and 1 deletions

View File

@@ -9,6 +9,8 @@
import _Differentiation
#if canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#else
import Foundation
#endif

View File

@@ -12,6 +12,8 @@ import _Differentiation
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -5,6 +5,8 @@
import Darwin.C.tgmath
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -6,6 +6,8 @@ import StdlibUnittest
import Darwin.C
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -6,6 +6,8 @@ import StdlibUnittest
import Darwin.C
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -4,6 +4,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)

View File

@@ -16,6 +16,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#endif
var asyncTests = TestSuite("Async")

View File

@@ -18,6 +18,8 @@ import Dispatch
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#endif
enum TL {

View File

@@ -10,6 +10,8 @@
import Glibc
#elseif os(Windows)
import MSVCRT
#elseif canImport(Android)
import Android
#else
import Darwin
#endif
@@ -36,4 +38,4 @@ func test_withUnsafeCurrentTask() async {
static func main() async {
await test_withUnsafeCurrentTask()
}
}
}

View File

@@ -12,6 +12,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif canImport(WASILibc)
import WASILibc
#elseif os(Windows)

View File

@@ -24,6 +24,8 @@ import Dispatch
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#endif
@MainActor func onMainActor() {

View File

@@ -25,6 +25,8 @@ import Dispatch
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#endif
@MainActor func onMainActor() {

View File

@@ -31,6 +31,8 @@ var global3: Int = 7
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif canImport(CRT)
import CRT
#endif

View File

@@ -26,6 +26,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif canImport(CRT)
import CRT
#endif

View File

@@ -14,6 +14,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#endif
@available(SwiftStdlib 5.1, *)

View File

@@ -21,6 +21,8 @@ import Dispatch
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(WASI)
import WASILibc
#elseif os(Windows)

View File

@@ -6,6 +6,8 @@
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -15,6 +15,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -3,7 +3,13 @@
// REQUIRES: executable_test
// REQUIRES: OS=linux-gnu || OS=linux-android
#if canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#else
#error ("unsupported platform")
#endif
import StdlibUnittest
var GlibcTests = TestSuite("GlibcTests")

View File

@@ -17,6 +17,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
import WinSDK

View File

@@ -109,6 +109,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
import WinSDK

View File

@@ -30,6 +30,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
import WinSDK

View File

@@ -16,6 +16,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
import WinSDK

View File

@@ -22,6 +22,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -10,6 +10,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -17,6 +17,8 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#else
#error("Unsupported platform")
#endif

View File

@@ -6,6 +6,8 @@
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -6,6 +6,8 @@
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -9,6 +9,8 @@ import SwiftPrivateLibcExtras
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#else
#error("Unsupported platform")
#endif

View File

@@ -19,6 +19,8 @@ import SwiftPrivateLibcExtras
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Android)
import Android
#elseif os(Windows)
import CRT
#else

View File

@@ -17,6 +17,8 @@ import SwiftShims
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Android)
import Android
#elseif os(Windows)
import CRT
import WinSDK

View File

@@ -27,6 +27,9 @@ runAllTests()
#elseif os(WASI)
import WASILibc
typealias CGFloat = Double
#elseif canImport(Android)
import Android
typealias CGFloat = Double
#elseif os(Windows)
import CRT
#if arch(x86_64) || arch(arm64)

View File

@@ -8,6 +8,10 @@ import StdlibUnittest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
// MAP_FAILED is not available on android.
let MAP_FAILED = UnsafeMutableRawPointer(bitPattern: -1)
#else
#error("Unsupported platform")
#endif

View File

@@ -10,6 +10,8 @@
import Glibc
#elseif os(WASI)
import WASILibc
#elseif os(Android)
import Android
#elseif os(Windows)
import CRT
#else