Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Convert more tests to Swift Testing #8100

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bkhouri
Copy link
Contributor

@bkhouri bkhouri commented Nov 5, 2024

Convert additional suites from XCTest to Swift Testing

Motivation:

The XCTest run, by default, sequentially. Convert some suites from XCTest to Swift Testing to make use of parallel execution and, in some cases, test parameterization.

Not all Test Suite in the respective folders have been converted as some use helpers in swift-tools-core-support, which don't have a matching swift testing helper.

Modifications:

Convert XCTest to Swift Testing

Result:

Ran the equivalent of the following and ensured there were no test-related failures

for _ in $(seq 0 100);
do
    swift test --enable-swift-testing --disable-xctest
done

Depends on #8099

Add helpers related to the current platform to assist with conditionally
running test cases.
Convert additional test from XCTest to Swift Testing to make use of
parallel execution and, in some cases, test parameterization.

Not all Test Suite in the respective folders have been converted as some
use helpers in swift-tools-core-support, which don't have a matching
swift testing helper.
@bkhouri bkhouri changed the title Test: Convert more tests to Swift Testing [DRAFT] Test: Convert more tests to Swift Testing Nov 5, 2024
@bkhouri bkhouri changed the title [DRAFT] Test: Convert more tests to Swift Testing Test: Convert more tests to Swift Testing Nov 7, 2024
@bkhouri bkhouri marked this pull request as ready for review November 7, 2024 13:12
@bkhouri
Copy link
Contributor Author

bkhouri commented Nov 7, 2024

Ready for review, though it may be blocked as not all pipeline builds run with Swift 6.0!

@bkhouri
Copy link
Contributor Author

bkhouri commented Nov 8, 2024

Ready for review, though it may be blocked as not all pipeline builds run with Swift 6.0!

Looks like the Selft-hosted macOS pipeline is now running the nightly build
https://ci.swift.org/job/swift-package-manager-with-xcode-self-hosted-PR-osx/4511/execution/node/49/log/

@@ -43,17 +45,19 @@ final class SigningIdentityTests: XCTestCase {
_ = SwiftSigningIdentity(certificate: certificate, privateKey: Certificate.PrivateKey(privateKey))

// Test public API
XCTAssertNoThrow(
#expect(throws: Never.self) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just throw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants