Fixes for runtest

- No need to include cts/CtsBuild.mk, because that is included by the
  core build system.

- Include the tradefed-prebuilt.jar on the classpath when running
  host side tests.

- Update some of test_defs that have changed. Remove suites that
  have been deleted.

Change-Id: Ie2845db7f209ad4ccb881d2ad47b9415c9f518a4
diff --git a/testrunner/runtest.py b/testrunner/runtest.py
index 5730928..df7f66a 100755
--- a/testrunner/runtest.py
+++ b/testrunner/runtest.py
@@ -234,8 +234,6 @@
     self._DoFullBuild(tests)
 
     target_set = []
-    if self._IsCtsTests(tests):
-      target_set.append("cts/CtsBuild.mk")
 
     extra_args_set = []
     for test_suite in tests:
diff --git a/testrunner/test_defs.xml b/testrunner/test_defs.xml
index ed1934e..4de369b 100644
--- a/testrunner/test_defs.xml
+++ b/testrunner/test_defs.xml
@@ -258,12 +258,6 @@
     package="android.tests.sigtest.tests"
     suite="cts" />
 
-<test name="cts-apidemos"
-    build_path="cts/tests/ApiDemosReferenceTest"
-    package="android.apidemos.cts"
-    coverage_target="ApiDemos"
-    suite="cts" />
-
 <test name="cts-app"
     build_path="cts/tests/tests/app"
     package="com.android.cts.app"
@@ -324,7 +318,7 @@
 <test name="cts-net"
     build_path="cts/tests/tests/net"
     package="com.android.cts.net"
-    runner="android.test.InstrumentationCtsTestRunner"
+    runner="android.test.InstrumentationTestRunner"
     coverage_target="framework"
     suite="cts" />
 
@@ -335,36 +329,6 @@
     coverage_target="framework"
     suite="cts" />
 
-<test name="cts-perf1"
-    build_path="cts/tests/tests/performance"
-    package="com.android.cts.performance"
-    runner="android.test.InstrumentationCtsTestRunner"
-    suite="cts" />
-
-<test name="cts-perf2"
-    build_path="cts/tests/tests/performance2"
-    package="com.android.cts.performance2"
-    runner="android.test.InstrumentationCtsTestRunner"
-    suite="cts" />
-
-<test name="cts-perf3"
-    build_path="cts/tests/tests/performance3"
-    package="com.android.cts.performance3"
-    runner="android.test.InstrumentationCtsTestRunner"
-    suite="cts" />
-
-<test name="cts-perf4"
-    build_path="cts/tests/tests/performance4"
-    package="com.android.cts.performance4"
-    runner="android.test.InstrumentationCtsTestRunner"
-    suite="cts" />
-
-<test name="cts-perf5"
-    build_path="cts/tests/tests/performance5"
-    package="com.android.cts.performance5"
-    runner="android.test.InstrumentationCtsTestRunner"
-    suite="cts" />
-
 <test name="cts-provider"
     build_path="cts/tests/tests/provider"
     package="com.android.cts.provider"
@@ -572,7 +536,7 @@
 
 <!-- host java tests -->
 <test-host name="cts-appsecurity"
-    build_path="cts/tests/appsecurity-tests"
+    build_path="cts/hostsidetests/appsecurity"
     class="com.android.cts.appsecurity.AppSecurityTests"
     jar_name="CtsAppSecurityTests.jar"
     suite="cts" />
diff --git a/testrunner/test_defs/host_test.py b/testrunner/test_defs/host_test.py
index 273042a..ca65c2a 100644
--- a/testrunner/test_defs/host_test.py
+++ b/testrunner/test_defs/host_test.py
@@ -32,7 +32,8 @@
   _JUNIT_JAR_NAME = "junit.jar"
   _HOSTTESTLIB_NAME = "hosttestlib.jar"
   _DDMLIB_NAME = "ddmlib-prebuilt.jar"
-  _lib_names = [_JUNIT_JAR_NAME, _HOSTTESTLIB_NAME, _DDMLIB_NAME]
+  _TRADEFED_NAME = "tradefed-prebuilt.jar"
+  _lib_names = [_JUNIT_JAR_NAME, _HOSTTESTLIB_NAME, _DDMLIB_NAME, _TRADEFED_NAME]
 
   _JUNIT_BUILD_PATH = os.path.join("external", "junit")
   _HOSTTESTLIB_BUILD_PATH = os.path.join("development", "tools", "hosttestlib")