Skip to content

Commit 94552a4

Browse files
committed
For testing on Android
1 parent 2e96829 commit 94552a4

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

Package.swift

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
// swift-tools-version:4.0
2+
//
3+
// To build with auto-linking of the .swiftmodule use:
4+
// $ swift build -Xswiftc -module-link-name -Xswiftc XCTest
5+
//
6+
17
import PackageDescription
28

3-
let package = Package(name: "XCTest")
9+
let package = Package(
10+
name: "XCTest",
11+
products: [
12+
.library(
13+
name: "XCTest",
14+
type: .dynamic,
15+
targets: ["XCTest"]
16+
)
17+
],
18+
dependencies: [
19+
],
20+
targets: [
21+
.target(name: "XCTest", dependencies: [], path: "Sources"),
22+
]
23+
)

Sources/XCTest/Private/PrintObserver.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ internal class PrintObserver: XCTestObservation {
5959

6060
fileprivate func printAndFlush(_ message: String) {
6161
print(message)
62+
#if !os(Android)
6263
fflush(stdout)
64+
#endif
6365
}
6466

6567
private func formatTimeInterval(_ timeInterval: TimeInterval) -> String {

0 commit comments

Comments
 (0)