summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-04-24 13:45:26 -0700
committerElliott Hughes <enh@google.com>2012-04-24 13:45:26 -0700
commit72395bf298b7707ad9d93c3e51b57e1b8e010311 (patch)
tree8d2e6c3b6bd72ae27aa19979f301630fc438dfec /test
parentae80b493748c5b6ffe310a91c651e7043f4b2dae (diff)
downloadart-72395bf298b7707ad9d93c3e51b57e1b8e010311.zip
art-72395bf298b7707ad9d93c3e51b57e1b8e010311.tar.gz
art-72395bf298b7707ad9d93c3e51b57e1b8e010311.tar.bz2
Support ANDROID_LOG_TAGS.
This is the dalvik-compatible solution to the "I don't want non-FATAL logging in my test output" problem. Change-Id: I51b7b883ce89604af4661696e7c7b041a0ef8211
Diffstat (limited to 'test')
-rwxr-xr-xtest/etc/host-run-test-jar14
-rwxr-xr-xtest/etc/push-and-run-test-jar21
-rwxr-xr-xtest/etc/reference-run-test-classes3
3 files changed, 20 insertions, 18 deletions
diff --git a/test/etc/host-run-test-jar b/test/etc/host-run-test-jar
index b892ce9..30a6721 100755
--- a/test/etc/host-run-test-jar
+++ b/test/etc/host-run-test-jar
@@ -60,8 +60,6 @@ done
msg "------------------------------"
DATA_DIR=/tmp
-DEBUG_OPTS="-Xcheck:jni"
-
if [ ! -d $DATA_DIR/art-cache ]; then
mkdir -p $DATA_DIR/art-cache
[[ $? -ne 0 ]] && exit
@@ -82,11 +80,9 @@ exe="${ANDROID_ROOT}/bin/oatexecd"
if [ "$DEBUG" = "y" ]; then
PORT=8000
- msg "Waiting for debugger to connect on localhost:$PORT"
- # This is for jdb:
- DEX_DEBUG="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y"
- # Connect thus:
- # jdb -attach localhost:12345
+ msg "Waiting for jdb to connect:"
+ msg " jdb -attach localhost:$PORT"
+ DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y"
fi
if [ "$GDB" = "y" ]; then
@@ -94,7 +90,9 @@ if [ "$GDB" = "y" ]; then
gdbargs="--args $exe"
fi
+JNI_OPTS="-Xjnigreflimit:256 -Xcheck:jni"
+
cd $ANDROID_BUILD_TOP
$INVOKE_WITH $gdb $exe $gdbargs -Ximage:$ANDROID_ROOT/framework/core.art \
- $DEBUG_OPTS $DEX_DEBUG -verbose:log-to=$DEX_LOCATION/log.txt\
+ $JNI_OPTS $DEBUG_OPTS \
-cp $DEX_LOCATION/$TEST_NAME.jar Main "$@"
diff --git a/test/etc/push-and-run-test-jar b/test/etc/push-and-run-test-jar
index c892309..31c368d 100755
--- a/test/etc/push-and-run-test-jar
+++ b/test/etc/push-and-run-test-jar
@@ -105,18 +105,21 @@ else
fi
if [ "$DEBUG" = "y" ]; then
- # This is for ddms:
- #DEX_DEBUG="-agentlib:jdwp=transport=dt_android_adb,server=y,suspend=y"
- # Connect by running 'ddms'.
+ # Use this instead for ddms and connect by running 'ddms':
+ # DEBUG_OPTS="-agentlib:jdwp=transport=dt_android_adb,server=y,suspend=y"
+ # TODO: add a separate --ddms option?
- # This is for jdb:
- DEX_DEBUG="-agentlib:jdwp=transport=dt_socket,address=12345,server=y,suspend=y"
- # Connect thus:
- # adb forward tcp:12345 tcp:12345
- # jdb -attach localhost:12345
+ PORT=12345
+ msg "Waiting for jdb to connect:"
+ msg " adb forward tcp:$PORT tcp:$PORT"
+ msg " jdb -attach localhost:$PORT"
+ DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y"
fi
-cmdline="cd /data; export DEX_LOCATION=$DEX_LOCATION; $INVOKE_WITH $OATEXEC $DEX_DEBUG $ZYGOTE -Xjnigreflimit:256 \
+JNI_OPTS="-Xjnigreflimit:256 -Xcheck:jni"
+
+cmdline="cd /data; export DEX_LOCATION=$DEX_LOCATION; $INVOKE_WITH $OATEXEC $ZYGOTE \
+ $JNI_OPTS $DEBUG_OPTS \
-Ximage:/data/art-test/core.art \
-cp /data/run-test/$TEST_NAME.jar \
Main"
diff --git a/test/etc/reference-run-test-classes b/test/etc/reference-run-test-classes
index b16d9ff..0294cc2 100755
--- a/test/etc/reference-run-test-classes
+++ b/test/etc/reference-run-test-classes
@@ -53,7 +53,8 @@ fi
if [ "$DEBUG" = "y" ]; then
PORT=8000
- msg "Waiting for debugger to connect on localhost:$PORT"
+ msg "Waiting for jdb to connect:"
+ msg " jdb -attach localhost:$PORT"
DEBUG_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y"
fi