Merge "Allow libcore and JDWP tests to be executed without JIT."
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh
index b6a19b7..3e5a1c0 100755
--- a/tools/run-jdwp-tests.sh
+++ b/tools/run-jdwp-tests.sh
@@ -44,6 +44,8 @@
# By default, we run the whole JDWP test suite.
test="org.apache.harmony.jpda.tests.share.AllTests"
host="no"
+# Use JIT compiling by default.
+use_jit=true
while true; do
if [[ "$1" == "--mode=host" ]]; then
@@ -62,6 +64,11 @@
elif [[ $1 == -Ximage:* ]]; then
image="$1"
shift
+ elif [[ "$1" == "--no-jit" ]]; then
+ use_jit=false
+ # Remove the --no-jit from the arguments.
+ args=${args/$1}
+ shift
elif [[ $1 == "--debug" ]]; then
debug="yes"
# Remove the --debug from the arguments.
@@ -90,8 +97,12 @@
if [[ "$image" != "" ]]; then
vm_args="--vm-arg $image"
fi
-vm_args="$vm_args --vm-arg -Xusejit:true"
-debuggee_args="$debuggee_args -Xusejit:true"
+if $use_jit; then
+ vm_args="$vm_args --vm-arg -Xcompiler-option --vm-arg --compiler-filter=interpret-only"
+ debuggee_args="$debuggee_args -Xcompiler-option --compiler-filter=interpret-only"
+fi
+vm_args="$vm_args --vm-arg -Xusejit:$use_jit"
+debuggee_args="$debuggee_args -Xusejit:$use_jit"
if [[ $debug == "yes" ]]; then
art="$art -d"
art_debugee="$art_debugee -d"
diff --git a/tools/run-libcore-tests.sh b/tools/run-libcore-tests.sh
index 00bb3c5..d9905f3 100755
--- a/tools/run-libcore-tests.sh
+++ b/tools/run-libcore-tests.sh
@@ -43,6 +43,9 @@
emulator="yes"
fi
+# Use JIT compiling by default.
+use_jit=true
+
# Packages that currently work correctly with the expectation files.
working_packages=("dalvik.system"
"libcore.icu"
@@ -91,6 +94,11 @@
# classpath/resources differences when compiling the boot image.
vogar_args="$vogar_args --vm-arg -Ximage:/non/existent/vogar.art"
shift
+ elif [[ "$1" == "--no-jit" ]]; then
+ # Remove the --no-jit from the arguments.
+ vogar_args=${vogar_args/$1}
+ use_jit=false
+ shift
elif [[ "$1" == "--debug" ]]; then
# Remove the --debug from the arguments.
vogar_args=${vogar_args/$1}
@@ -111,7 +119,13 @@
# Use Jack with "1.8" configuration.
vogar_args="$vogar_args --toolchain jack --language JN"
+# JIT settings.
+if $use_jit; then
+ vogar_args="$vogar_args --vm-arg -Xcompiler-option --vm-arg --compiler-filter=interpret-only"
+fi
+vogar_args="$vogar_args --vm-arg -Xusejit:$use_jit"
+
# Run the tests using vogar.
echo "Running tests for the following test packages:"
echo ${working_packages[@]} | tr " " "\n"
-vogar $vogar_args --vm-arg -Xusejit:true $expectations --classpath $jsr166_test_jack --classpath $test_jack ${working_packages[@]}
+vogar $vogar_args $expectations --classpath $jsr166_test_jack --classpath $test_jack ${working_packages[@]}