Skip to content

Move Runner and contained symbols to SPI group ForToolsIntegrationOnly. #278

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

Merged
merged 3 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Sources/Testing/Events/Event.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public struct Event: Sendable {
/// A test run started.
///
/// This event is the first event posted after ``Runner/run()`` is called.
@_spi(ExperimentalTestRunning)
case runStarted

/// An iteration of the test run started.
Expand All @@ -30,7 +29,6 @@ public struct Event: Sendable {
/// By default, a test plan runs for one iteration, but the
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
/// allow for more iterations.
@_spi(ExperimentalTestRunning)
indirect case iterationStarted(_ index: Int)

/// A step in the runner plan started.
Expand All @@ -42,7 +40,6 @@ public struct Event: Sendable {
/// ``Runner/Plan/Step``. Processing this step may result in its associated
/// ``Test`` being run, skipped, or another action, so this event will only
/// be followed by a ``testStarted`` event if the step's test is run.
@_spi(ExperimentalTestRunning)
indirect case planStepStarted(_ step: Runner.Plan.Step)

/// A test started.
Expand Down Expand Up @@ -112,7 +109,6 @@ public struct Event: Sendable {
///
/// This event is posted when a ``Runner`` finishes processing a
/// ``Runner/Plan/Step``.
@_spi(ExperimentalTestRunning)
indirect case planStepEnded(Runner.Plan.Step)

/// An iteration of the test run ended.
Expand All @@ -126,13 +122,11 @@ public struct Event: Sendable {
/// By default, a test plan runs for one iteration, but the
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
/// allow for more iterations.
@_spi(ExperimentalTestRunning)
indirect case iterationEnded(_ index: Int)

/// A test run ended.
///
/// This event is the last event posted before ``Runner/run()`` returns.
@_spi(ExperimentalTestRunning)
case runEnded
}

Expand Down Expand Up @@ -323,7 +317,6 @@ extension Event.Kind {
/// A test run started.
///
/// This is the first event posted after ``Runner/run()`` is called.
@_spi(ExperimentalTestRunning)
case runStarted

/// An iteration of the test run started.
Expand All @@ -337,7 +330,6 @@ extension Event.Kind {
/// By default, a test plan runs for one iteration, but the
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
/// allow for more iterations.
@_spi(ExperimentalTestRunning)
indirect case iterationStarted(_ index: Int)

/// A step in the runner plan started.
Expand All @@ -349,7 +341,6 @@ extension Event.Kind {
/// ``Runner/Plan/Step``. Processing this step may result in its associated
/// ``Test`` being run, skipped, or another action, so this event will only
/// be followed by a ``testStarted`` event if the step's test is run.
@_spi(ExperimentalTestRunning)
case planStepStarted

/// A test started.
Expand Down Expand Up @@ -401,7 +392,6 @@ extension Event.Kind {
///
/// This is posted when a ``Runner`` finishes processing a
/// ``Runner/Plan/Step``.
@_spi(ExperimentalTestRunning)
case planStepEnded

/// An iteration of the test run ended.
Expand All @@ -415,13 +405,11 @@ extension Event.Kind {
/// By default, a test plan runs for one iteration, but the
/// ``Configuration/repetitionPolicy-swift.property`` property can be set to
/// allow for more iterations.
@_spi(ExperimentalTestRunning)
indirect case iterationEnded(_ index: Int)

/// A test run ended.
///
/// This is the last event posted before ``Runner/run()`` returns.
@_spi(ExperimentalTestRunning)
case runEnded

/// Snapshots an ``Event.Kind``.
Expand Down
2 changes: 0 additions & 2 deletions Sources/Testing/Running/Runner.Plan+Dumping.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@_spi(ExperimentalTestRunning)
extension Runner.Plan {
/// Write a dump of the specified step graph to a stream.
///
Expand Down Expand Up @@ -105,7 +104,6 @@ extension Runner.Plan {
///
/// - Note: The output of this function is not intended to be machine-readable
/// and its format may change over time.
@_spi(InternalDiagnostics)
public func dump(to stream: inout some TextOutputStream, verbose: Bool = false, indent: Int = 2) {
if verbose {
Swift.dump(self, to: &stream, indent: indent)
Expand Down
2 changes: 0 additions & 2 deletions Sources/Testing/Running/Runner.Plan.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@_spi(ExperimentalTestRunning)
extension Runner {
/// A type describing a runner plan.
public struct Plan: Sendable {
Expand Down Expand Up @@ -130,7 +129,6 @@ extension Runner {

// MARK: - Constructing a new runner plan

@_spi(ExperimentalTestRunning)
extension Runner.Plan {
/// Recursively apply eligible traits from a test suite to its children in a
/// graph.
Expand Down
3 changes: 1 addition & 2 deletions Sources/Testing/Running/Runner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//

/// A type that runs tests according to a given configuration.
@_spi(ExperimentalTestRunning)
@_spi(ForToolsIntegrationOnly)
public struct Runner: Sendable {
/// The plan to follow when running the associated tests.
public var plan: Plan
Expand Down Expand Up @@ -55,7 +55,6 @@ public struct Runner: Sendable {

// MARK: - Running tests

@_spi(ExperimentalTestRunning)
extension Runner {
/// Catch errors thrown from a closure and process them as issues instead of
/// allowing them to propagate to the caller.
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/BacktraceTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing
#if canImport(Foundation)
import Foundation
#endif
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/ConfirmationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing

@Suite("Confirmation Tests")
struct ConfirmationTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/DumpTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(InternalDiagnostics) @_spi(ExperimentalTestRunning) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing
private import TestingInternals

// NOTE: The tests in this file are here to exercise Plan.dump(), but they are
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/EventRecorderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
#if !os(Windows)
import RegexBuilder
#endif
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/IssueTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
private import TestingInternals

#if canImport(XCTest)
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/ObjCInteropTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

import XCTest
@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing

final class NonXCTestCaseClassTests: NSObject {
@Test("Methods on non-XCTestCase subclasses are supported")
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/PlanIterationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing

@Suite("Configuration.RepetitionPolicy Tests")
struct PlanIterationTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/PlanTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing

@Suite("Runner.Plan Tests")
struct PlanTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Runner.Plan.SnapshotTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(ForToolsIntegrationOnly) import Testing

#if canImport(Foundation)
import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/SwiftPMTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
#if canImport(Foundation)
import Foundation
#endif
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Test.Case.ArgumentTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ForToolsIntegrationOnly) @_spi(ExperimentalTestRunning) @_spi(Experimental) import Testing
@testable @_spi(ForToolsIntegrationOnly) @_spi(Experimental) import Testing

@Suite("Test.Case.Argument Tests")
struct Test_Case_ArgumentTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Test.ID.SelectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) import Testing
@testable import Testing

@Suite("Test.ID.Selection Tests")
struct Test_ID_SelectionTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/TestCaseSelectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) @_spi(Experimental) import Testing
@testable @_spi(ForToolsIntegrationOnly) @_spi(Experimental) import Testing

@Suite("Test.Case Selection Tests")
struct TestCaseSelectionTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Traits/CommentTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(Experimental) @_spi(ExperimentalTestRunning) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing

@Suite("Comment Tests", .tags(.traitRelated))
struct CommentTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Traits/SerialTraitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(Experimental) @_spi(ExperimentalTestRunning) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing

@Suite("Serial Trait Tests", .tags("trait"))
struct SerialTraitTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Traits/TagListTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing

#if canImport(Foundation)
import Foundation
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/Traits/TimeLimitTraitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing
@testable @_spi(Experimental) @_spi(ForToolsIntegrationOnly) import Testing

@Suite("TimeLimitTrait Tests", .tags(.traitRelated))
struct TimeLimitTraitTests {
Expand Down
2 changes: 1 addition & 1 deletion Tests/TestingTests/ZipTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

@testable @_spi(ExperimentalTestRunning) import Testing
@testable import Testing

@Suite("zip Tests")
struct ZipTests {
Expand Down