Update run-tests script/dependencies to use -testdex jars.

run-tests run with --no-image need the dex files in the
bootclasspath to be available. The -testdex jars are guaranteed
unstripped, so use them instead.

This was always broken, but vmarko@ just added a test that
forces --no-image.

bug:24535627
Test: test-art-target

Change-Id: I391573cffd0749d814fd81517e99dfc8f0fd59d5
diff --git a/test/Android.run-test.mk b/test/Android.run-test.mk
index b575d55..bfb04a4 100644
--- a/test/Android.run-test.mk
+++ b/test/Android.run-test.mk
@@ -812,6 +812,12 @@
 TEST_ART_TARGET_SYNC_DEPS += libopenjdkjvmti
 TEST_ART_TARGET_SYNC_DEPS += libopenjdkjvmtid
 
+TEST_ART_TARGET_SYNC_DEPS += $(TARGET_OUT_JAVA_LIBRARIES)/core-libart-testdex.jar
+TEST_ART_TARGET_SYNC_DEPS += $(TARGET_OUT_JAVA_LIBRARIES)/core-oj-testdex.jar
+TEST_ART_TARGET_SYNC_DEPS += $(TARGET_OUT_JAVA_LIBRARIES)/okhttp-testdex.jar
+TEST_ART_TARGET_SYNC_DEPS += $(TARGET_OUT_JAVA_LIBRARIES)/bouncycastle-testdex.jar
+TEST_ART_TARGET_SYNC_DEPS += $(TARGET_OUT_JAVA_LIBRARIES)/conscrypt-testdex.jar
+
 # All tests require the host executables. The tests also depend on the core images, but on
 # specific version depending on the compiler.
 ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 99926aa..161aa23 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -376,10 +376,8 @@
         bpath_suffix="-hostdex"
     else
         framework="${ANDROID_ROOT}/framework"
-        bpath_suffix=""
+        bpath_suffix="-testdex"
     fi
-    # TODO If the target was compiled WITH_DEXPREOPT=true then these tests will
-    # fail since these jar files will be stripped.
     bpath="${framework}/core-libart${bpath_suffix}.jar"
     bpath="${bpath}:${framework}/core-oj${bpath_suffix}.jar"
     bpath="${bpath}:${framework}/conscrypt${bpath_suffix}.jar"