OSDN Git Service

Update run-tests script/dependencies to use -testdex jars.
authorNicolas Geoffray <ngeoffray@google.com>
Wed, 1 Mar 2017 10:03:08 +0000 (10:03 +0000)
committerNicolas Geoffray <ngeoffray@google.com>
Wed, 1 Mar 2017 11:42:35 +0000 (11:42 +0000)
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

test/Android.run-test.mk
test/etc/run-test-jar

index b575d55..bfb04a4 100644 (file)
@@ -812,6 +812,12 @@ endif
 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 := \
index 99926aa..161aa23 100755 (executable)
@@ -376,10 +376,8 @@ if [ "$HAVE_IMAGE" = "n" ]; then
         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"