Skip to content

Commit 5613b51

Browse files
authored
Merge branch 'main' into ff-async-sequence-support
2 parents fbdfadc + b05c6f2 commit 5613b51

File tree

205 files changed

+433
-257
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+433
-257
lines changed

IntegrationTests/tests_02_syscall_wrappers/defines.sh

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ set -eu
1717

1818
function make_package() {
1919
cat > "$tmpdir/syscallwrapper/Package.swift" <<"EOF"
20-
// swift-tools-version:5.0
20+
// swift-tools-version:5.2
2121
// The swift-tools-version declares the minimum version of Swift required to build this package.
2222
2323
import PackageDescription
@@ -28,24 +28,30 @@ let package = Package(
2828
targets: [
2929
.target(
3030
name: "syscallwrapper",
31-
dependencies: ["CNIOLinux", "CNIODarwin"]),
31+
dependencies: ["CNIOLinux", "CNIODarwin", "NIOCore"]),
3232
.target(
3333
name: "CNIOLinux",
3434
dependencies: []),
3535
.target(
3636
name: "CNIODarwin",
3737
dependencies: []),
38+
// This target does nothing, it just makes imports work.
39+
.target(
40+
name: "NIOCore",
41+
dependencies: []),
3842
]
3943
)
4044
EOF
41-
cp "$here/../../Tests/NIOTests/SystemCallWrapperHelpers.swift" \
45+
cp "$here/../../Tests/NIOPosixTests/SystemCallWrapperHelpers.swift" \
4246
"$here/../../Sources/NIOCore/BSDSocketAPI.swift" \
43-
"$here/../../Sources/NIO/BSDSocketAPICommon.swift" \
44-
"$here/../../Sources/NIO/BSDSocketAPIPosix.swift" \
45-
"$here/../../Sources/NIO/System.swift" \
47+
"$here/../../Sources/NIOPosix/BSDSocketAPICommon.swift" \
48+
"$here/../../Sources/NIOPosix/BSDSocketAPIPosix.swift" \
49+
"$here/../../Sources/NIOPosix/System.swift" \
4650
"$here/../../Sources/NIOCore/IO.swift" \
4751
"$tmpdir/syscallwrapper/Sources/syscallwrapper"
48-
cp "$here/../../Sources/NIO/IO.swift" "$tmpdir/syscallwrapper/Sources/syscallwrapper/NIOIO.swift"
52+
cp "$here/../../Sources/NIOPosix/IO.swift" "$tmpdir/syscallwrapper/Sources/syscallwrapper/NIOPosixIO.swift"
4953
ln -s "$here/../../Sources/CNIOLinux" "$tmpdir/syscallwrapper/Sources"
5054
ln -s "$here/../../Sources/CNIODarwin" "$tmpdir/syscallwrapper/Sources"
55+
mkdir "$tmpdir/syscallwrapper/Sources/NIOCore"
56+
touch "$tmpdir/syscallwrapper/Sources/NIOCore/empty.swift"
5157
}

IntegrationTests/tests_04_performance/test_01_resources/run-nio-alloc-counter-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fi
3939

4040
"$here/../../allocation-counter-tests-framework/run-allocation-counter.sh" \
4141
-p "$here/../../.." \
42-
-m NIO -m NIOHTTP1 -m NIOWebSocket \
42+
-m NIOCore -m NIOEmbedded -m NIOPosix -m NIOHTTP1 -m NIOWebSocket \
4343
-s "$here/shared.swift" \
4444
-t "$tmp_dir" \
4545
"${tests_to_run[@]}"

IntegrationTests/tests_04_performance/test_01_resources/shared.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the SwiftNIO open source project
44
//
5-
// Copyright (c) 2017-2019 Apple Inc. and the SwiftNIO project authors
5+
// Copyright (c) 2017-2021 Apple Inc. and the SwiftNIO project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -13,7 +13,8 @@
1313
//===----------------------------------------------------------------------===//
1414

1515
import Foundation
16-
import NIO
16+
import NIOCore
17+
import NIOPosix
1718
import NIOHTTP1
1819

1920
let localhostPickPort = try! SocketAddress.makeAddressResolvingHost("127.0.0.1", port: 0)

IntegrationTests/tests_04_performance/test_01_resources/test_1000_addHandlers.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// This source file is part of the SwiftNIO open source project
44
//
5-
// Copyright (c) 2020 Apple Inc. and the SwiftNIO project authors
5+
// Copyright (c) 2020-2021 Apple Inc. and the SwiftNIO project authors
66
// Licensed under Apache License v2.0
77
//
88
// See LICENSE.txt for license information
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOEmbedded
1617

1718
fileprivate final class SimpleHandler: ChannelInboundHandler {
1819
typealias InboundIn = NIOAny

IntegrationTests/tests_04_performance/test_01_resources/test_1000_addHandlers_sync.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOEmbedded
1617

1718
fileprivate final class SimpleHandler: ChannelInboundHandler {
1819
typealias InboundIn = NIOAny

IntegrationTests/tests_04_performance/test_01_resources/test_1000_addRemoveHandlers.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOEmbedded
1617

1718
fileprivate final class RemovableHandler: ChannelInboundHandler, RemovableChannelHandler {
1819
typealias InboundIn = NIOAny

IntegrationTests/tests_04_performance/test_01_resources/test_1000_autoReadGetAndSet.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOPosix
1617

1718
func run(identifier: String) {
1819
let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)

IntegrationTests/tests_04_performance/test_01_resources/test_1000_autoReadGetAndSet_sync.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOPosix
1617

1718
func run(identifier: String) {
1819
MultiThreadedEventLoopGroup.withCurrentThreadAsEventLoop { loop in

IntegrationTests/tests_04_performance/test_01_resources/test_1000_getHandlers.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOEmbedded
1617

1718
fileprivate final class SimpleHandler: ChannelInboundHandler {
1819
typealias InboundIn = NIOAny

IntegrationTests/tests_04_performance/test_01_resources/test_1000_getHandlers_sync.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import NIO
15+
import NIOCore
16+
import NIOEmbedded
1617

1718
fileprivate final class SimpleHandler: ChannelInboundHandler {
1819
typealias InboundIn = NIOAny

0 commit comments

Comments
 (0)