diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-12-05 12:12:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-12-05 12:12:49 +0000 |
commit | 7f8f9489c1803fd40f52aec3cda784fe02e78c95 (patch) | |
tree | 9bd92a869485371c2bb94b0300ba554e29daf2db | |
parent | abb3977bf924b923b45ae234a48be739035bbd32 (diff) | |
parent | 70a998c77587712e4bd5348e304bd8a11aa9d8f9 (diff) | |
download | art-7f8f9489c1803fd40f52aec3cda784fe02e78c95.zip art-7f8f9489c1803fd40f52aec3cda784fe02e78c95.tar.gz art-7f8f9489c1803fd40f52aec3cda784fe02e78c95.tar.bz2 |
Merge "Make script suitable for vogar use on device."
-rw-r--r-- | tools/art | 25 | ||||
-rw-r--r-- | tools/libcore_failures.txt | 15 |
2 files changed, 33 insertions, 7 deletions
@@ -1,5 +1,3 @@ -#!/bin/bash -# # Copyright (C) 2011 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +12,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +# This script is used on host and device. It uses a common subset +# shell dialect that should work on the host (e.g. bash), and +# Android (e.g. mksh). + function follow_links() { if [ z"$BASH_SOURCE" != z ]; then file="$BASH_SOURCE" @@ -28,7 +30,8 @@ function follow_links() { } function find_libdir() { - if [ "$(readlink "$ANDROID_ROOT/bin/$DALVIKVM")" = "dalvikvm64" ]; then + # Use realpath instead of readlink because Android does not have a readlink. + if [ "$(realpath "$ANDROID_ROOT/bin/$DALVIKVM")" = "$(realpath "$ANDROID_ROOT/bin/dalvikvm64")" ]; then echo "lib64" else echo "lib" @@ -70,16 +73,22 @@ done PROG_NAME="$(follow_links)" PROG_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" ANDROID_ROOT=$PROG_DIR/.. -ANDROID_DATA=$PWD/android-data$$ LIBDIR=$(find_libdir) LD_LIBRARY_PATH=$ANDROID_ROOT/$LIBDIR - if [ z"$PERF" != z ]; then invoke_with="perf record -o $ANDROID_DATA/perf.data -e cycles:u $invoke_with" fi -mkdir -p $ANDROID_DATA/dalvik-cache/{arm,arm64,x86,x86_64} +DELETE_ANDROID_DATA=false +# If ANDROID_DATA is the system ANDROID_DATA or is not set, use our own, +# and ensure we delete it at the end. +if [ "$ANDROID_DATA" = "/data" ] || [ "$ANDROID_DATA" = "" ]; then + ANDROID_DATA=$PWD/android-data$$ + mkdir -p $ANDROID_DATA/dalvik-cache/{arm,arm64,x86,x86_64} + DELETE_ANDROID_DATA=true +fi + ANDROID_DATA=$ANDROID_DATA \ ANDROID_ROOT=$ANDROID_ROOT \ LD_LIBRARY_PATH=$LD_LIBRARY_PATH \ @@ -97,7 +106,9 @@ if [ z"$PERF" != z ]; then fi echo "Perf data saved in: $ANDROID_DATA/perf.data" else - rm -rf $ANDROID_DATA + if [ "$DELETE_ANDROID_DATA" = "true" ]; then + rm -rf $ANDROID_DATA + fi fi exit $EXIT_STATUS diff --git a/tools/libcore_failures.txt b/tools/libcore_failures.txt index 8eac1d3..febc48c 100644 --- a/tools/libcore_failures.txt +++ b/tools/libcore_failures.txt @@ -11,11 +11,26 @@ { description: "Assert.java differences between vogar and junit.", result: EXEC_FAILED, + modes: [host], name: "libcore.java.math.RunCSVTests#test_csv" }, { description: "Test is currently being updated.", result: EXEC_FAILED, name: "libcore.java.util.OldTimeZoneTest#test_getDisplayNameZILjava_util_Locale" +}, +{ + description: "Differences between vogar and cts in user directory", + result: EXEC_FAILED, + modes: [device], + name: "libcore.java.lang.SystemTest#testSystemProperties_mutable" +}, +{ + description: "Differences between vogar and cts", + result: EXEC_FAILED, + modes: [device], + names: ["libcore.java.lang.OldSystemTest#test_getProperties", + "org.apache.harmony.tests.java.lang.Process2Test#test_getErrorStream", + "org.apache.harmony.tests.java.lang.ProcessTest#test_exitValue"] } ] |