Extract logging out of Timer class

* Adds a new Logger class to handle all log-related code not tied to
the Timer objects.

--
PiperOrigin-RevId: 155561019
MOS_MIGRATED_REVID=155561019
diff --git a/src/Tulsi.xcodeproj/project.pbxproj b/src/Tulsi.xcodeproj/project.pbxproj
index 59cfae4..f58266d 100644
--- a/src/Tulsi.xcodeproj/project.pbxproj
+++ b/src/Tulsi.xcodeproj/project.pbxproj
@@ -127,6 +127,7 @@
 		AB18C7AE39198BE26CB112C0 /* HeadlessModeError.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB18C78A05BFF81B82FFE890 /* HeadlessModeError.swift */; };
 		AB18CB663B4A10F9BA45D02F /* TulsiCommandlineParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB18C4E9FB80370FC40B500A /* TulsiCommandlineParser.swift */; };
 		AB18CC4A7B1A308E23A1CE6F /* HeadlessTulsiProjectCreator.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB18CFC29644CD1B3B860056 /* HeadlessTulsiProjectCreator.swift */; };
+		D33C204F1EC108CC00867450 /* tulsi_logging.py in Resources */ = {isa = PBXBuildFile; fileRef = D33C204E1EC108CC00867450 /* tulsi_logging.py */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -319,6 +320,7 @@
 		AB18C78A05BFF81B82FFE890 /* HeadlessModeError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeadlessModeError.swift; sourceTree = "<group>"; };
 		AB18C7D45D34ACB3B8BC1805 /* BazelIntegrationTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BazelIntegrationTestCase.swift; sourceTree = "<group>"; };
 		AB18CFC29644CD1B3B860056 /* HeadlessTulsiProjectCreator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeadlessTulsiProjectCreator.swift; sourceTree = "<group>"; };
+		D33C204E1EC108CC00867450 /* tulsi_logging.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = tulsi_logging.py; sourceTree = "<group>"; };
 		F4469ECE1C5BCA5900BCFAA1 /* TulsiVersion.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = TulsiVersion.xcconfig; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -477,6 +479,7 @@
 			isa = PBXGroup;
 			children = (
 				3D329D0D1C4831EF00DFBD0F /* bazel_build.py */,
+				D33C204E1EC108CC00867450 /* tulsi_logging.py */,
 				3D156AE11C1C8D9C00183439 /* bazel_clean.sh */,
 				3DFB7C4A1C81F78000376760 /* command_line_splitter.sh */,
 			);
@@ -788,6 +791,7 @@
 			files = (
 				2D9DB34A1E5DECA40021EAF4 /* XCTRunner.entitlements in Resources */,
 				3D329D0E1C4831EF00DFBD0F /* bazel_build.py in Resources */,
+				D33C204F1EC108CC00867450 /* tulsi_logging.py in Resources */,
 				3D9926911C29F1410094E098 /* bazel_clean.sh in Resources */,
 				3DFB7C4B1C81F78000376760 /* command_line_splitter.sh in Resources */,
 				3DBEFACD1C2A1F7200119556 /* Localizable.strings in Resources */,
diff --git a/src/TulsiGenerator/Scripts/bazel_build.py b/src/TulsiGenerator/Scripts/bazel_build.py
index c249248..5573928 100755
--- a/src/TulsiGenerator/Scripts/bazel_build.py
+++ b/src/TulsiGenerator/Scripts/bazel_build.py
@@ -31,6 +31,7 @@
 import textwrap
 import time
 import zipfile
+import tulsi_logging
 
 
 def _PrintXcodeWarning(msg):
@@ -46,8 +47,18 @@
 class Timer(object):
   """Simple profiler."""
 
-  def __init__(self, action_name):
+  def __init__(self, action_name, action_id):
+    """Creates a new Timer object.
+
+    Args:
+      action_name: A human-readable action name, shown in the build log.
+      action_id: A machine-readable action identifier, can be used for metrics.
+
+    Returns:
+      A Timer instance.
+    """
     self.action_name = action_name
+    self.action_id = action_id
     self._start = None
 
   def Start(self):
@@ -57,7 +68,7 @@
   def End(self):
     end = time.time()
     seconds = end - self._start
-    print '<*> %s completed in %0.3f ms' % (self.action_name, seconds * 1000)
+    tulsi_logging.Logger().log_action(self.action_name, self.action_id, seconds)
 
 
 class CodesignBundleAttributes(object):
@@ -543,7 +554,7 @@
                             self.platform_name,
                             self.arch,
                             self.main_group_path)
-    timer = Timer('Parsing options').Start()
+    timer = Timer('Parsing options', 'parsing_options').Start()
     message, exit_code = parser.ParseOptions(args[1:])
     timer.End()
     if exit_code:
@@ -563,7 +574,7 @@
     if retval:
       return retval
 
-    timer = Timer('Running Bazel').Start()
+    timer = Timer('Running Bazel', 'running_bazel').Start()
     exit_code, outputs = self._RunBazelAndPatchOutput(command)
     timer.End()
     if exit_code:
@@ -576,20 +587,21 @@
       return exit_code
 
     if parser.install_generated_artifacts:
-      timer = Timer('Installing artifacts').Start()
+      timer = Timer('Installing artifacts', 'installing_artifacts').Start()
       exit_code = self._InstallArtifact(outputs)
       timer.End()
       if exit_code:
         return exit_code
 
       if self.generate_dsym:
-        timer = Timer('Installing DSYM bundles').Start()
+        timer = Timer('Installing DSYM bundles', 'installing_dsym').Start()
         exit_code, dsym_path = self._InstallDSYMBundles(self.built_products_dir)
         timer.End()
         if exit_code:
           return exit_code
         if dsym_path:
-          timer = Timer('Patching DSYM source file paths').Start()
+          timer = Timer('Patching DSYM source file paths',
+                        'patching_dsym').Start()
           exit_code = self._PatchdSYMPaths(dsym_path)
           timer.End()
           if exit_code:
@@ -611,7 +623,7 @@
     # already corrected the paths and use of target.source-map is redundant (and
     # appears to trigger actual problems in Xcode 8.1 betas).
     if self.xcode_version_major >= 800:
-      timer = Timer('Updating .lldbinit').Start()
+      timer = Timer('Updating .lldbinit', 'updating_lldbinit').Start()
       exit_code = self._UpdateLLDBInit(self.generate_dsym)
       timer.End()
       if exit_code:
@@ -619,7 +631,7 @@
                            exit_code)
 
     if self.code_coverage_enabled:
-      timer = Timer('Patching LLVM covmap').Start()
+      timer = Timer('Patching LLVM covmap', 'patching_llvm_covmap').Start()
       exit_code = self._PatchLLVMCovmapPaths()
       timer.End()
       if exit_code:
@@ -1002,7 +1014,7 @@
     # Note that the tool expects "<type>1", e.g., "binary1" but the env var is
     # of the form "<type>".
     fmt = os.environ.get('INFOPLIST_OUTPUT_FORMAT', 'binary') + '1'
-    timer = Timer('\tUpdating plist').Start()
+    timer = Timer('\tUpdating plist', 'updating_plist').Start()
     command = ['xcrun',
                'plutil',
                '-convert',
@@ -1077,7 +1089,7 @@
     if not self.codesigning_allowed:
       return 0
 
-    timer = Timer('\tSigning ' + bundle_path).Start()
+    timer = Timer('\tSigning ' + bundle_path, 'signing_bundle').Start()
     command = [
         'xcrun',
         'codesign',
@@ -1112,7 +1124,8 @@
       return 800
 
     exit_code = 0
-    timer = Timer('Re-signing injected test host artifacts').Start()
+    timer = Timer('Re-signing injected test host artifacts',
+                  'resigning_test_host').Start()
 
     if self.test_host_binary:
       # For Unit tests, we need to resign the frameworks that Xcode injected
@@ -1210,7 +1223,8 @@
     if cached:
       return cached.Get(attribute)
 
-    timer = Timer('\tExtracting signature for ' + signed_bundle).Start()
+    timer = Timer('\tExtracting signature for ' + signed_bundle,
+                  'extracting_signature').Start()
     output = subprocess.check_output(['xcrun',
                                       'codesign',
                                       '-dvv',
@@ -1305,7 +1319,8 @@
         return 0
 
       timer = Timer(
-          '\tExtracting source paths for ' + self.full_product_name).Start()
+          '\tExtracting source paths for ' + self.full_product_name,
+          'extracting_source_paths').Start()
 
       source_paths = self._ExtractTargetSourcePaths()
       timer.End()
@@ -1516,7 +1531,7 @@
 
 
 if __name__ == '__main__':
-  _timer = Timer('Everything').Start()
+  _timer = Timer('Everything', 'complete_build').Start()
   _exit_code = BazelBuildBridge().Run(sys.argv)
   _timer.End()
   sys.exit(_exit_code)
diff --git a/src/TulsiGenerator/Scripts/tulsi_logging.py b/src/TulsiGenerator/Scripts/tulsi_logging.py
new file mode 100755
index 0000000..9982234
--- /dev/null
+++ b/src/TulsiGenerator/Scripts/tulsi_logging.py
@@ -0,0 +1,24 @@
+# Copyright 2017 The Tulsi Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the 'License');
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an 'AS IS' BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Logging routines used by Tulsi scripts."""
+
+
+class Logger(object):
+  """Tulsi specific logging."""
+
+  def log_action(self, action_name, action_id, seconds):
+    del action_id  # Unused by this logger.
+    # Prints to stdout for display in the Xcode log
+    print '<*> %s completed in %0.3f ms' % (action_name, seconds * 1000)
diff --git a/src/TulsiGenerator/TulsiXcodeProjectGenerator.swift b/src/TulsiGenerator/TulsiXcodeProjectGenerator.swift
index 8b5e38f..9ad62c6 100644
--- a/src/TulsiGenerator/TulsiXcodeProjectGenerator.swift
+++ b/src/TulsiGenerator/TulsiXcodeProjectGenerator.swift
@@ -49,6 +49,7 @@
     let resourceURLs = XcodeProjectGenerator.ResourceSourcePathURLs(
         buildScript: bundle.url(forResource: "bazel_build", withExtension: "py")!,
         cleanScript: bundle.url(forResource: "bazel_clean", withExtension: "sh")!,
+        extraBuildScripts: [bundle.url(forResource: "tulsi_logging", withExtension: "py")!],
         postProcessor: bundle.url(forResource: "post_processor",
                                              withExtension: "",
                                              subdirectory: "Utilities")!,
diff --git a/src/TulsiGenerator/XcodeProjectGenerator.swift b/src/TulsiGenerator/XcodeProjectGenerator.swift
index da8d051..2e67c8b 100644
--- a/src/TulsiGenerator/XcodeProjectGenerator.swift
+++ b/src/TulsiGenerator/XcodeProjectGenerator.swift
@@ -30,6 +30,7 @@
   struct ResourceSourcePathURLs {
     let buildScript: URL  // The script to run on "build" actions.
     let cleanScript: URL  // The script to run on "clean" actions.
+    let extraBuildScripts: [URL] // Any additional scripts to install into the project bundle.
     let postProcessor: URL  // Binary post processor utility.
     let uiRunnerEntitlements: URL  // Entitlements file template for UI Test runner apps.
     let stubInfoPlist: URL  // Stub Info.plist (needed for Xcode 8).
@@ -398,6 +399,8 @@
           buildSettings["TOOLCHAINS"] = swiftToolchain
         }
       }
+
+      buildSettings["TULSI_PROJECT"] = config.projectName
       generator.generateTopLevelBuildConfigurations(buildSettings)
     }
 
@@ -735,6 +738,8 @@
                     (resourceURLs.cleanScript, XcodeProjectGenerator.CleanScript),
                    ],
                    toDirectory: scriptDirectoryURL)
+      installFiles(resourceURLs.extraBuildScripts.map { ($0, $0.lastPathComponent) },
+                   toDirectory: scriptDirectoryURL)
 
       localizedMessageLogger.logProfilingEnd(profilingToken)
     }
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/ComplexSingleProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/ComplexSingleProject.xcodeproj/project.pbxproj
index e182ebc..242d4db 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/ComplexSingleProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/ComplexSingleProject.xcodeproj/project.pbxproj
@@ -1242,6 +1242,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = ComplexSingleProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -1549,6 +1550,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = ComplexSingleProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -1868,6 +1870,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = ComplexSingleProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -2082,6 +2085,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = ComplexSingleProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleProject.xcodeproj/project.pbxproj
index 42601bd..1752d4e 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleProject.xcodeproj/project.pbxproj
@@ -532,6 +532,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -672,6 +673,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -823,6 +825,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -945,6 +948,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleSkylarkProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleSkylarkProject.xcodeproj/project.pbxproj
index 22f2df7..4c9fbfc 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleSkylarkProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SimpleSkylarkProject.xcodeproj/project.pbxproj
@@ -630,6 +630,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleSkylarkProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -806,6 +807,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleSkylarkProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -1000,6 +1002,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleSkylarkProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -1149,6 +1152,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SimpleSkylarkProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj
index ce3e741..2a0b177 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/SwiftProject.xcodeproj/project.pbxproj
@@ -235,6 +235,7 @@
 				SWIFT_VERSION = 3.0;
 				TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SwiftProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -309,6 +310,7 @@
 				SWIFT_VERSION = 3.0;
 				TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SwiftProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -386,6 +388,7 @@
 				SWIFT_VERSION = 3.0;
 				TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SwiftProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -451,6 +454,7 @@
 				SWIFT_VERSION = 3.0;
 				TOOLCHAINS = com.apple.dt.toolchain.XcodeDefault;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = SwiftProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteExplicitXCTestsProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteExplicitXCTestsProject.xcodeproj/project.pbxproj
index 26dbcd1..5299b12 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteExplicitXCTestsProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteExplicitXCTestsProject.xcodeproj/project.pbxproj
@@ -526,6 +526,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteExplicitXCTestsProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -675,6 +676,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteExplicitXCTestsProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -844,6 +846,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteExplicitXCTestsProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -997,6 +1000,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteExplicitXCTestsProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteLocalTaggedTestsProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteLocalTaggedTestsProject.xcodeproj/project.pbxproj
index 79ba9ec..8a5999b 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteLocalTaggedTestsProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteLocalTaggedTestsProject.xcodeproj/project.pbxproj
@@ -387,6 +387,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteLocalTaggedTestsProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -506,6 +507,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteLocalTaggedTestsProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -637,6 +639,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteLocalTaggedTestsProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -757,6 +760,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteLocalTaggedTestsProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteRecursiveTestSuiteProject.xcodeproj/project.pbxproj b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteRecursiveTestSuiteProject.xcodeproj/project.pbxproj
index 20a147f..5cbec8d 100644
--- a/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteRecursiveTestSuiteProject.xcodeproj/project.pbxproj
+++ b/src/TulsiGeneratorIntegrationTests/Resources/GoldenProjects/TestSuiteRecursiveTestSuiteProject.xcodeproj/project.pbxproj
@@ -514,6 +514,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteRecursiveTestSuiteProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -663,6 +664,7 @@
 				ONLY_ACTIVE_ARCH = YES;
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteRecursiveTestSuiteProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
@@ -832,6 +834,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteRecursiveTestSuiteProject;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
 			};
@@ -985,6 +988,7 @@
 				OTHER_LDFLAGS = "-help";
 				SDKROOT = iphoneos;
 				TULSI_BWRS = "${TULSI_WR}/blaze-WORKSPACENAME";
+				TULSI_PROJECT = TestSuiteRecursiveTestSuiteProject;
 				TULSI_USE_DSYM = YES;
 				TULSI_VERSION = 9.99.999.9999;
 				TULSI_WR = "${SRCROOT}/../..";
diff --git a/src/TulsiGeneratorTests/XcodeProjectGeneratorTests.swift b/src/TulsiGeneratorTests/XcodeProjectGeneratorTests.swift
index aa4c4f2..a4ed745 100644
--- a/src/TulsiGeneratorTests/XcodeProjectGeneratorTests.swift
+++ b/src/TulsiGeneratorTests/XcodeProjectGeneratorTests.swift
@@ -36,6 +36,7 @@
   let resourceURLs = XcodeProjectGenerator.ResourceSourcePathURLs(
       buildScript: URL(fileURLWithPath: "/scripts/Build"),
       cleanScript: URL(fileURLWithPath: "/scripts/Clean"),
+      extraBuildScripts: [URL(fileURLWithPath: "/scripts/Logging")],
       postProcessor: URL(fileURLWithPath: "/utils/covmap_patcher"),
       uiRunnerEntitlements: URL(fileURLWithPath: "/generatedProjectResources/XCTRunner.entitlements"),
       stubInfoPlist: URL(fileURLWithPath: "/generatedProjectResources/StubInfoPlist.plist"),