From 709cc21d40ff559411809cf24031bf105883895f Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 12 Dec 2023 11:15:15 -0800 Subject: [PATCH] [Test] Remap test should be guarded by caching feature Update cache path remap test to be correctly guarded by remapping because if toolchain doesn't support caching, the remap will be automatically disabled and remap will not happen. --- Tests/SwiftDriverTests/CachingBuildTests.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/SwiftDriverTests/CachingBuildTests.swift b/Tests/SwiftDriverTests/CachingBuildTests.swift index ad5b632a6..a6d9c9a24 100644 --- a/Tests/SwiftDriverTests/CachingBuildTests.swift +++ b/Tests/SwiftDriverTests/CachingBuildTests.swift @@ -759,6 +759,9 @@ final class CachingBuildTests: XCTestCase { "-scanner-prefix-map", path.description + "=/^tmp", main.nativePathString(escaped: true)] + sdkArgumentsForTesting, env: ProcessEnv.vars) + guard driver.isFeatureSupported(.cache_compile_job) else { + throw XCTSkip("toolchain does not support caching.") + } guard driver.isFrontendArgSupported(.scannerPrefixMap) else { throw XCTSkip("frontend doesn't support prefix map") }