From ca44390213fe018f4102c888661cc9ac9cfdeaf9 Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Wed, 7 Dec 2022 22:26:40 -0800 Subject: [PATCH 1/3] Reenable disabled tests These tests were disabled but proven working again. rdar://101868275 --- Tests/CommandsTests/BuildToolTests.swift | 2 +- Tests/WorkspaceTests/InitTests.swift | 2 -- Tests/WorkspaceTests/WorkspaceTests.swift | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Tests/CommandsTests/BuildToolTests.swift b/Tests/CommandsTests/BuildToolTests.swift index ed7314143d9..47fde6e0b2a 100644 --- a/Tests/CommandsTests/BuildToolTests.swift +++ b/Tests/CommandsTests/BuildToolTests.swift @@ -280,7 +280,7 @@ final class BuildToolTests: CommandsTestCase { } func testBuildCompleteMessage() throws { - throw XCTSkip("This test fails to match the 'Compiling' regex; rdar://101815761") + throw XCTSkip("This test isn't stable w.r.t. the build cache; rdar://101815761") try fixture(name: "DependencyResolution/Internal/Simple") { fixturePath in do { diff --git a/Tests/WorkspaceTests/InitTests.swift b/Tests/WorkspaceTests/InitTests.swift index aca6a76aa6a..756ea693c56 100644 --- a/Tests/WorkspaceTests/InitTests.swift +++ b/Tests/WorkspaceTests/InitTests.swift @@ -266,8 +266,6 @@ class InitTests: XCTestCase { } func testNonC99NameExecutablePackage() throws { - throw XCTSkip("This test fails to find XCTAssertEqual; rdar://101868275") - try withTemporaryDirectory(removeTreeOnDeinit: true) { tempDirPath in XCTAssertDirectoryExists(tempDirPath) diff --git a/Tests/WorkspaceTests/WorkspaceTests.swift b/Tests/WorkspaceTests/WorkspaceTests.swift index 015f423e125..fc378bd0de8 100644 --- a/Tests/WorkspaceTests/WorkspaceTests.swift +++ b/Tests/WorkspaceTests/WorkspaceTests.swift @@ -4291,8 +4291,6 @@ final class WorkspaceTests: XCTestCase { // This verifies that the simplest possible loading APIs are available for package clients. func testSimpleAPI() throws { - throw XCTSkip("This test fails to find XCTAssertEqual; rdar://101868275") - try testWithTemporaryDirectory { path in // Create a temporary package as a test case. let packagePath = path.appending(component: "MyPkg") From 9eec2acc0ca134d69198564dcb7be2eaa9c0a393 Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Wed, 7 Dec 2022 22:28:13 -0800 Subject: [PATCH 2/3] Revert "Pass `SWIFT_EXEC` to swift-test via bootstrap (#4213)" This reverts commit 59dc518fd9ace2ba11760a108774725c66c9f2b5. This change was incorrect, `bootstrap` is in fact creating a symlink to the inferior compiler for testing, so overriding `SWIFT_EXEC` is incorrect. --- Utilities/bootstrap | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index 55c8d3710ae..b275568b2fe 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -361,11 +361,7 @@ def test(args): note("Testing") parse_test_args(args) - cmd = [ - "SWIFT_EXEC=" + args.swiftc_path, - "SWIFT_DRIVER_SWIFT_EXEC=" + args.swiftc_path, - os.path.join(args.bin_dir, "swift-test") - ] + cmd = [os.path.join(args.bin_dir, "swift-test")] if args.parallel: cmd.append("--parallel") for arg in args.filter: From d5bb23f4427f59d8edec02a7d09f595583cc1168 Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Wed, 7 Dec 2022 22:29:28 -0800 Subject: [PATCH 3/3] Revert "Disable `FunctionalTests` temporarily (#5875)" This reverts commit d53f013dcf4c1391ef17d9bddd3144fec227de65. --- Package.swift | 5 ++--- Tests/FunctionalTests/PluginTests.swift | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Package.swift b/Package.swift index 4978109043f..286f95767bc 100644 --- a/Package.swift +++ b/Package.swift @@ -517,8 +517,7 @@ let package = Package( name: "WorkspaceTests", dependencies: ["Workspace", "SPMTestSupport"] ), - // rdar://101868275 "error: cannot find 'XCTAssertEqual' in scope" can affect almost any functional test, so we flat out disable them all until we know what is going on - /*.testTarget( + .testTarget( name: "FunctionalTests", dependencies: [ "swift-build", @@ -527,7 +526,7 @@ let package = Package( "PackageModel", "SPMTestSupport" ] - ),*/ + ), .testTarget( name: "FunctionalPerformanceTests", dependencies: [ diff --git a/Tests/FunctionalTests/PluginTests.swift b/Tests/FunctionalTests/PluginTests.swift index 79bc3d8eb42..282153968bd 100644 --- a/Tests/FunctionalTests/PluginTests.swift +++ b/Tests/FunctionalTests/PluginTests.swift @@ -461,6 +461,7 @@ class PluginTests: XCTestCase { outputDirectory: pluginDir.appending(component: "output"), toolSearchDirectories: toolSearchDirectories, toolNamesToPaths: [:], + toolNamesToTriples: [:], writableDirectories: [pluginDir.appending(component: "output")], readOnlyDirectories: [package.path], fileSystem: localFileSystem, @@ -722,6 +723,7 @@ class PluginTests: XCTestCase { outputDirectory: pluginDir.appending(component: "output"), toolSearchDirectories: [try UserToolchain.default.swiftCompilerPath.parentDirectory], toolNamesToPaths: [:], + toolNamesToTriples: [:], writableDirectories: [pluginDir.appending(component: "output")], readOnlyDirectories: [package.path], fileSystem: localFileSystem,