Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (C) 2015 The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | if [ ! -d libcore ]; then |
| 18 | echo "Script needs to be run at the root of the android tree" |
| 19 | exit 1 |
| 20 | fi |
| 21 | |
Colin Cross | e0ef0a8 | 2017-07-27 21:29:18 +0000 | [diff] [blame] | 22 | source build/envsetup.sh >&/dev/null # for get_build_var, setpaths |
| 23 | setpaths # include platform prebuilt java, javac, etc in $PATH. |
Shubham Ajmera | c33c087 | 2017-07-20 18:41:52 -0700 | [diff] [blame] | 24 | |
Andreas Gampe | ebd089d | 2016-07-18 14:56:56 -0700 | [diff] [blame] | 25 | if [ -z "$ANDROID_HOST_OUT" ] ; then |
| 26 | ANDROID_HOST_OUT=${OUT_DIR-$ANDROID_BUILD_TOP/out}/host/linux-x86 |
| 27 | fi |
| 28 | |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 29 | java_lib_location="${ANDROID_HOST_OUT}/../common/obj/JAVA_LIBRARIES" |
| 30 | make_target_name="apache-harmony-jdwp-tests-hostdex" |
Igor Murashkin | 84f2632 | 2017-06-06 11:36:33 -0700 | [diff] [blame] | 31 | |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 32 | vm_args="" |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 33 | art="/data/local/tmp/system/bin/art" |
Nicolas Geoffray | 33e1f8f | 2015-04-24 14:37:29 +0100 | [diff] [blame] | 34 | art_debugee="sh /data/local/tmp/system/bin/art" |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 35 | args=$@ |
Nicolas Geoffray | d553b43 | 2015-07-13 14:35:17 +0100 | [diff] [blame] | 36 | debuggee_args="-Xcompiler-option --debuggable" |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 37 | device_dir="--device-dir=/data/local/tmp" |
Nicolas Geoffray | d06dc9c | 2015-03-30 15:30:26 +0100 | [diff] [blame] | 38 | # We use the art script on target to ensure the runner and the debuggee share the same |
| 39 | # image. |
| 40 | vm_command="--vm-command=$art" |
Nicolas Geoffray | a2c1861 | 2015-03-30 23:01:28 +0100 | [diff] [blame] | 41 | image_compiler_option="" |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 42 | plugin="" |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 43 | debug="no" |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 44 | explicit_debug="no" |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 45 | verbose="no" |
Nicolas Geoffray | b76bc78 | 2016-09-14 12:33:34 +0000 | [diff] [blame] | 46 | image="-Ximage:/data/art-test/core.art" |
Alex Light | 0ac2e5c | 2017-09-19 15:35:20 -0700 | [diff] [blame] | 47 | with_jdwp_path="" |
| 48 | agent_wrapper="" |
Nicolas Geoffray | 9518655 | 2015-10-28 13:06:21 +0000 | [diff] [blame] | 49 | vm_args="" |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 50 | # By default, we run the whole JDWP test suite. |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 51 | has_specific_test="no" |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 52 | test="org.apache.harmony.jpda.tests.share.AllTests" |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 53 | mode="target" |
Roland Levillain | 5db109b | 2016-05-19 12:24:17 +0100 | [diff] [blame] | 54 | # Use JIT compiling by default. |
| 55 | use_jit=true |
Andreas Gampe | 85b286b | 2015-12-30 19:37:48 -0800 | [diff] [blame] | 56 | variant_cmdline_parameter="--variant=X32" |
Alex Light | 878f33f | 2018-02-08 11:16:39 -0800 | [diff] [blame] | 57 | dump_command="/bin/true" |
Sebastien Hertz | c3b208c | 2017-03-27 11:35:54 +0200 | [diff] [blame] | 58 | # Timeout of JDWP test in ms. |
| 59 | # |
| 60 | # Note: some tests expect a timeout to check that *no* reply/event is received for a specific case. |
| 61 | # A lower timeout can save up several minutes when running the whole test suite, especially for |
| 62 | # continuous testing. This value can be adjusted to fit the configuration of the host machine(s). |
| 63 | jdwp_test_timeout=10000 |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 64 | |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 65 | gdb_target= |
| 66 | has_gdb="no" |
| 67 | |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 68 | while true; do |
| 69 | if [[ "$1" == "--mode=host" ]]; then |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 70 | mode="host" |
Nicolas Geoffray | 5978690 | 2015-03-30 16:34:16 +0100 | [diff] [blame] | 71 | # Specify bash explicitly since the art script cannot, since it has to run on the device |
| 72 | # with mksh. |
Alex Light | b15fea2 | 2015-09-17 16:59:09 -0700 | [diff] [blame] | 73 | art="bash ${OUT_DIR-out}/host/linux-x86/bin/art" |
| 74 | art_debugee="bash ${OUT_DIR-out}/host/linux-x86/bin/art" |
Andreas Gampe | 8994a04 | 2015-12-30 19:03:17 +0000 | [diff] [blame] | 75 | # We force generation of a new image to avoid build-time and run-time classpath differences. |
| 76 | image="-Ximage:/system/non/existent/vogar.art" |
Nicolas Geoffray | d06dc9c | 2015-03-30 15:30:26 +0100 | [diff] [blame] | 77 | # We do not need a device directory on host. |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 78 | device_dir="" |
Nicolas Geoffray | d06dc9c | 2015-03-30 15:30:26 +0100 | [diff] [blame] | 79 | # Vogar knows which VM to use on host. |
| 80 | vm_command="" |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 81 | shift |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 82 | elif [[ "$1" == "--mode=jvm" ]]; then |
| 83 | mode="ri" |
| 84 | make_target_name="apache-harmony-jdwp-tests-host" |
| 85 | art="$(which java)" |
| 86 | art_debugee="$(which java)" |
| 87 | # No need for extra args. |
| 88 | debuggee_args="" |
| 89 | # No image. On the RI. |
| 90 | image="" |
| 91 | # We do not need a device directory on RI. |
| 92 | device_dir="" |
| 93 | # Vogar knows which VM to use on RI. |
| 94 | vm_command="" |
| 95 | # We don't care about jit with the RI |
| 96 | use_jit=false |
| 97 | shift |
Alex Light | ec4a10c | 2017-11-17 09:06:26 -0800 | [diff] [blame] | 98 | elif [[ $1 == --test-timeout-ms ]]; then |
| 99 | # Remove the --test-timeout-ms from the arguments. |
| 100 | args=${args/$1} |
| 101 | shift |
| 102 | jdwp_test_timeout=$1 |
| 103 | # Remove the argument |
| 104 | args=${args/$1} |
| 105 | shift |
Alex Light | 0ac2e5c | 2017-09-19 15:35:20 -0700 | [diff] [blame] | 106 | elif [[ $1 == --agent-wrapper ]]; then |
| 107 | # Remove the --agent-wrapper from the arguments. |
| 108 | args=${args/$1} |
| 109 | shift |
| 110 | agent_wrapper=${agent_wrapper}${1}, |
| 111 | # Remove the argument |
| 112 | args=${args/$1} |
| 113 | shift |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 114 | elif [[ $1 == -Ximage:* ]]; then |
| 115 | image="$1" |
| 116 | shift |
Roland Levillain | 5db109b | 2016-05-19 12:24:17 +0100 | [diff] [blame] | 117 | elif [[ "$1" == "--no-jit" ]]; then |
| 118 | use_jit=false |
| 119 | # Remove the --no-jit from the arguments. |
| 120 | args=${args/$1} |
| 121 | shift |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 122 | elif [[ $1 == "--no-debug" ]]; then |
| 123 | explicit_debug="yes" |
| 124 | debug="no" |
| 125 | # Remove the --no-debug from the arguments. |
| 126 | args=${args/$1} |
| 127 | shift |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 128 | elif [[ $1 == "--debug" ]]; then |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 129 | explicit_debug="yes" |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 130 | debug="yes" |
| 131 | # Remove the --debug from the arguments. |
| 132 | args=${args/$1} |
| 133 | shift |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 134 | elif [[ $1 == "--verbose" ]]; then |
| 135 | verbose="yes" |
| 136 | # Remove the --verbose from the arguments. |
| 137 | args=${args/$1} |
| 138 | shift |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 139 | elif [[ $1 == "--gdbserver" ]]; then |
| 140 | # Remove the --gdbserver from the arguments. |
| 141 | args=${args/$1} |
| 142 | has_gdb="yes" |
| 143 | shift |
| 144 | gdb_target=$1 |
| 145 | # Remove the target from the arguments. |
| 146 | args=${args/$1} |
| 147 | shift |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 148 | elif [[ $1 == "--test" ]]; then |
| 149 | # Remove the --test from the arguments. |
| 150 | args=${args/$1} |
| 151 | shift |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 152 | has_specific_test="yes" |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 153 | test=$1 |
| 154 | # Remove the test from the arguments. |
| 155 | args=${args/$1} |
| 156 | shift |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 157 | elif [[ "$1" == "--jdwp-path" ]]; then |
| 158 | # Remove the --jdwp-path from the arguments. |
| 159 | args=${args/$1} |
| 160 | shift |
Alex Light | 0ac2e5c | 2017-09-19 15:35:20 -0700 | [diff] [blame] | 161 | with_jdwp_path=$1 |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 162 | # Remove the path from the arguments. |
| 163 | args=${args/$1} |
| 164 | shift |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 165 | elif [[ "$1" == "" ]]; then |
| 166 | break |
Andreas Gampe | 85b286b | 2015-12-30 19:37:48 -0800 | [diff] [blame] | 167 | elif [[ $1 == --variant=* ]]; then |
| 168 | variant_cmdline_parameter=$1 |
| 169 | shift |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 170 | elif [[ $1 == -Xplugin:* ]]; then |
| 171 | plugin="$1" |
| 172 | args=${args/$1} |
| 173 | shift |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 174 | else |
| 175 | shift |
| 176 | fi |
| 177 | done |
| 178 | |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 179 | if [[ $has_gdb = "yes" ]]; then |
| 180 | if [[ $explicit_debug = "no" ]]; then |
| 181 | debug="yes" |
| 182 | fi |
| 183 | fi |
| 184 | |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 185 | if [[ $mode == "ri" ]]; then |
Alex Light | 0ac2e5c | 2017-09-19 15:35:20 -0700 | [diff] [blame] | 186 | if [[ "x$with_jdwp_path" != "x" ]]; then |
| 187 | vm_args="${vm_args} --vm-arg -Djpda.settings.debuggeeAgentArgument=-agentpath:${agent_wrapper}" |
| 188 | vm_args="${vm_args} --vm-arg -Djpda.settings.debuggeeAgentName=$with_jdwp_path" |
| 189 | fi |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 190 | if [[ "x$image" != "x" ]]; then |
| 191 | echo "Cannot use -Ximage: with --mode=jvm" |
| 192 | exit 1 |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 193 | elif [[ $has_gdb = "yes" ]]; then |
| 194 | echo "Cannot use --gdbserver with --mode=jvm" |
| 195 | exit 1 |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 196 | elif [[ $debug == "yes" ]]; then |
| 197 | echo "Cannot use --debug with --mode=jvm" |
| 198 | exit 1 |
| 199 | fi |
| 200 | else |
Alex Light | 878f33f | 2018-02-08 11:16:39 -0800 | [diff] [blame] | 201 | if [[ "$mode" == "host" ]]; then |
| 202 | dump_command="/bin/kill -3" |
| 203 | else |
| 204 | # TODO It would be great to be able to use this on target too but we need to |
| 205 | # be able to walk /proc to figure out what the actual child pid is. |
| 206 | dump_command="/system/bin/true" |
| 207 | # dump_command="/system/xbin/su root /data/local/tmp/system/bin/debuggerd -b" |
| 208 | fi |
Alex Light | 84b92e0 | 2017-09-29 13:46:14 -0700 | [diff] [blame] | 209 | if [[ $has_gdb = "yes" ]]; then |
| 210 | if [[ $mode == "target" ]]; then |
| 211 | echo "Cannot use --gdbserver with --mode=target" |
| 212 | exit 1 |
| 213 | else |
| 214 | art_debugee="$art_debugee --gdbserver $gdb_target" |
| 215 | # The tests absolutely require some timeout. We set a ~2 week timeout since we can kill the |
| 216 | # test with gdb if it goes on too long. |
| 217 | jdwp_test_timeout="1000000000" |
| 218 | fi |
| 219 | fi |
Alex Light | 0ac2e5c | 2017-09-19 15:35:20 -0700 | [diff] [blame] | 220 | if [[ "x$with_jdwp_path" != "x" ]]; then |
| 221 | vm_args="${vm_args} --vm-arg -Djpda.settings.debuggeeAgentArgument=-agentpath:${agent_wrapper}" |
| 222 | vm_args="${vm_args} --vm-arg -Djpda.settings.debuggeeAgentName=${with_jdwp_path}" |
| 223 | fi |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 224 | vm_args="$vm_args --vm-arg -Xcompiler-option --vm-arg --debuggable" |
| 225 | # Make sure the debuggee doesn't clean up what the debugger has generated. |
| 226 | art_debugee="$art_debugee --no-clean" |
| 227 | fi |
| 228 | |
| 229 | function jlib_name { |
| 230 | local path=$1 |
| 231 | local str="classes" |
| 232 | local suffix="jar" |
| 233 | if [[ $mode == "ri" ]]; then |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 234 | str="javalib" |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 235 | fi |
| 236 | echo "$path/$str.$suffix" |
| 237 | } |
| 238 | |
| 239 | # Jar containing all the tests. |
| 240 | test_jar=$(jlib_name "${java_lib_location}/${make_target_name}_intermediates") |
| 241 | |
| 242 | if [[ ! -f $test_jar ]]; then |
| 243 | echo "Before running, you must build jdwp tests and vogar:" \ |
| 244 | "make ${make_target_name} vogar" |
| 245 | exit 1 |
| 246 | fi |
Nicolas Geoffray | c0c0785 | 2017-08-08 09:44:15 +0100 | [diff] [blame] | 247 | |
Andreas Gampe | 85b286b | 2015-12-30 19:37:48 -0800 | [diff] [blame] | 248 | # For the host: |
| 249 | # |
| 250 | # If, on the other hand, there is a variant set, use it to modify the art_debugee parameter to |
| 251 | # force the fork to have the same bitness as the controller. This should be fine and not impact |
| 252 | # testing (cross-bitness), as the protocol is always 64-bit anyways (our implementation). |
| 253 | # |
| 254 | # Note: this isn't necessary for the device as the BOOTCLASSPATH environment variable is set there |
| 255 | # and used as a fallback. |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 256 | if [[ $mode == "host" ]]; then |
Andreas Gampe | 85b286b | 2015-12-30 19:37:48 -0800 | [diff] [blame] | 257 | variant=${variant_cmdline_parameter:10} |
| 258 | if [[ $variant == "x32" || $variant == "X32" ]]; then |
| 259 | art_debugee="$art_debugee --32" |
| 260 | elif [[ $variant == "x64" || $variant == "X64" ]]; then |
| 261 | art_debugee="$art_debugee --64" |
| 262 | else |
| 263 | echo "Error, do not understand variant $variant_cmdline_parameter." |
| 264 | exit 1 |
| 265 | fi |
| 266 | fi |
| 267 | |
Nicolas Geoffray | 9518655 | 2015-10-28 13:06:21 +0000 | [diff] [blame] | 268 | if [[ "$image" != "" ]]; then |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 269 | vm_args="$vm_args --vm-arg $image" |
Nicolas Geoffray | 9518655 | 2015-10-28 13:06:21 +0000 | [diff] [blame] | 270 | fi |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 271 | |
| 272 | if [[ "$plugin" != "" ]]; then |
| 273 | vm_args="$vm_args --vm-arg $plugin" |
| 274 | fi |
| 275 | |
Roland Levillain | 5db109b | 2016-05-19 12:24:17 +0100 | [diff] [blame] | 276 | if $use_jit; then |
Nicolas Geoffray | 49cda06 | 2017-04-21 13:08:25 +0100 | [diff] [blame] | 277 | vm_args="$vm_args --vm-arg -Xcompiler-option --vm-arg --compiler-filter=quicken" |
| 278 | debuggee_args="$debuggee_args -Xcompiler-option --compiler-filter=quicken" |
Roland Levillain | 5db109b | 2016-05-19 12:24:17 +0100 | [diff] [blame] | 279 | fi |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 280 | |
| 281 | if [[ $mode != "ri" ]]; then |
| 282 | vm_args="$vm_args --vm-arg -Xusejit:$use_jit" |
| 283 | debuggee_args="$debuggee_args -Xusejit:$use_jit" |
| 284 | fi |
| 285 | |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 286 | if [[ $debug == "yes" ]]; then |
| 287 | art="$art -d" |
| 288 | art_debugee="$art_debugee -d" |
Andreas Gampe | 1c5b42f | 2017-06-15 18:20:45 -0700 | [diff] [blame] | 289 | vm_args="$vm_args --vm-arg -XXlib:libartd.so --vm-arg -XX:SlowDebug=true" |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 290 | fi |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 291 | if [[ $verbose == "yes" ]]; then |
| 292 | # Enable JDWP logs in the debuggee. |
| 293 | art_debugee="$art_debugee -verbose:jdwp" |
| 294 | fi |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 295 | |
Neil Fuller | 239bdf6 | 2018-01-08 18:55:36 +0000 | [diff] [blame] | 296 | if [[ $mode != "ri" ]]; then |
Neil Fuller | c546ec9 | 2018-01-05 15:00:35 +0000 | [diff] [blame] | 297 | toolchain_args="--toolchain d8 --language CUR" |
Alex Light | 264a486 | 2018-01-31 16:47:58 +0000 | [diff] [blame] | 298 | if [[ "x$with_jdwp_path" == "x" ]]; then |
| 299 | # Need to enable the internal jdwp implementation. |
| 300 | art_debugee="${art_debugee} -XjdwpProvider:internal" |
| 301 | fi |
Alex Light | 8d8299d | 2017-11-10 08:41:04 -0800 | [diff] [blame] | 302 | else |
| 303 | toolchain_args="--toolchain javac --language CUR" |
Igor Murashkin | 84f2632 | 2017-06-06 11:36:33 -0700 | [diff] [blame] | 304 | fi |
| 305 | |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 306 | # Run the tests using vogar. |
Nicolas Geoffray | d06dc9c | 2015-03-30 15:30:26 +0100 | [diff] [blame] | 307 | vogar $vm_command \ |
Nicolas Geoffray | 9648a63 | 2015-06-15 14:35:01 +0100 | [diff] [blame] | 308 | $vm_args \ |
Nicolas Geoffray | 9620b9d | 2015-03-30 12:28:26 +0100 | [diff] [blame] | 309 | --verbose \ |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 310 | $args \ |
| 311 | $device_dir \ |
Nicolas Geoffray | a2c1861 | 2015-03-30 23:01:28 +0100 | [diff] [blame] | 312 | $image_compiler_option \ |
Nicolas Geoffray | 472b00c | 2015-05-06 14:57:09 +0100 | [diff] [blame] | 313 | --timeout 800 \ |
Nicolas Geoffray | 96cd87a | 2015-03-26 16:48:29 +0000 | [diff] [blame] | 314 | --vm-arg -Djpda.settings.verbose=true \ |
Sebastien Hertz | c3b208c | 2017-03-27 11:35:54 +0200 | [diff] [blame] | 315 | --vm-arg -Djpda.settings.timeout=$jdwp_test_timeout \ |
| 316 | --vm-arg -Djpda.settings.waitingTime=$jdwp_test_timeout \ |
Nicolas Geoffray | a2c1861 | 2015-03-30 23:01:28 +0100 | [diff] [blame] | 317 | --vm-arg -Djpda.settings.transportAddress=127.0.0.1:55107 \ |
Alex Light | 878f33f | 2018-02-08 11:16:39 -0800 | [diff] [blame] | 318 | --vm-arg -Djpda.settings.dumpProcess="$dump_command" \ |
Alex Light | 617c9c5 | 2017-08-18 11:52:25 -0700 | [diff] [blame] | 319 | --vm-arg -Djpda.settings.debuggeeJavaPath="$art_debugee $plugin $image $debuggee_args" \ |
Igor Murashkin | 84f2632 | 2017-06-06 11:36:33 -0700 | [diff] [blame] | 320 | --classpath "$test_jar" \ |
| 321 | $toolchain_args \ |
Sebastien Hertz | a646aaf | 2015-09-10 12:03:51 +0200 | [diff] [blame] | 322 | $test |
Hiroshi Yamauchi | a166bbb | 2015-11-19 16:24:31 -0800 | [diff] [blame] | 323 | |
| 324 | vogar_exit_status=$? |
| 325 | |
| 326 | echo "Killing stalled dalvikvm processes..." |
Alex Light | c611ffa | 2017-10-18 08:59:16 -0700 | [diff] [blame] | 327 | if [[ $mode == "host" ]]; then |
Hiroshi Yamauchi | a166bbb | 2015-11-19 16:24:31 -0800 | [diff] [blame] | 328 | pkill -9 -f /bin/dalvikvm |
| 329 | else |
| 330 | adb shell pkill -9 -f /bin/dalvikvm |
| 331 | fi |
| 332 | echo "Done." |
| 333 | |
| 334 | exit $vogar_exit_status |