Skip to content

Commit

Permalink
Add linux test generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasa committed May 17, 2018
1 parent e2ea2b8 commit 5dfcef9
Show file tree
Hide file tree
Showing 6 changed files with 391 additions and 7 deletions.
11 changes: 7 additions & 4 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
///
/// LinuxMain.swift
///
//
// LinuxMain.swift
//
import XCTest

///
Expand All @@ -27,5 +27,8 @@ import XCTest

XCTMain([
testCase(BasicTests.allTests),
testCase(HTTP2StreamMultiplexerTests.allTests),
testCase(ReentrancyTests.allTests),
testCase(SimpleClientServerTests.allTests),
])
#endif
#endif
6 changes: 3 additions & 3 deletions Tests/NIOHTTP2Tests/BasicTests+XCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
///
/// BasicTests+XCTest.swift
///
//
// BasicTests+XCTest.swift
//
import XCTest

///
Expand Down
54 changes: 54 additions & 0 deletions Tests/NIOHTTP2Tests/HTTP2StreamMultiplexerTests+XCTest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
//
// HTTP2StreamMultiplexerTests+XCTest.swift
//
import XCTest

///
/// NOTE: This file was generated by generate_linux_tests.rb
///
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
///

extension HTTP2StreamMultiplexerTests {

static var allTests : [(String, (HTTP2StreamMultiplexerTests) -> () throws -> Void)] {
return [
("testMultiplexerIgnoresFramesOnStream0", testMultiplexerIgnoresFramesOnStream0),
("testHeadersFramesCreateNewChannels", testHeadersFramesCreateNewChannels),
("testChannelsCloseThemselvesWhenToldTo", testChannelsCloseThemselvesWhenToldTo),
("testChannelsCloseAfterResetStreamFrameFirstThenEvent", testChannelsCloseAfterResetStreamFrameFirstThenEvent),
("testChannelsCloseAfterGoawayFrameFirstThenEvent", testChannelsCloseAfterGoawayFrameFirstThenEvent),
("testFramesForUnknownStreamsAreReported", testFramesForUnknownStreamsAreReported),
("testFramesForClosedStreamsAreReported", testFramesForClosedStreamsAreReported),
("testClosingIdleChannels", testClosingIdleChannels),
("testClosingActiveChannels", testClosingActiveChannels),
("testClosePromiseIsSatisfiedWithTheEvent", testClosePromiseIsSatisfiedWithTheEvent),
("testMultipleClosePromisesAreSatisfied", testMultipleClosePromisesAreSatisfied),
("testClosePromiseFailsWithError", testClosePromiseFailsWithError),
("testFramesAreNotDeliveredUntilStreamIsSetUp", testFramesAreNotDeliveredUntilStreamIsSetUp),
("testFramesAreNotDeliveredIfSetUpFails", testFramesAreNotDeliveredIfSetUpFails),
("testFlushingOneChannelDoesntFlushThemAll", testFlushingOneChannelDoesntFlushThemAll),
("testUnflushedWritesFailOnClose", testUnflushedWritesFailOnClose),
("testUnflushedWritesFailOnError", testUnflushedWritesFailOnError),
("testWritesFailOnClosedStreamChannels", testWritesFailOnClosedStreamChannels),
("testReadPullsInAllFrames", testReadPullsInAllFrames),
("testReadIsPerChannel", testReadIsPerChannel),
("testReadWillCauseAutomaticFrameDelivery", testReadWillCauseAutomaticFrameDelivery),
("testReadWithNoPendingDataCausesReadOnParentChannel", testReadWithNoPendingDataCausesReadOnParentChannel),
]
}
}

35 changes: 35 additions & 0 deletions Tests/NIOHTTP2Tests/ReentrancyTests+XCTest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
//
// ReentrancyTests+XCTest.swift
//
import XCTest

///
/// NOTE: This file was generated by generate_linux_tests.rb
///
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
///

extension ReentrancyTests {

static var allTests : [(String, (ReentrancyTests) -> () throws -> Void)] {
return [
("testReEnterReadOnRead", testReEnterReadOnRead),
("testReenterInactiveOnRead", testReenterInactiveOnRead),
("testReenterReadEOFOnRead", testReenterReadEOFOnRead),
]
}
}

61 changes: 61 additions & 0 deletions Tests/NIOHTTP2Tests/SimpleClientServerTests+XCTest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftNIO open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
//
// SimpleClientServerTests+XCTest.swift
//
import XCTest

///
/// NOTE: This file was generated by generate_linux_tests.rb
///
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
///

extension SimpleClientServerTests {

static var allTests : [(String, (SimpleClientServerTests) -> () throws -> Void)] {
return [
("testBasicRequestResponse", testBasicRequestResponse),
("testManyRequestsAtOnce", testManyRequestsAtOnce),
("testNothingButGoaway", testNothingButGoaway),
("testGoAwayWithStreamsUpQuiescing", testGoAwayWithStreamsUpQuiescing),
("testLargeDataFramesAreSplit", testLargeDataFramesAreSplit),
("testSendingDataFrameWithSmallFile", testSendingDataFrameWithSmallFile),
("testSendingDataFrameWithLargeFile", testSendingDataFrameWithLargeFile),
("testMoreRequestsThanMaxConcurrentStreamsAtOnce", testMoreRequestsThanMaxConcurrentStreamsAtOnce),
("testOverridingDefaultSettings", testOverridingDefaultSettings),
("testBasicPingFrames", testBasicPingFrames),
("testUnflushedWritesAreFailedOnChannelInactive", testUnflushedWritesAreFailedOnChannelInactive),
("testUnflushedWritesAreFailedOnHalfClosure", testUnflushedWritesAreFailedOnHalfClosure),
("testUnflushedWritesAreFailedOnChannelInactiveRentrant", testUnflushedWritesAreFailedOnChannelInactiveRentrant),
("testUnflushedWritesAreFailedOnHalfClosureReentrant", testUnflushedWritesAreFailedOnHalfClosureReentrant),
("testFrameReceivesDoNotTriggerFlushes", testFrameReceivesDoNotTriggerFlushes),
("testAutomaticFlowControl", testAutomaticFlowControl),
("testPartialFrame", testPartialFrame),
("testFailingUnflushedWritesForResetStream", testFailingUnflushedWritesForResetStream),
("testFailingFlushedWritesForResetStream", testFailingFlushedWritesForResetStream),
("testFailingUnflushedWritesForGoaway", testFailingUnflushedWritesForGoaway),
("testFailingFlushedWritesForGoaway", testFailingFlushedWritesForGoaway),
("testSendingTrailers", testSendingTrailers),
("test1XXResponseHeaderFields", test1XXResponseHeaderFields),
("testPriorityFramesAreNotEmitted", testPriorityFramesAreNotEmitted),
("testStreamClosedWithNoError", testStreamClosedWithNoError),
("testStreamClosedViaRstStream", testStreamClosedViaRstStream),
("testStreamClosedViaGoaway", testStreamClosedViaGoaway),
("testStreamCloseEventForRstStreamFiresAfterFrame", testStreamCloseEventForRstStreamFiresAfterFrame),
("testStreamCloseEventForGoawayFiresAfterFrame", testStreamCloseEventForGoawayFiresAfterFrame),
]
}
}

Loading

0 comments on commit 5dfcef9

Please sign in to comment.