OSDN Git Service

Fix libart tests on target
authorDimitry Ivanov <dimitry@google.com>
Fri, 6 May 2016 00:24:28 +0000 (17:24 -0700)
committerDimitry Ivanov <dimitry@google.com>
Fri, 6 May 2016 18:48:02 +0000 (11:48 -0700)
1. Add libart/d.so to the list of additional public libraries
2. Fix java.library.path to include /system/lib(64)? for tests
   run by dalvikvm

Bug: http://b/28449304
Change-Id: I11f2dc22e445389160d6f7ed6743bb9664cf3745

test/etc/run-test-jar
test/run-test

index 01114b7..aa45d40 100755 (executable)
@@ -473,11 +473,14 @@ if [ "$HOST" = "n" ]; then
       LD_LIBRARY_PATH=$ANDROID_ROOT/$LIBRARY_DIRECTORY
     fi
 
+    PUBLIC_LIBS=libart.so:libartd.so
+
     # Create a script with the command. The command can get longer than the longest
     # allowed adb command and there is no way to get the exit status from a adb shell
     # command.
     cmdline="cd $DEX_LOCATION && \
              export ANDROID_DATA=$DEX_LOCATION && \
+             export ANDROID_ADDITIONAL_PUBLIC_LIBRARIES=$PUBLIC_LIBS && \
              export DEX_LOCATION=$DEX_LOCATION && \
              export ANDROID_ROOT=$ANDROID_ROOT && \
              $mkdir_cmdline && \
index 424c54f..bfb1709 100755 (executable)
@@ -467,7 +467,7 @@ elif [ "$runtime" = "art" ]; then
         run_args="${run_args} --runtime-option -Djava.library.path=${ANDROID_HOST_OUT}/lib${suffix64}"
     else
         guess_target_arch_name
-        run_args="${run_args} --runtime-option -Djava.library.path=/data/art-test/${target_arch_name}"
+        run_args="${run_args} --runtime-option -Djava.library.path=/data/art-test/${target_arch_name}:/system/lib${suffix64}"
         run_args="${run_args} --boot /data/art-test/core${image_suffix}${pic_image_suffix}${multi_image_suffix}.art"
     fi
     if [ "$relocate" = "yes" ]; then