Skip to content

Commit bf069ea

Browse files
committed
foo
1 parent 5022062 commit bf069ea

File tree

3 files changed

+107
-0
lines changed

3 files changed

+107
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2025 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
import struct SPMBuildCore.BuildSystemProvider
14+
import enum PackageModel.BuildConfiguration
15+
16+
extension BuildSystemProvider.Kind {
17+
18+
public func binPathSuffixes(for config: BuildConfiguration) -> [String] {
19+
switch self {
20+
case .native:
21+
return ["\(config)".lowercased()]
22+
case .swiftbuild:
23+
return ["Products" , "\(config)".capitalized]
24+
case .xcode:
25+
return ["apple", "Products" , "\(config)".capitalized]
26+
}
27+
}
28+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift open source project
4+
//
5+
// Copyright (c) 2025 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See http://swift.org/LICENSE.txt for license information
9+
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
import struct SPMBuildCore.BuildSystemProvider
14+
15+
public var SupportedBuildSystemOnPlatform: [BuildSystemProvider.Kind] {
16+
#if os(macOS)
17+
BuildSystemProvider.Kind.allCases
18+
#else
19+
BuildSystemProvider.Kind.allCases.filter { $0 != .xcode }
20+
#endif
21+
}

Sources/_InternalTestSupport/SkippedTestSupport.swift

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,62 @@ extension Trait where Self == Testing.ConditionTrait {
6868
.map { String(decoding: $0, as: UTF8.self) == "Amazon Linux release 2 (Karoo)\n" } ?? false
6969
}
7070
}
71+
72+
/// Skips the test if running on a platform which lacks the ability for build tasks to set a working directory due to lack of requisite system API.
73+
///
74+
/// Presently, relevant platforms include Amazon Linux 2 and OpenBSD.
75+
///
76+
/// - seealso: https://github.com/swiftlang/swift-package-manager/issues/8560
77+
public static var disableIfWorkingDirectoryUnsupported: Self {
78+
disabled("https://github.com/swiftlang/swift-package-manager/issues/8560: Thread-safe process working directory support is unavailable on this platform.") {
79+
!workingDirectoryIsSupported()
80+
}
81+
}
82+
}
83+
84+
extension Trait where Self == Testing.Bug {
85+
public static func SWBINTTODO(_ comment: Comment) -> Self {
86+
bug(nil, id: 0, comment)
87+
}
88+
}
89+
extension Tag {
90+
public enum TestSize {}
91+
public enum Feature {}
92+
@Tag public static var UserWorkflow: Tag
93+
}
94+
95+
extension Tag.TestSize {
96+
@Tag public static var small: Tag
97+
@Tag public static var medium: Tag
98+
@Tag public static var large: Tag
99+
}
100+
101+
extension Tag.Feature {
102+
public enum Command {}
103+
public enum PackageType {}
104+
105+
@Tag public static var CodeCoverage: Tag
106+
@Tag public static var Resource: Tag
107+
@Tag public static var SpecialCharacters: Tag
108+
}
109+
110+
111+
extension Tag.Feature.Command {
112+
public enum Package {}
113+
@Tag public static var Build: Tag
114+
@Tag public static var Test: Tag
115+
@Tag public static var Run: Tag
116+
}
117+
118+
extension Tag.Feature.Command.Package {
119+
@Tag public static var Init: Tag
71120
}
121+
extension Tag.Feature.PackageType {
122+
@Tag public static var Library: Tag
123+
@Tag public static var Executable: Tag
124+
@Tag public static var Tool: Tag
125+
@Tag public static var Plugin: Tag
126+
@Tag public static var BuildToolPlugin: Tag
127+
@Tag public static var CommandPlugin: Tag
128+
@Tag public static var Macro: Tag
129+
}

0 commit comments

Comments
 (0)