diff --git a/Sources/_InternalTestSupport/SwiftTesting+Tags.swift b/Sources/_InternalTestSupport/SwiftTesting+Tags.swift index 1801424cfbd..b4479b79a0c 100644 --- a/Sources/_InternalTestSupport/SwiftTesting+Tags.swift +++ b/Sources/_InternalTestSupport/SwiftTesting+Tags.swift @@ -35,6 +35,10 @@ extension Tag.FunctionalArea { @Tag public static var IndexMode: Tag @Tag public static var Sanitizer: Tag @Tag public static var LinkSwiftStaticStdlib: Tag + @Tag public static var Metal: Tag + @Tag public static var ModuleMaps: Tag + @Tag public static var Resources: Tag + } extension Tag.Feature { diff --git a/Tests/BuildMetalTests/BuildMetalTests.swift b/Tests/BuildMetalTests/BuildMetalTests.swift index d33481571f1..27c187195fc 100644 --- a/Tests/BuildMetalTests/BuildMetalTests.swift +++ b/Tests/BuildMetalTests/BuildMetalTests.swift @@ -14,24 +14,33 @@ import _InternalTestSupport import Testing import Basics import Foundation +import struct SPMBuildCore.BuildSystemProvider +import enum PackageModel.BuildConfiguration #if os(macOS) import Metal #endif -@Suite +@Suite( + .tags( + .FunctionalArea.Metal, + ) +) struct BuildMetalTests { -#if os(macOS) @Test( .disabled("Require downloadable Metal toolchain"), - .tags(.TestSize.large), + .tags( + .TestSize.large, + ), .requireHostOS(.macOS), - arguments: getBuildData(for: [.swiftbuild]) + arguments: BuildConfiguration.allCases, ) - func simpleLibrary(data: BuildData) async throws { - let buildSystem = data.buildSystem - let configuration = data.config - + func simpleLibrary( + config: BuildConfiguration, + ) async throws { + let buildSystem = BuildSystemProvider.Kind.swiftbuild + let configuration = config + try await fixture(name: "Metal/SimpleLibrary") { fixturePath in // Build the package @@ -41,7 +50,7 @@ struct BuildMetalTests { buildSystem: buildSystem, throwIfCommandFails: true ) - + // Get the bin path let (binPathOutput, _) = try await executeSwiftBuild( fixturePath, @@ -50,9 +59,9 @@ struct BuildMetalTests { buildSystem: buildSystem, throwIfCommandFails: true ) - + let binPath = try AbsolutePath(validating: binPathOutput.trimmingCharacters(in: .whitespacesAndNewlines)) - + // Check that default.metallib exists let metallibPath = binPath.appending(components:["MyRenderer_MyRenderer.bundle", "Contents", "Resources", "default.metallib"]) #expect( @@ -60,12 +69,13 @@ struct BuildMetalTests { "Expected default.metallib to exist at \(metallibPath)" ) +#if os(macOS) // Verify we can load the metal library let device = try #require(MTLCreateSystemDefaultDevice()) let library = try device.makeLibrary(URL: URL(fileURLWithPath: metallibPath.pathString)) #expect(library.functionNames.contains("simpleVertexShader")) +#endif } } -#endif } diff --git a/Tests/FunctionalTests/ModuleMapTests.swift b/Tests/FunctionalTests/ModuleMapTests.swift index 94d72a6ac3a..375ff6b716b 100644 --- a/Tests/FunctionalTests/ModuleMapTests.swift +++ b/Tests/FunctionalTests/ModuleMapTests.swift @@ -2,7 +2,7 @@ // // This source file is part of the Swift open source project // -// Copyright (c) 2014-2024 Apple Inc. and the Swift project authors +// Copyright (c) 2014-2026 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 @@ -10,25 +10,37 @@ // //===----------------------------------------------------------------------===// +import Foundation + import Basics import Commands import PackageModel import _InternalTestSupport import Workspace -import XCTest +import Testing + +import struct SPMBuildCore.BuildSystemProvider -final class ModuleMapsTestCase: XCTestCase { - private func fixtureXCTest( +@Suite( + .serialized, // crash occurs when executed in parallel. needs investigation + .tags( + .FunctionalArea.ModuleMaps, + ), +) +struct ModuleMapsTestCase { + private func localFixture( name: String, cModuleName: String, rootpkg: String, + buildSystem: BuildSystemProvider.Kind, + config: BuildConfiguration, body: @escaping (AbsolutePath, [String]) async throws -> Void ) async throws { - try await _InternalTestSupport.fixtureXCTest(name: name) { fixturePath in + try await fixture(name: name) { fixturePath in let input = fixturePath.appending(components: cModuleName, "C", "foo.c") - let triple = try UserToolchain.default.targetTriple - let outdir = fixturePath.appending(components: rootpkg, ".build", triple.platformBuildPathComponent, "debug") + let outdir = try fixturePath.appending(components: [rootpkg] + buildSystem.binPath(for: config)) try makeDirectories(outdir) + let triple = try UserToolchain.default.targetTriple let output = outdir.appending("libfoo\(triple.dynamicLibraryExtension)") try await AsyncProcess.checkNonZeroExit(args: executableName("clang"), "-shared", input.pathString, "-o", output.pathString) @@ -41,43 +53,70 @@ final class ModuleMapsTestCase: XCTestCase { } } - func testDirectDependency() async throws { - try XCTSkipOnWindows(because: "fails to build on windows (maybe not supported?)") - try await fixtureXCTest(name: "ModuleMaps/Direct", cModuleName: "CFoo", rootpkg: "App") { fixturePath, Xld in - await XCTAssertBuilds( - fixturePath.appending("App"), - Xld: Xld, - buildSystem: .native, - ) + @Test( + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func directDependency( + buildData: BuildData, + ) async throws { + let configuration = buildData.config + let buildSystem = buildData.buildSystem + try await withKnownIssue(isIntermittent: true) { + try await localFixture( + name: "ModuleMaps/Direct", + cModuleName: "CFoo", + rootpkg: "App", + buildSystem: buildSystem, + config: configuration, + ) { fixturePath, Xld in + try await executeSwiftBuild( + fixturePath.appending("App"), + configuration: configuration, + Xld: Xld, + buildSystem: buildSystem, + ) - let triple = try UserToolchain.default.targetTriple - let targetPath = fixturePath.appending(components: "App", ".build", triple.platformBuildPathComponent) - let debugout = try await AsyncProcess.checkNonZeroExit( - args: targetPath.appending(components: "debug", "App").pathString - ) - XCTAssertEqual(debugout, "123\n") - let releaseout = try await AsyncProcess.checkNonZeroExit( - args: targetPath.appending(components: "release", "App").pathString - ) - XCTAssertEqual(releaseout, "123\n") + let executable = try fixturePath.appending(components: ["App"] + buildSystem.binPath(for: configuration) + ["App"]) + let releaseout = try await AsyncProcess.checkNonZeroExit( + args: executable.pathString + ) + #expect(releaseout == "123\n") + } + } when: { + ProcessInfo.hostOperatingSystem == .windows + || (buildSystem == .swiftbuild && configuration == .release) } } - func testTransitiveDependency() async throws { - try XCTSkipOnWindows(because: "fails to build on windows (maybe not supported?)") - try await fixtureXCTest(name: "ModuleMaps/Transitive", cModuleName: "packageD", rootpkg: "packageA") { fixturePath, Xld in - await XCTAssertBuilds( - fixturePath.appending("packageA"), - Xld: Xld, - buildSystem: .native, - ) - - func verify(_ conf: String) async throws { - let triple = try UserToolchain.default.targetTriple + @Test( + .serialized, // crash occurs when executed in parallel. needs investigation + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func transitiveDependency( + buildData: BuildData, + ) async throws { + let configuration = buildData.config + let buildSystem = buildData.buildSystem + try await withKnownIssue(isIntermittent: true) { + try await localFixture( + name: "ModuleMaps/Transitive", + cModuleName: "packageD", + rootpkg: "packageA", + buildSystem: buildSystem, + config: configuration, + ) { fixturePath, Xld in + try await executeSwiftBuild( + fixturePath.appending("packageA"), + configuration: configuration, + Xld: Xld, + buildSystem: buildSystem, + ) + + let executable = try fixturePath.appending(components: ["packageA"] + buildSystem.binPath(for: configuration) + ["packageA"]) let out = try await AsyncProcess.checkNonZeroExit( - args: fixturePath.appending(components: "packageA", ".build", triple.platformBuildPathComponent, conf, "packageA").pathString + args: executable.pathString ) - XCTAssertEqual(out, """ + #expect(out == """ calling Y.bar() Y.bar() called X.foo() called @@ -85,9 +124,9 @@ final class ModuleMapsTestCase: XCTestCase { """) } - - try await verify("debug") - try await verify("release") + } when: { + ProcessInfo.hostOperatingSystem == .windows + || (buildSystem == .swiftbuild && configuration == .release) } } } diff --git a/Tests/FunctionalTests/ResourcesTests.swift b/Tests/FunctionalTests/ResourcesTests.swift index 0d5eeae6a22..a0a4e9bbe71 100644 --- a/Tests/FunctionalTests/ResourcesTests.swift +++ b/Tests/FunctionalTests/ResourcesTests.swift @@ -2,59 +2,86 @@ // // This source file is part of the Swift open source project // -// Copyright (c) 2014-2017 Apple Inc. and the Swift project authors +// Copyright (c) 2014-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 the list of Swift project authors // //===----------------------------------------------------------------------===// +import Foundation import Basics import PackageModel import _InternalTestSupport -import XCTest - -final class ResourcesTests: XCTestCase { - func testSimpleResources() async throws { - try XCTSkipOnWindows( - because: """ - Invalid path. Possibly related to https://github.com/swiftlang/swift-package-manager/issues/8511 or https://github.com/swiftlang/swift-package-manager/issues/8602 - """, - skipPlatformCi: true, - ) - - try await fixtureXCTest(name: "Resources/Simple") { fixturePath in - var executables = ["SwiftyResource"] +import Testing - // Objective-C module requires macOS - #if os(macOS) - executables.append("SeaResource") - executables.append("CPPResource") - #endif +@Suite( + .tags( + .TestSize.large, + .FunctionalArea.Resources, + ), + ) - for execName in executables { - let (output, _) = try await executeSwiftRun( - fixturePath, - execName, - buildSystem: .native, - ) - XCTAssertTrue(output.contains("foo"), output) +struct ResourcesTests{ + @Test( + .IssueWindowsRelativePathAssert, + .IssueWindowsPathTestsFailures, + .tags( + .Feature.Command.Run, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func simpleResources( + buildData: BuildData, + ) async throws { + try await withKnownIssue(isIntermittent: true) { + try await fixture(name: "Resources/Simple") { fixturePath in + var executables = ["SwiftyResource"] + + // Objective-C module requires macOS + #if os(macOS) + executables.append("SeaResource") + executables.append("CPPResource") + #endif + + for execName in executables { + let (output, _) = try await executeSwiftRun( + fixturePath, + execName, + configuration: buildData.config, + buildSystem: buildData.buildSystem, + ) + #expect(output.contains("foo")) + } } + } when: { + ProcessInfo.hostOperatingSystem == .windows } } - func testLocalizedResources() async throws { - try await fixtureXCTest(name: "Resources/Localized") { fixturePath in + @Test( + .tags( + .Feature.Command.Build, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func localizedResources( + buildData: BuildData + ) async throws { + let configuration = buildData.config + let buildSystem = buildData.buildSystem + try await fixture(name: "Resources/Localized") { fixturePath in try await executeSwiftBuild( fixturePath, - buildSystem: .native, + configuration: configuration, + buildSystem: buildSystem, ) - let exec = AbsolutePath(".build/debug/exe", relativeTo: fixturePath) + let exec = try fixturePath.appending(components: buildSystem.binPath(for: configuration) + [executableName("exe")]) // Note: Source from LANG and -AppleLanguages on command line for Linux resources let output = try await AsyncProcess.checkNonZeroExit(args: exec.pathString, "-AppleLanguages", "(en_US)").withSwiftLineEnding - XCTAssertEqual(output, """ + #expect(output == """ ¡Hola Mundo! Hallo Welt! Bonjour le monde ! @@ -63,23 +90,43 @@ final class ResourcesTests: XCTestCase { } } - func testResourcesInMixedClangPackage() async throws { - #if !os(macOS) - // Running swift-test fixtures on linux is not yet possible. - try XCTSkipIf(true, "test is only supported on macOS") - #endif - - try await fixtureXCTest(name: "Resources/Simple") { fixturePath in - await XCTAssertBuilds( + @Test( + // .requireHostOS(.macOS), // Test was originally only enabled on macOS + .skipHostOS(.linux), // currently failing on Ubuntu + .tags( + .Feature.Command.Build, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func resourcesInMixedClangPackage( + buildData: BuildData, + ) async throws { + // #if !os(macOS) + // // Running swift-test fixtures on linux is not yet possible. + // try XCTSkipIf(true, "test is only supported on macOS") + // #endif + try await fixture(name: "Resources/Simple") { fixturePath in + try await executeSwiftBuild( fixturePath, + configuration: buildData.config, extraArgs: ["--target", "MixedClangResource"], - buildSystem: .native, + buildSystem: buildData.buildSystem, ) } } - func testMovedBinaryResources() async throws { - try await fixtureXCTest(name: "Resources/Moved") { fixturePath in + @Test( + .tags( + .Feature.Command.Build, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func movedBinaryResources( + buildData: BuildData, + ) async throws { + let configuration = buildData.config + let buildSystem = buildData.buildSystem + try await fixture(name: "Resources/Moved") { fixturePath in var executables = ["SwiftyResource"] // Objective-C module requires macOS @@ -90,19 +137,18 @@ final class ResourcesTests: XCTestCase { let binPath = try AbsolutePath(validating: await executeSwiftBuild( fixturePath, - configuration: .release, + configuration: configuration, extraArgs: ["--show-bin-path"], - buildSystem: .native, - ).stdout - .trimmingCharacters(in: .whitespacesAndNewlines) + buildSystem: buildSystem, + ).stdout.trimmingCharacters(in: .whitespacesAndNewlines) ) for execName in executables { _ = try await executeSwiftBuild( fixturePath, - configuration: .release, + configuration: configuration, extraArgs: ["--product", execName], - buildSystem: .native, + buildSystem: buildSystem, ) try await withTemporaryDirectory(prefix: execName) { tmpDirPath in @@ -122,114 +168,166 @@ final class ResourcesTests: XCTestCase { .forEach { try localFileSystem.move(from: binPath.appending(component: $0), to: tmpDirPath.appending(component: $0)) } // Run the binary let output = try await AsyncProcess.checkNonZeroExit(args: destBinPath.pathString) - XCTAssertMatch(output, .contains("foo")) + #expect(output.contains("foo")) } } } } - func testSwiftResourceAccessorDoesNotCauseInconsistentImportWarning() async throws { - try XCTSkipOnWindows(because: "fails to build, need investigation") - try await fixtureXCTest(name: "Resources/FoundationlessClient/UtilsWithFoundationPkg") { fixturePath in - await XCTAssertBuilds( + @Test( + .tags( + .Feature.Command.Build, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func swiftResourceAccessorDoesNotCauseInconsistentImportWarning( + buildData: BuildData, + ) async throws { + // try XCTSkipOnWindows(because: "fails to build, need investigation") + try await fixture(name: "Resources/FoundationlessClient/UtilsWithFoundationPkg") { fixturePath in + try await executeSwiftBuild( fixturePath, + configuration: buildData.config, Xswiftc: ["-warnings-as-errors"], - buildSystem: .native, + buildSystem: buildData.buildSystem, ) } } - func testResourceBundleInClangPackageWhenRunningSwiftTest() async throws { - #if !os(macOS) - // Running swift-test fixtures on linux is not yet possible. - try XCTSkipIf(true, "test is only supported on macOS") - #endif + @Test( + .tags( + .Feature.Command.Test, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func resourceBundleInClangPackageWhenRunningSwiftTest( + buildData: BuildData, + ) async throws { + // #if !os(macOS) + // // Running swift-test fixtures on linux is not yet possible. + // try XCTSkipIf(true, "test is only supported on macOS") + // #endif - try await fixtureXCTest(name: "Resources/Simple") { fixturePath in - await XCTAssertSwiftTest( + try await fixture(name: "Resources/Simple") { fixturePath in + try await executeSwiftTest( fixturePath, + configuration: buildData.config, extraArgs: ["--filter", "ClangResourceTests"], - buildSystem: .native, + buildSystem: buildData.buildSystem, ) } } - func testResourcesEmbeddedInCode() async throws { - try await fixtureXCTest(name: "Resources/EmbedInCodeSimple") { fixturePath in - let execPath = fixturePath.appending(components: ".build", "debug", "EmbedInCodeSimple") - try await executeSwiftBuild( - fixturePath, - buildSystem: .native, - ) - let result = try await AsyncProcess.checkNonZeroExit(args: execPath.pathString) - XCTAssertMatch(result, .contains("hello world")) - let resourcePath = fixturePath.appending( - components: "Sources", "EmbedInCodeSimple", "best.txt") - - // Check incremental builds - for i in 0..<2 { - let content = "Hi there \(i)!" - // Update the resource file. - try localFileSystem.writeFileContents(resourcePath, string: content) + @Test( + .serialized, // crash occurs when executed in parallel. needs investigation + .issue("https://github.com/swiftlang/swift-package-manager/issues/9528", relationship: .defect), + .tags( + .Feature.Command.Build, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func resourcesEmbeddedInCode( + buildData: BuildData, + ) async throws { + let configuration = buildData.config + let buildSystem = buildData.buildSystem + try await withKnownIssue { + try await fixture(name: "Resources/EmbedInCodeSimple") { fixturePath in + let execPath = try fixturePath.appending(components: buildSystem.binPath(for: configuration) + [executableName("EmbedInCodeSimple")]) try await executeSwiftBuild( fixturePath, - buildSystem: .native, + configuration: configuration, + buildSystem: buildSystem, ) - // Run the executable again. - let result2 = try await AsyncProcess.checkNonZeroExit(args: execPath.pathString) - XCTAssertMatch(result2, .contains("\(content)")) + let result = try await AsyncProcess.checkNonZeroExit(args: execPath.pathString) + #expect(result.contains("hello world")) + let resourcePath = fixturePath.appending( + components: "Sources", "EmbedInCodeSimple", "best.txt") + + // Check incremental builds + for i in 0..<2 { + let content = "Hi there \(i)!" + // Update the resource file. + try localFileSystem.writeFileContents(resourcePath, string: content) + try await executeSwiftBuild( + fixturePath, + configuration: configuration, + buildSystem: buildSystem, + ) + // Run the executable again. + let result2 = try await AsyncProcess.checkNonZeroExit(args: execPath.pathString) + #expect(result2.contains("\(content)")) + } } + } when: { + buildSystem == .swiftbuild } } - func testResourcesOutsideOfTargetCanBeIncluded() async throws { - try await testWithTemporaryDirectory { tmpPath in - let packageDir = tmpPath.appending(components: "MyPackage") - - let manifestFile = packageDir.appending("Package.swift") - try localFileSystem.createDirectory(manifestFile.parentDirectory, recursive: true) - try localFileSystem.writeFileContents( - manifestFile, - string: """ - // swift-tools-version: 6.0 - import PackageDescription - let package = Package(name: "MyPackage", - targets: [ - .executableTarget( - name: "exec", - resources: [.copy("../resources")] - ) - ]) + @Test( + .serialized, // crash occurs when executed in parallel. needs investigation + .tags( + .Feature.Command.Test, + ), + arguments: getBuildData(for: SupportedBuildSystemOnAllPlatforms), + ) + func resourcesOutsideOfTargetCanBeIncluded( + buildData: BuildData, + ) async throws { + let configuration = buildData.config + let buildSystem = buildData.buildSystem + try await withKnownIssue { + try await testWithTemporaryDirectory { tmpPath in + let packageDir = tmpPath.appending(components: "MyPackage") + + let manifestFile = packageDir.appending("Package.swift") + try localFileSystem.createDirectory(manifestFile.parentDirectory, recursive: true) + try localFileSystem.writeFileContents( + manifestFile, + string: """ + // swift-tools-version: 6.0 + import PackageDescription + let package = Package(name: "MyPackage", + targets: [ + .executableTarget( + name: "exec", + resources: [.copy("../resources")] + ) + ]) + """) + + let targetSourceFile = packageDir.appending(components: "Sources", "exec", "main.swift") + try localFileSystem.createDirectory(targetSourceFile.parentDirectory, recursive: true) + try localFileSystem.writeFileContents(targetSourceFile, string: """ + import Foundation + print(Bundle.module.resourcePath ?? "") """) - let targetSourceFile = packageDir.appending(components: "Sources", "exec", "main.swift") - try localFileSystem.createDirectory(targetSourceFile.parentDirectory, recursive: true) - try localFileSystem.writeFileContents(targetSourceFile, string: """ - import Foundation - print(Bundle.module.resourcePath ?? "") - """) - - let resource = packageDir.appending(components: "Sources", "resources", "best.txt") - try localFileSystem.createDirectory(resource.parentDirectory, recursive: true) - try localFileSystem.writeFileContents(resource, string: "best") - - let (_, stderr) = try await executeSwiftBuild( - packageDir, - env: ["SWIFT_DRIVER_SWIFTSCAN_LIB" : "/this/is/a/bad/path"], - buildSystem: .native, - ) - // Filter some unrelated output that could show up on stderr. - let filteredStderr = stderr.components(separatedBy: "\n").filter { !$0.contains("[logging]") } - .filter { !$0.contains("Unable to locate libSwiftScan") }.joined(separator: "\n") - XCTAssertEqual(filteredStderr, "", "unexpectedly received error output: \(stderr)") - - let builtProductsDir = packageDir.appending(components: [".build", "debug"]) - // On Apple platforms, it's going to be `.bundle` and elsewhere `.resources`. - let potentialResourceBundleName = try XCTUnwrap(localFileSystem.getDirectoryContents(builtProductsDir).filter { $0.hasPrefix("MyPackage_exec.") }.first) - let resourcePath = builtProductsDir.appending(components: [potentialResourceBundleName, "resources", "best.txt"]) - XCTAssertTrue(localFileSystem.exists(resourcePath), "resource file wasn't copied by the build") - let contents = try String(contentsOfFile: resourcePath.pathString) - XCTAssertEqual(contents, "best", "unexpected resource contents: \(contents)") + let resource = packageDir.appending(components: "Sources", "resources", "best.txt") + try localFileSystem.createDirectory(resource.parentDirectory, recursive: true) + try localFileSystem.writeFileContents(resource, string: "best") + + let (_, stderr) = try await executeSwiftBuild( + packageDir, + configuration: configuration, + env: ["SWIFT_DRIVER_SWIFTSCAN_LIB" : "/this/is/a/bad/path"], + buildSystem: buildSystem, + ) + // Filter some unrelated output that could show up on stderr. + let filteredStderr = stderr.components(separatedBy: "\n").filter { !$0.contains("[logging]") } + .filter { !$0.contains("Unable to locate libSwiftScan") }.joined(separator: "\n") + #expect(filteredStderr == "", "unexpectedly received error output: \(stderr)") + + let builtProductsDir = try packageDir.appending(components: buildSystem.binPath(for: configuration)) + // On Apple platforms, it's going to be `.bundle` and elsewhere `.resources`. + let potentialResourceBundleName = try #require(localFileSystem.getDirectoryContents(builtProductsDir).filter { $0.hasPrefix("MyPackage_exec.") }.first) + let resourcePath = builtProductsDir.appending(components: [potentialResourceBundleName, "resources", "best.txt"]) + #expect(localFileSystem.exists(resourcePath), "resource file wasn't copied by the build") + let contents = try String(contentsOfFile: resourcePath.pathString) + #expect(contents == "best", "unexpected resource contents: \(contents)") + } + } when: { + buildSystem == .swiftbuild } } }