summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2015-03-26 16:48:29 +0000
committerNicolas Geoffray <ngeoffray@google.com>2015-03-26 17:59:19 +0000
commit96cd87ad32653ad334600fe302edea5658392c41 (patch)
tree94569d42530827fb9cebc3b11e4d2ec599046887 /tools
parent410f5cfe4ff70bc8a151216afae4e204f51aff37 (diff)
downloadart-96cd87ad32653ad334600fe302edea5658392c41.zip
art-96cd87ad32653ad334600fe302edea5658392c41.tar.gz
art-96cd87ad32653ad334600fe302edea5658392c41.tar.bz2
Add a script to run jdwp tests on the chrome buildbot.
Change-Id: Ia702fd884f10abcb0887f4964c7df3c04a508984
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run-jdwp-tests.sh71
1 files changed, 71 insertions, 0 deletions
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh
new file mode 100755
index 0000000..c51bd20
--- /dev/null
+++ b/tools/run-jdwp-tests.sh
@@ -0,0 +1,71 @@
+#!/bin/bash
+#
+# Copyright (C) 2015 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if [ ! -d libcore ]; then
+ echo "Script needs to be run at the root of the android tree"
+ exit 1
+fi
+
+# Jar containing all the tests.
+test_jar=out/host/linux-x86/framework/apache-harmony-jdwp-tests-hostdex.jar
+junit_jar=out/host/linux-x86/framework/junit.jar
+
+if [ ! -f $test_jar -o ! -f $junit_jar ]; then
+ echo "Before running, you must build jdwp tests and vogar:" \
+ "make junit apache-harmony-jdwp-tests-hostdex vogar vogar.jar"
+ exit 1
+fi
+
+art="/data/local/tmp/system/bin/art"
+# We use Quick's image on target because optimizing's image is not compiled debuggable.
+image="-Ximage:/data/art-test/core.art"
+args=$@
+debuggee_args="-Xcompiler-option --compiler-backend=Optimizing -Xcompiler-option --debuggable"
+device_dir="--device-dir=/data/local/tmp"
+
+while true; do
+ if [[ "$1" == "--mode=host" ]]; then
+ art="art"
+ # We force generation of a new image to avoid build-time and run-time classpath differences.
+ image="-Ximage:/system/non/existent"
+ device_dir=""
+ shift
+ elif [[ $1 == -Ximage:* ]]; then
+ image="$1"
+ shift
+ elif [[ "$1" == "" ]]; then
+ break
+ else
+ shift
+ fi
+done
+
+# Run the tests using vogar.
+vogar --vm-command=$art \
+ --vm-arg $image \
+ $args \
+ $device_dir \
+ --vm-arg -Ximage-compiler-option \
+ --vm-arg --debuggable \
+ --timeout 600 \
+ --vm-arg -Djpda.settings.verbose=true \
+ --vm-arg -Djpda.settings.syncPort=34016 \
+ --vm-arg -Djpda.settings.debuggeeJavaPath="$art $image $debuggee_args" \
+ --classpath $test_jar \
+ --classpath $junit_jar \
+ --vm-arg -Xcompiler-option --vm-arg --compiler-backend=Optimizing \
+ --vm-arg -Xcompiler-option --vm-arg --debuggable \
+ org.apache.harmony.jpda.tests.share.AllTests