Skip to content

Commit 6cb6b72

Browse files
committed
Mark some tests with known issues
1 parent 9954eb4 commit 6cb6b72

File tree

1 file changed

+110
-77
lines changed

1 file changed

+110
-77
lines changed

Tests/CommandsTests/TestCommandTests.swift

Lines changed: 110 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,104 +1296,137 @@ struct TestCommandTests {
12961296
)
12971297
}
12981298

1299-
@Test(arguments: SupportedBuildSystemOnAllPlatforms)
1299+
@Test(
1300+
.bug(id: 0, "SWBINTTODO: MacOS: Could not find or use auto-linked library 'Testing': library 'Testing' not found"),
1301+
arguments: SupportedBuildSystemOnAllPlatforms,
1302+
)
13001303
func debuggerFlagWithXCTestSuite(buildSystem: BuildSystemProvider.Kind) async throws {
1301-
let configuration = BuildConfiguration.debug
1302-
try await fixture(name: "Miscellaneous/TestDebugging") { fixturePath in
1303-
let (stdout, stderr) = try await execute(
1304-
["--debugger", "--disable-swift-testing", "--verbose"],
1305-
packagePath: fixturePath,
1306-
configuration: configuration,
1307-
buildSystem: buildSystem,
1308-
)
1304+
try await withKnownIssue(
1305+
"""
1306+
MacOS: Could not find or use auto-linked library 'Testing': library 'Testing' not found
1307+
"""
1308+
) {
1309+
let configuration = BuildConfiguration.debug
1310+
try await fixture(name: "Miscellaneous/TestDebugging") { fixturePath in
1311+
let (stdout, stderr) = try await execute(
1312+
["--debugger", "--disable-swift-testing", "--verbose"],
1313+
packagePath: fixturePath,
1314+
configuration: configuration,
1315+
buildSystem: buildSystem,
1316+
)
13091317

1310-
#expect(
1311-
!stderr.contains("error: --debugger cannot be used with"),
1312-
"got stdout: \(stdout), stderr: \(stderr)",
1313-
)
1318+
#expect(
1319+
!stderr.contains("error: --debugger cannot be used with"),
1320+
"got stdout: \(stdout), stderr: \(stderr)",
1321+
)
13141322

1315-
#if os(macOS)
1316-
let targetName = "xctest"
1317-
#else
1318-
let targetName = buildSystem == .swiftbuild ? "test-runner" : "xctest"
1319-
#endif
1323+
#if os(macOS)
1324+
let targetName = "xctest"
1325+
#else
1326+
let targetName = buildSystem == .swiftbuild ? "test-runner" : "xctest"
1327+
#endif
13201328

1321-
#expect(
1322-
stdout.contains("target create") && stdout.contains(targetName),
1323-
"Expected LLDB to target xctest binary, got stdout: \(stdout), stderr: \(stderr)",
1324-
)
1329+
#expect(
1330+
stdout.contains("target create") && stdout.contains(targetName),
1331+
"Expected LLDB to target xctest binary, got stdout: \(stdout), stderr: \(stderr)",
1332+
)
13251333

1326-
#expect(
1327-
stdout.contains("failbreak breakpoint set"),
1328-
"Expected a failure breakpoint to be setup, got stdout: \(stdout), stderr: \(stderr)",
1329-
)
1334+
#expect(
1335+
stdout.contains("failbreak breakpoint set"),
1336+
"Expected a failure breakpoint to be setup, got stdout: \(stdout), stderr: \(stderr)",
1337+
)
1338+
}
1339+
} when: {
1340+
buildSystem == .swiftbuild && ProcessInfo.hostOperatingSystem == .macOS && CiEnvironment.runningInSelfHostedPipeline
13301341
}
13311342
}
13321343

1333-
@Test(arguments: SupportedBuildSystemOnAllPlatforms)
1344+
@Test(
1345+
.bug(id: 0, "SWBINTTODO: MacOS: Could not find or use auto-linked library 'Testing': library 'Testing' not found"),
1346+
arguments: SupportedBuildSystemOnAllPlatforms
1347+
)
13341348
func debuggerFlagWithSwiftTestingSuite(buildSystem: BuildSystemProvider.Kind) async throws {
1335-
let configuration = BuildConfiguration.debug
1336-
try await fixture(name: "Miscellaneous/TestDebugging") { fixturePath in
1337-
let (stdout, stderr) = try await execute(
1338-
["--debugger", "--disable-xctest", "--verbose"],
1339-
packagePath: fixturePath,
1340-
configuration: configuration,
1341-
buildSystem: buildSystem,
1342-
)
1349+
try await withKnownIssue(
1350+
"""
1351+
MacOS: Could not find or use auto-linked library 'Testing': library 'Testing' not found
1352+
"""
1353+
) {
1354+
let configuration = BuildConfiguration.debug
1355+
try await fixture(name: "Miscellaneous/TestDebugging") { fixturePath in
1356+
let (stdout, stderr) = try await execute(
1357+
["--debugger", "--disable-xctest", "--verbose"],
1358+
packagePath: fixturePath,
1359+
configuration: configuration,
1360+
buildSystem: buildSystem,
1361+
)
13431362

1344-
#expect(
1345-
!stderr.contains("error: --debugger cannot be used with"),
1346-
"got stdout: \(stdout), stderr: \(stderr)",
1347-
)
1363+
#expect(
1364+
!stderr.contains("error: --debugger cannot be used with"),
1365+
"got stdout: \(stdout), stderr: \(stderr)",
1366+
)
13481367

1349-
#if os(macOS)
1350-
let targetName = "swiftpm-testing-helper"
1351-
#else
1352-
let targetName = "TestDebuggingTests-test-runner"
1353-
#endif
1368+
#if os(macOS)
1369+
let targetName = "swiftpm-testing-helper"
1370+
#else
1371+
let targetName = buildSystem == .native ? "TestDebuggingPackageTests.xctest" : "TestDebuggingTests-test-runner"
1372+
#endif
13541373

1355-
#expect(
1356-
stdout.contains("target create") && stdout.contains(targetName),
1357-
"Expected LLDB to target swiftpm-testing-helper binary, got stdout: \(stdout), stderr: \(stderr)",
1358-
)
1374+
#expect(
1375+
stdout.contains("target create") && stdout.contains(targetName),
1376+
"Expected LLDB to target swiftpm-testing-helper binary, got stdout: \(stdout), stderr: \(stderr)",
1377+
)
13591378

1360-
#expect(
1361-
stdout.contains("failbreak breakpoint set"),
1362-
"Expected Swift Testing failure breakpoint setup, got stdout: \(stdout), stderr: \(stderr)",
1363-
)
1379+
#expect(
1380+
stdout.contains("failbreak breakpoint set"),
1381+
"Expected Swift Testing failure breakpoint setup, got stdout: \(stdout), stderr: \(stderr)",
1382+
)
1383+
}
1384+
} when: {
1385+
buildSystem == .swiftbuild && ProcessInfo.hostOperatingSystem == .macOS && CiEnvironment.runningInSelfHostedPipeline
13641386
}
13651387
}
13661388

1367-
@Test(arguments: SupportedBuildSystemOnAllPlatforms)
1389+
@Test(
1390+
.bug(id: 0, "SWBINTTODO: MacOS: Could not find or use auto-linked library 'Testing': library 'Testing' not found"),
1391+
arguments: SupportedBuildSystemOnAllPlatforms
1392+
)
13681393
func debuggerFlagWithBothTestingSuites(buildSystem: BuildSystemProvider.Kind) async throws {
1369-
let configuration = BuildConfiguration.debug
1370-
try await fixture(name: "Miscellaneous/TestDebugging") { fixturePath in
1371-
let (stdout, stderr) = try await execute(
1372-
["--debugger", "--verbose"],
1373-
packagePath: fixturePath,
1374-
configuration: configuration,
1375-
buildSystem: buildSystem,
1376-
)
1394+
try await withKnownIssue(
1395+
"""
1396+
MacOS: Could not find or use auto-linked library 'Testing': library 'Testing' not found
1397+
"""
1398+
) {
1399+
let configuration = BuildConfiguration.debug
1400+
try await fixture(name: "Miscellaneous/TestDebugging") { fixturePath in
1401+
let (stdout, stderr) = try await execute(
1402+
["--debugger", "--verbose"],
1403+
packagePath: fixturePath,
1404+
configuration: configuration,
1405+
buildSystem: buildSystem,
1406+
)
13771407

1378-
#expect(
1379-
!stderr.contains("error: --debugger cannot be used with"),
1380-
"got stdout: \(stdout), stderr: \(stderr)",
1381-
)
1408+
#expect(
1409+
!stderr.contains("error: --debugger cannot be used with"),
1410+
"got stdout: \(stdout), stderr: \(stderr)",
1411+
)
13821412

1383-
#expect(
1384-
stdout.contains("target create"),
1385-
"Expected LLDB to create targets, got stdout: \(stdout), stderr: \(stderr)",
1386-
)
1413+
#expect(
1414+
stdout.contains("target create"),
1415+
"Expected LLDB to create targets, got stdout: \(stdout), stderr: \(stderr)",
1416+
)
13871417

1388-
#expect(
1389-
getNumberOfMatches(of: "breakpoint set", in: stdout) == 2,
1390-
"Expected combined failure breakpoint setup, got stdout: \(stdout), stderr: \(stderr)",
1391-
)
1418+
#expect(
1419+
getNumberOfMatches(of: "breakpoint set", in: stdout) == 2,
1420+
"Expected combined failure breakpoint setup, got stdout: \(stdout), stderr: \(stderr)",
1421+
)
13921422

1393-
#expect(
1394-
stdout.contains("command script import"),
1395-
"Expected Python script import for multi-target switching, got stdout: \(stdout), stderr: \(stderr)",
1396-
)
1423+
#expect(
1424+
stdout.contains("command script import"),
1425+
"Expected Python script import for multi-target switching, got stdout: \(stdout), stderr: \(stderr)",
1426+
)
1427+
}
1428+
} when: {
1429+
buildSystem == .swiftbuild && ProcessInfo.hostOperatingSystem == .macOS && CiEnvironment.runningInSelfHostedPipeline
13971430
}
13981431
}
13991432

0 commit comments

Comments
 (0)