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

[pull] swiftwasm from main #62

Open
wants to merge 32 commits into
base: swiftwasm
Choose a base branch
from
Open

[pull] swiftwasm from main #62

wants to merge 32 commits into from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jun 28, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added ⤵️ Upstream Tracking merge-conflict Resolve conflicts manually labels Jun 28, 2023
grynspan and others added 18 commits July 5, 2023 11:38
…nt-target

Bump the macOS deployment target to 10.13 in the Xcode project.
This PR removes a section from the repo's readme that describes how to set up XCTest on Linux. SwiftPM automatically handles this these days, so the section is obsolete and can be removed.

Resolves rdar://114360933.
…nuxmain-doc

Remove outdated documentation for LinuxMain.swift.
Frameworks don't exist off of Darwin resulting in link failures in this
test. The CF modulemap declares CF as a framework everywhere, which is
wrong, but importing CF from swift-corelibs-foundation is also equally
wrong, which this test does as well, so there's a lot of wrongness.

To get the rebranch working, we need to stop importing CoreFoundation as
a framework in this test, or disable the test on non-darwin platforms.
Given that corelibs-xctest is for non-Darwin platforms, that seems like
the wrong course of action.
…-framework

Stop importing CF as a framework
Right now, `XCTMain()` returns `Never` and calls `exit()` to report its status. This makes it difficult (if not outright impossible) to do any post-test cleanup work like writing an event log or other cleanup.

This PR adds a new overload of `XCTMain()` that instead returns the intended exit code of the process (as `CInt`, since process exit codes passed to `exit()` are always of type `int` in C.) The new overload is, for now, disfavoured until we can teach SwiftPM about it. Once we can (in a subsequent PR), we'll mark the _old_ one disfavored and deprecated.
Make `XCTMain()` return its exit code instead of calling `exit()`.
This PR removes a dependency on Core Foundation in a couple of our tests. The dependency is unnecessary and causes linkage issues on Windows per @etcwilde.

Resolves rdar://116586683.
WASI does not have thread spawning method yet, but the existing
implementation blocks threads to wait async test cases synchronously.
This commit introduced a new waiter method for running async test cases in
single-threaded WASI environments, enabled by USE_SWIFT_CONCURRENCY_WAITER
flag.

With the new waiter, `XCTMain` is async runs the given test suites
without blocking the thread by bypassing some synchronous public APIs
like `XCTest.perform` and `XCTest.run`. This ignores those APIs even if
they are overridden by user-defined subclasses, so it's not 100%
compatible with the existing XCTest APIs. This is a trade-off to
support async test execution in single-threaded environments, but it
should be fine because the APIs are seldom overridden by user code.
Also this revealed teardown blocks were not being run in the mode, so
fix that as well.
To keep consistency with the regular mode.
To make the semantics of the option clearer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants