Skip to content
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
25 changes: 25 additions & 0 deletions Sources/_InternalTestSupport/SwiftTesting+Traits.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
This source file is part of the Swift.org open source project

Copyright (c) 2025 Apple Inc. and the Swift project authors
Licensed under Apache License v2.0 with Runtime Library Exception

See http://swift.org/LICENSE.txt for license information
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
*/

import Testing

#if os(Windows)
extension Trait where Self == ParallelizationTrait {
public static var serializedIfOnWindows: Self {
.serialized
}
}
#else
extension Trait where Self == ConditionTrait {
public static var serializedIfOnWindows: Self {
.enabled(if: true)
}
}
#endif
4 changes: 3 additions & 1 deletion Tests/CommandsTests/APIDiffTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ extension Trait where Self == Testing.ConditionTrait {
}
}

@Suite
@Suite(
.serializedIfOnWindows,
)
struct APIDiffTests {
@discardableResult
private func execute(
Expand Down
1 change: 1 addition & 0 deletions Tests/CommandsTests/BuildCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ fileprivate func build(
}

@Suite(
.serializedIfOnWindows,
.tags(
Tag.TestSize.large,
Tag.Feature.Command.Build,
Expand Down
1 change: 1 addition & 0 deletions Tests/CommandsTests/CoverageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import struct SPMBuildCore.BuildSystemProvider
import Testing

@Suite(
.serializedIfOnWindows,
.tags(
.TestSize.large,
.Feature.CodeCoverage,
Expand Down
2 changes: 1 addition & 1 deletion Tests/CommandsTests/PackageCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private func executeAddURLDependencyAndAssert(
}

@Suite(
// .serialized,
.serializedIfOnWindows,
.tags(
.TestSize.large,
.Feature.Command.Package.General,
Expand Down
1 change: 1 addition & 0 deletions Tests/CommandsTests/PackageRegistryCommandTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ let defaultRegistryBaseURL = URL("https://packages.example.com")
let customRegistryBaseURL = URL("https://custom.packages.example.com")

@Suite(
.serializedIfOnWindows,
.tags(
.Feature.Command.PackageRegistry.General,
),
Expand Down
1 change: 1 addition & 0 deletions Tests/FunctionalTests/CFamilyTargetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fileprivate func expectDirectoryContainsFile(
}

@Suite(
.serializedIfOnWindows,
.tags(
.TestSize.large,
),
Expand Down
1 change: 1 addition & 0 deletions Tests/FunctionalTests/DependencyResolutionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import struct SPMBuildCore.BuildSystemProvider
import enum TSCUtility.Git

@Suite(
.serializedIfOnWindows,
.tags(
Tag.TestSize.large,
),
Expand Down
1 change: 1 addition & 0 deletions Tests/FunctionalTests/MacroTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import PackageModel
import Testing

@Suite(
.serializedIfOnWindows,
.tags(
Tag.TestSize.large
),
Expand Down
1 change: 1 addition & 0 deletions Tests/FunctionalTests/ModuleAliasingFixtureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Workspace
import Testing

@Suite(
.serializedIfOnWindows,
.tags(
Tag.TestSize.large,
),
Expand Down
2 changes: 2 additions & 0 deletions Tests/FunctionalTests/PluginTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ import Testing
import Foundation

@Suite(
.serializedIfOnWindows,
.tags(
.Feature.Command.Package.Plugin,
.TestSize.large,
)
)
final class PluginTests {
Expand Down
4 changes: 3 additions & 1 deletion Tests/FunctionalTests/TestDiscoveryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import Testing
import struct Foundation.UUID
import class Foundation.ProcessInfo

@Suite
@Suite(
.serializedIfOnWindows,
)
struct TestDiscoveryTests {
static var buildSystems: [BuildSystemProvider.Kind] = [BuildSystemProvider.Kind.native, .swiftbuild]

Expand Down
1 change: 1 addition & 0 deletions Tests/FunctionalTests/TraitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import Testing
import _InternalTestSupport

@Suite(
.serializedIfOnWindows,
.tags(
Tag.TestSize.large,
Tag.Feature.Traits,
Expand Down
1 change: 1 addition & 0 deletions Tests/FunctionalTests/VersionSpecificTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import struct SPMBuildCore.BuildSystemProvider
import enum PackageModel.BuildConfiguration

@Suite(
.serializedIfOnWindows,
.tags(
.TestSize.large,
),
Expand Down