AI 148430: Adding a new CTS test runner that is basically
  a copy of the old one, but resides in android/cts
  and is built and installed as part of the CTS.
  This makes sure we always have the correct test
  runner on a device, so we should see the various
  improvements also on off-the-shelf Cupcake phones.
  BUG=1537738

Automated import of CL 148430
diff --git a/tools/utils/CollectAllTests.java b/tools/utils/CollectAllTests.java
index 5432895..560fdd0 100644
--- a/tools/utils/CollectAllTests.java
+++ b/tools/utils/CollectAllTests.java
@@ -48,7 +48,8 @@
     static final String ATTRIBUTE_RUNNER = "runner";
     static final String ATTRIBUTE_PACKAGE = "appPackageName";
     static final String ATTRIBUTE_NS = "appNameSpace";
-    static final String ATTRIBUTE_TARGET = "target";
+    static final String ATTRIBUTE_TARGET = "targetNameSpace";
+    static final String ATTRIBUTE_TARGET_BINARY = "targetBinaryName";
     static final String ATTRIBUTE_HOST_SIDE_ONLY = "hostSideOnly";
     static final String ATTRIBUTE_JAR_PATH = "jarPath";
 
@@ -87,8 +88,9 @@
 
             if (!packageName.equals(target)) {
                 setAttribute(testPackageElem, ATTRIBUTE_TARGET, target);
-                }
+                setAttribute(testPackageElem, ATTRIBUTE_TARGET_BINARY, target);
             }
+        }
     }
 
     private static String OUTPUTFILE = "";