diff options
-rwxr-xr-x | test/etc/run-test-jar | 49 |
1 files changed, 20 insertions, 29 deletions
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index fa6ef54c93..6444eb9a89 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -811,6 +811,25 @@ if [ "x$RUN_TEST_ASAN_OPTIONS" != "x" ] ; then fi RUN_TEST_ASAN_OPTIONS="${RUN_TEST_ASAN_OPTIONS}detect_leaks=0" +# For running, we must turn off logging when dex2oat or patchoat are missing. Otherwise we use +# the same defaults as for prebuilt: everything when --dev, otherwise errors and above only. +if [ "$EXTERNAL_LOG_TAGS" = "n" ]; then + if [ "$DEV_MODE" = "y" ]; then + export ANDROID_LOG_TAGS='*:d' + elif [ "$USE_DEX2OAT_AND_PATCHOAT" = "n" ]; then + # All tests would log the error of failing dex2oat/patchoat. Be silent here and only + # log fatal events. + export ANDROID_LOG_TAGS='*:s' + elif [ "$HAVE_IMAGE" = "n" ]; then + # All tests would log the error of missing image. Be silent here and only log fatal + # events. + export ANDROID_LOG_TAGS='*:s' + else + # We are interested in LOG(ERROR) output. + export ANDROID_LOG_TAGS='*:e' + fi +fi + if [ "$HOST" = "n" ]; then adb root > /dev/null adb wait-for-device @@ -861,6 +880,7 @@ if [ "$HOST" = "n" ]; then export ANDROID_ADDITIONAL_PUBLIC_LIBRARIES=$PUBLIC_LIBS && \ export DEX_LOCATION=$DEX_LOCATION && \ export ANDROID_ROOT=$ANDROID_ROOT && \ + export ANDROID_LOG_TAGS=$ANDROID_LOG_TAGS && \ rm -rf ${DEX_LOCATION}/dalvik-cache/ && \ mkdir -p ${mkdir_locations} && \ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH && \ @@ -898,16 +918,6 @@ else # Host run. export ANDROID_PRINTF_LOG=brief - # By default, and for prebuild dex2oat, we are interested in errors being logged. In dev mode - # we want debug messages. - if [ "$EXTERNAL_LOG_TAGS" = "n" ]; then - if [ "$DEV_MODE" = "y" ]; then - export ANDROID_LOG_TAGS='*:d' - else - export ANDROID_LOG_TAGS='*:e' - fi - fi - export ANDROID_DATA="$DEX_LOCATION" export ANDROID_ROOT="${ANDROID_ROOT}" export LD_LIBRARY_PATH="${ANDROID_ROOT}/${LIBRARY_DIRECTORY}:${ANDROID_ROOT}/${TEST_DIRECTORY}" @@ -968,25 +978,6 @@ else $strip_cmdline || { echo "Strip failed." >&2 ; exit 3; } $sync_cmdline || { echo "Sync failed." >&2 ; exit 4; } - # For running, we must turn off logging when dex2oat or patchoat are missing. Otherwise we use - # the same defaults as for prebuilt: everything when --dev, otherwise errors and above only. - if [ "$EXTERNAL_LOG_TAGS" = "n" ]; then - if [ "$DEV_MODE" = "y" ]; then - export ANDROID_LOG_TAGS='*:d' - elif [ "$USE_DEX2OAT_AND_PATCHOAT" = "n" ]; then - # All tests would log the error of failing dex2oat/patchoat. Be silent here and only - # log fatal events. - export ANDROID_LOG_TAGS='*:s' - elif [ "$HAVE_IMAGE" = "n" ]; then - # All tests would log the error of missing image. Be silent here and only log fatal - # events. - export ANDROID_LOG_TAGS='*:s' - else - # We are interested in LOG(ERROR) output. - export ANDROID_LOG_TAGS='*:e' - fi - fi - if [ "$DRY_RUN" = "y" ]; then exit 0 fi |