Disable propagation of non embeddable bundles.

This change disables the test_host attribute from
propagating its dependency as an embedded bundle.
In bazel, tests depend on their test host, but
from Xcode perspective, test hosts contain the
embedded bundle.

This fixes an issue where Tulsi would overwrite
the test host after the tests were unpacked inside
of it, when running tests for macOS..

--
PiperOrigin-RevId: 178678081
MOS_MIGRATED_REVID=178678081
diff --git a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
index 010da47..c532e96 100644
--- a/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
+++ b/src/TulsiGenerator/Bazel/tulsi/tulsi_aspects.bzl
@@ -40,6 +40,15 @@
     'xctest_app',
 ]
 
+# These are attributes that contain bundles but should not be considered as
+# embedded bundles. For example, test bundles depend on app bundles
+# to be test hosts in bazel semantics, but in reality, Xcode treats the test
+# bundles as an embedded bundle of the app.
+_TULSI_NON_EMBEDDEDABLE_ATTRS = [
+    'test_host',
+    'xctest_app',
+]
+
 # List of all attributes whose contents should resolve to "support" files; files
 # that are used by Bazel to build but do not need special handling in the
 # generated Xcode project. For example, Info.plist and entitlements files.
@@ -704,9 +713,11 @@
       if hasattr(dep, 'tulsi_generated_files'):
         tulsi_generated_files += dep.tulsi_generated_files
 
-      dep_bundle_info = _collect_bundle_info(dep)
-      if dep_bundle_info:
-        embedded_bundles += dep_bundle_info
+      # Retrieve the bundle info for embeddable attributes.
+      if attr_name not in _TULSI_NON_EMBEDDEDABLE_ATTRS:
+        dep_bundle_info = _collect_bundle_info(dep)
+        if dep_bundle_info:
+          embedded_bundles += dep_bundle_info
       if hasattr(dep, 'transitive_embedded_bundles'):
         embedded_bundles += dep.transitive_embedded_bundles