Skip to content

Commit d57f3a3

Browse files
authored
Reverts change for test targets and softens warning (#478)
* Revert "Test targets emit incorrect 'The ENABLE_APP_SANDBOX build setting is set to NO, but is set to YES in your entitlements file.' warning (#433)" This reverts commit 9ad44f1. * Removes app sandbox mismatch warning in some cases (rdar://150338157)
1 parent 82cc837 commit d57f3a3

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

Sources/SWBCore/SpecImplementations/Tools/ProductPackaging.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,9 @@ private extension ProductPackagingToolSpec {
228228
.init(behavior: .note, location: entitlementsLocation, data: .init("To enable '\(buildSettingName)', remove the entitlement from your entitlements file.")),
229229
.init(behavior: .note, location: .buildSettings(names: [buildSettingName]), data: .init("To disable '\(buildSettingName)', remove the entitlement from your entitlements file and disable '\(buildSettingName)' in build settings."))
230230
]
231-
} else {
232-
message = "The '\(buildSettingName)' build setting is set to '\(buildSettingValue)', but entitlement '\(entitlement)' is set to '\(entitlementValue ? "YES" : "NO")' in your entitlements file."
233-
childDiagnostics = [
234-
.init(behavior: .note, location: .buildSettings(names: [buildSettingName]), data: .init("To enable '\(buildSettingName)', remove the entitlement from your entitlements file, and enable '\(buildSettingName)' in build settings.")),
235-
.init(behavior: .note, location: entitlementsLocation, data: .init("To disable '\(buildSettingName)', remove the entitlement from your entitlements file."))
236-
]
237-
}
238231

239-
delegate.warning(message, childDiagnostics: childDiagnostics)
232+
delegate.warning(message, childDiagnostics: childDiagnostics)
233+
}
240234
}
241235
default:
242236
break

Sources/SWBUniversalPlatform/Specs/ProductTypes.xcspec

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,6 @@
299299
INSTALL_PATH = "$(INSTALL_PATH_XCTRUNNER_$(USES_XCTRUNNER:default=NO))";
300300
INSTALL_PATH_XCTRUNNER_YES = "$(DEFAULT_TEST_RUNNER_APP_INSTALL_PATH)";
301301
INSTALL_PATH_XCTRUNNER_NO = "$(DEFAULT_TEST_BUNDLE_INSTALL_PATH)";
302-
ENABLE_APP_SANDBOX = "$(USES_XCTRUNNER)";
303-
ENABLE_OUTGOING_NETWORK_CONNECTIONS = "$(USES_XCTRUNNER)";
304302

305303
ENTITLEMENTS_REQUIRED = NO;
306304

Tests/SWBBuildSystemTests/EntitlementsBuildOperationTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,6 @@ fileprivate struct EntitlementsBuildOperationTests: CoreBasedTests {
427427
], expectedWarnings: SWBFeatureFlag.enableAppSandboxConflictingValuesEmitsWarning.value ? [
428428
"The \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\' build setting is set to \'YES\', but entitlement \'com.apple.security.device.audio-input\' is set to \'NO\' in your entitlements file.\nTo enable \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\', remove the entitlement from your entitlements file.\nTo disable \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\', remove the entitlement from your entitlements file and disable \'ENABLE_RESOURCE_ACCESS_AUDIO_INPUT\' in build settings. (in target \'App\' from project \'aProject\')",
429429
"The \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\' build setting is set to \'readOnly\', but entitlement \'com.apple.security.assets.movies.read-only\' is set to \'NO\' in your entitlements file.\nTo enable \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\', remove the entitlement from your entitlements file.\nTo disable \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\', remove the entitlement from your entitlements file and disable \'ENABLE_FILE_ACCESS_MOVIES_FOLDER\' in build settings. (in target \'App\' from project \'aProject\')",
430-
"The \'RUNTIME_EXCEPTION_ALLOW_JIT\' build setting is set to \'NO\', but entitlement \'com.apple.security.cs.allow-jit\' is set to \'YES\' in your entitlements file.\nTo enable \'RUNTIME_EXCEPTION_ALLOW_JIT\', remove the entitlement from your entitlements file, and enable \'RUNTIME_EXCEPTION_ALLOW_JIT\' in build settings.\nTo disable \'RUNTIME_EXCEPTION_ALLOW_JIT\', remove the entitlement from your entitlements file. (in target \'App\' from project \'aProject\')"
431430
] : nil
432431
)
433432

Tests/SWBTaskConstructionTests/CodeSignTaskConstructionTests.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,11 +832,7 @@ fileprivate struct CodeSignTaskConstructionTests: CoreBasedTests {
832832

833833
// When build setting and entitlement values disagree, we expect diagnostics
834834
try await results(action: .build, overrides: ["ENABLE_APP_SANDBOX":"NO"], appSandboxEntitlementValueOverride: true) { results in
835-
results.checkWarning(
836-
.equal(
837-
"The \'ENABLE_APP_SANDBOX\' build setting is set to \'NO\', but entitlement \'com.apple.security.app-sandbox\' is set to \'YES\' in your entitlements file.\nTo enable \'ENABLE_APP_SANDBOX\', remove the entitlement from your entitlements file, and enable \'ENABLE_APP_SANDBOX\' in build settings.\n/tmp/aWorkspace/aProject/Entitlements.plist: To disable \'ENABLE_APP_SANDBOX\', remove the entitlement from your entitlements file. (in target \'App\' from project \'aProject\')"
838-
)
839-
)
835+
results.checkNoDiagnostics()
840836
}
841837
}
842838

0 commit comments

Comments
 (0)