Fix E2E integration tests
PiperOrigin-RevId: 207959324
diff --git a/src/TulsiGenerator/XcodeProjectGenerator.swift b/src/TulsiGenerator/XcodeProjectGenerator.swift
index 9cc72a5..b4691b8 100644
--- a/src/TulsiGenerator/XcodeProjectGenerator.swift
+++ b/src/TulsiGenerator/XcodeProjectGenerator.swift
@@ -112,6 +112,9 @@
/// write a stub value that will be the same regardless of the execution environment.
var redactWorkspaceSymlink = false
+ /// Exposed for testing. Do not attempt to update/install files related to DBGShellCommands.
+ var suppressUpdatingShellCommands = false
+
/// Exposed for testing. Do not modify user defaults.
var suppressModifyingUserDefaults = false
@@ -1105,6 +1108,8 @@
/// Install the latest bazel_cache_reader.
private func updateShellCommands() throws {
+ guard !suppressUpdatingShellCommands else { return }
+
// Construct a URL to ~/Library/Application Support/Tulsi/Scripts.
let supportScriptsAbsoluteURL = fileManager.homeDirectoryForCurrentUser.appendingPathComponent(
XcodeProjectGenerator.SupportScriptsPath, isDirectory: true)
diff --git a/src/TulsiGeneratorIntegrationTests/EndToEndIntegrationTestCase.swift b/src/TulsiGeneratorIntegrationTests/EndToEndIntegrationTestCase.swift
index 8bca3c5..008a0b0 100644
--- a/src/TulsiGeneratorIntegrationTests/EndToEndIntegrationTestCase.swift
+++ b/src/TulsiGeneratorIntegrationTests/EndToEndIntegrationTestCase.swift
@@ -243,8 +243,8 @@
// Bazel built-in preprocessor defines are suppressed in order to prevent any
// environment-dependent variables from mismatching the golden data.
projectGenerator.xcodeProjectGenerator.suppressCompilerDefines = true
- // Don't modify any user defaults.
- projectGenerator.xcodeProjectGenerator.suppressModifyingUserDefaults = true
+ // Don't update shell command utilities.
+ projectGenerator.xcodeProjectGenerator.suppressUpdatingShellCommands = true
// The username is forced to a known value.
projectGenerator.xcodeProjectGenerator.usernameFetcher = { "_TEST_USER_" }
// The workspace symlink is forced to a known value.