Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Runner for an individual run-test. |
| 4 | |
| 5 | msg() { |
| 6 | if [ "$QUIET" = "n" ]; then |
| 7 | echo "$@" |
| 8 | fi |
| 9 | } |
| 10 | |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 11 | ANDROID_ROOT="/system" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 12 | ARCHITECTURES_32="(arm|x86|mips|none)" |
Andreas Gampe | 1a5c406 | 2015-01-15 12:10:47 -0800 | [diff] [blame] | 13 | ARCHITECTURES_64="(arm64|x86_64|mips64|none)" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 14 | ARCHITECTURES_PATTERN="${ARCHITECTURES_32}" |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 15 | BOOT_IMAGE="" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 16 | COMPILE_FLAGS="" |
| 17 | DALVIKVM="dalvikvm32" |
| 18 | DEBUGGER="n" |
| 19 | DEV_MODE="n" |
| 20 | DEX2OAT="" |
Alex Light | 8a0e033 | 2015-10-26 10:11:58 -0700 | [diff] [blame] | 21 | EXPERIMENTAL="" |
Nicolas Geoffray | 90355fe | 2017-02-20 09:25:40 +0000 | [diff] [blame] | 22 | FALSE_BIN="false" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 23 | FLAGS="" |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 24 | ANDROID_FLAGS="" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 25 | GDB="" |
Nicolas Geoffray | baf9102 | 2014-10-08 09:56:45 +0100 | [diff] [blame] | 26 | GDB_ARGS="" |
| 27 | GDB_SERVER="gdbserver" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 28 | HAVE_IMAGE="y" |
| 29 | HOST="n" |
| 30 | INTERPRETER="n" |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 31 | JIT="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 32 | INVOKE_WITH="" |
Alex Light | e06b634 | 2017-01-05 14:37:21 -0800 | [diff] [blame] | 33 | IS_JVMTI_TEST="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 34 | ISA=x86 |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 35 | LIBRARY_DIRECTORY="lib" |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 36 | TEST_DIRECTORY="nativetest" |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 37 | MAIN="" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 38 | OPTIMIZE="y" |
| 39 | PATCHOAT="" |
| 40 | PREBUILD="y" |
| 41 | QUIET="n" |
Nicolas Geoffray | 94e25db | 2017-01-27 14:54:28 +0000 | [diff] [blame] | 42 | RELOCATE="n" |
Richard Uhler | 76f5cb6 | 2016-04-04 13:30:16 -0700 | [diff] [blame] | 43 | STRIP_DEX="n" |
Jeff Hao | 207a37d | 2014-10-29 17:24:25 -0700 | [diff] [blame] | 44 | SECONDARY_DEX="" |
Hiroshi Yamauchi | 6ffb9cc | 2015-08-31 15:14:17 -0700 | [diff] [blame] | 45 | TIME_OUT="gdb" # "n" (disabled), "timeout" (use timeout), "gdb" (use gdb) |
| 46 | # Value in seconds |
Hiroshi Yamauchi | fd3161a | 2017-01-18 14:47:25 -0800 | [diff] [blame] | 47 | if [ "$ART_USE_READ_BARRIER" != "false" ]; then |
Hiroshi Yamauchi | a9b296c | 2016-10-07 17:07:03 -0700 | [diff] [blame] | 48 | TIME_OUT_VALUE=2400 # 40 minutes. |
Hiroshi Yamauchi | dcf0d4b | 2015-09-09 18:59:42 -0700 | [diff] [blame] | 49 | else |
Mathieu Chartier | 2576be2 | 2016-05-24 10:24:53 -0700 | [diff] [blame] | 50 | TIME_OUT_VALUE=1200 # 20 minutes. |
Hiroshi Yamauchi | dcf0d4b | 2015-09-09 18:59:42 -0700 | [diff] [blame] | 51 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 52 | USE_GDB="n" |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 53 | USE_JVM="n" |
Igor Murashkin | 7617abd | 2015-07-10 18:27:47 -0700 | [diff] [blame] | 54 | VERIFY="y" # y=yes,n=no,s=softfail |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 55 | ZYGOTE="" |
Andreas Gampe | 2b0fa5b | 2014-10-31 18:12:30 -0700 | [diff] [blame] | 56 | DEX_VERIFY="" |
Andreas Gampe | 6535703 | 2015-02-19 15:10:24 -0800 | [diff] [blame] | 57 | USE_DEX2OAT_AND_PATCHOAT="y" |
Andreas Gampe | 4d2ef33 | 2015-08-05 09:24:45 -0700 | [diff] [blame] | 58 | INSTRUCTION_SET_FEATURES="" |
Mathieu Chartier | 031768a | 2015-08-27 10:25:02 -0700 | [diff] [blame] | 59 | ARGS="" |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 60 | EXTERNAL_LOG_TAGS="n" # if y respect externally set ANDROID_LOG_TAGS. |
| 61 | DRY_RUN="n" # if y prepare to run the test but don't run it. |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 62 | TEST_VDEX="n" |
Alex Light | e06b634 | 2017-01-05 14:37:21 -0800 | [diff] [blame] | 63 | TEST_IS_NDEBUG="n" |
Calin Juravle | 857f058 | 2016-12-20 14:36:59 +0000 | [diff] [blame] | 64 | APP_IMAGE="y" |
Nicolas Geoffray | 7498105 | 2017-01-16 17:54:09 +0000 | [diff] [blame] | 65 | VDEX_FILTER="" |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 66 | PROFILE="n" |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 67 | RANDOM_PROFILE="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 68 | |
Igor Murashkin | 271a0f8 | 2017-02-14 21:14:17 +0000 | [diff] [blame] | 69 | # if "y", run 'sync' before dalvikvm to make sure all files from |
| 70 | # build step (e.g. dex2oat) were finished writing. |
| 71 | SYNC_BEFORE_RUN="n" |
| 72 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 73 | while true; do |
| 74 | if [ "x$1" = "x--quiet" ]; then |
| 75 | QUIET="y" |
| 76 | shift |
Alex Light | e06b634 | 2017-01-05 14:37:21 -0800 | [diff] [blame] | 77 | elif [ "x$1" = "x--jvmti" ]; then |
| 78 | IS_JVMTI_TEST="y" |
| 79 | shift |
Alex Light | faf90b6 | 2016-08-12 14:43:48 -0700 | [diff] [blame] | 80 | elif [ "x$1" = "x-O" ]; then |
Alex Light | e06b634 | 2017-01-05 14:37:21 -0800 | [diff] [blame] | 81 | TEST_IS_NDEBUG="y" |
Alex Light | faf90b6 | 2016-08-12 14:43:48 -0700 | [diff] [blame] | 82 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 83 | elif [ "x$1" = "x--lib" ]; then |
| 84 | shift |
| 85 | if [ "x$1" = "x" ]; then |
| 86 | echo "$0 missing argument to --lib" 1>&2 |
| 87 | exit 1 |
| 88 | fi |
| 89 | LIB="$1" |
| 90 | shift |
Alex Light | 97acf19 | 2016-03-17 09:59:38 -0700 | [diff] [blame] | 91 | elif [ "x$1" = "x--gc-stress" ]; then |
| 92 | # Give an extra 5 mins if we are gc-stress. |
| 93 | TIME_OUT_VALUE=$((${TIME_OUT_VALUE} + 300)) |
| 94 | shift |
Mathieu Chartier | 031768a | 2015-08-27 10:25:02 -0700 | [diff] [blame] | 95 | elif [ "x$1" = "x--testlib" ]; then |
| 96 | shift |
| 97 | if [ "x$1" = "x" ]; then |
| 98 | echo "$0 missing argument to --testlib" 1>&2 |
| 99 | exit 1 |
| 100 | fi |
Mathieu Chartier | de286fd | 2015-09-03 18:10:29 -0700 | [diff] [blame] | 101 | ARGS="${ARGS} $1" |
Mathieu Chartier | 031768a | 2015-08-27 10:25:02 -0700 | [diff] [blame] | 102 | shift |
David Srbecky | 5288611 | 2016-01-22 13:56:47 +0000 | [diff] [blame] | 103 | elif [ "x$1" = "x--args" ]; then |
| 104 | shift |
| 105 | if [ "x$1" = "x" ]; then |
| 106 | echo "$0 missing argument to --args" 1>&2 |
| 107 | exit 1 |
| 108 | fi |
| 109 | ARGS="${ARGS} $1" |
| 110 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 111 | elif [ "x$1" = "x-Xcompiler-option" ]; then |
| 112 | shift |
| 113 | option="$1" |
| 114 | FLAGS="${FLAGS} -Xcompiler-option $option" |
| 115 | COMPILE_FLAGS="${COMPILE_FLAGS} $option" |
| 116 | shift |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 117 | elif [ "x$1" = "x--android-runtime-option" ]; then |
| 118 | shift |
| 119 | option="$1" |
| 120 | ANDROID_FLAGS="${ANDROID_FLAGS} $option" |
| 121 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 122 | elif [ "x$1" = "x--runtime-option" ]; then |
| 123 | shift |
| 124 | option="$1" |
| 125 | FLAGS="${FLAGS} $option" |
| 126 | shift |
| 127 | elif [ "x$1" = "x--boot" ]; then |
| 128 | shift |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 129 | BOOT_IMAGE="$1" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 130 | shift |
| 131 | elif [ "x$1" = "x--no-dex2oat" ]; then |
| 132 | DEX2OAT="-Xcompiler:${FALSE_BIN}" |
Andreas Gampe | 6535703 | 2015-02-19 15:10:24 -0800 | [diff] [blame] | 133 | USE_DEX2OAT_AND_PATCHOAT="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 134 | shift |
| 135 | elif [ "x$1" = "x--no-patchoat" ]; then |
| 136 | PATCHOAT="-Xpatchoat:${FALSE_BIN}" |
Andreas Gampe | 6535703 | 2015-02-19 15:10:24 -0800 | [diff] [blame] | 137 | USE_DEX2OAT_AND_PATCHOAT="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 138 | shift |
| 139 | elif [ "x$1" = "x--relocate" ]; then |
| 140 | RELOCATE="y" |
| 141 | shift |
| 142 | elif [ "x$1" = "x--no-relocate" ]; then |
| 143 | RELOCATE="n" |
| 144 | shift |
| 145 | elif [ "x$1" = "x--prebuild" ]; then |
| 146 | PREBUILD="y" |
| 147 | shift |
Calin Juravle | 857f058 | 2016-12-20 14:36:59 +0000 | [diff] [blame] | 148 | elif [ "x$1" = "x--no-app-image" ]; then |
| 149 | APP_IMAGE="n" |
| 150 | shift |
Richard Uhler | 76f5cb6 | 2016-04-04 13:30:16 -0700 | [diff] [blame] | 151 | elif [ "x$1" = "x--strip-dex" ]; then |
| 152 | STRIP_DEX="y" |
| 153 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 154 | elif [ "x$1" = "x--host" ]; then |
| 155 | HOST="y" |
Nicolas Geoffray | 8eedb47 | 2014-10-29 14:05:59 +0000 | [diff] [blame] | 156 | ANDROID_ROOT="$ANDROID_HOST_OUT" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 157 | shift |
| 158 | elif [ "x$1" = "x--no-prebuild" ]; then |
| 159 | PREBUILD="n" |
| 160 | shift |
| 161 | elif [ "x$1" = "x--no-image" ]; then |
| 162 | HAVE_IMAGE="n" |
| 163 | shift |
Jeff Hao | 207a37d | 2014-10-29 17:24:25 -0700 | [diff] [blame] | 164 | elif [ "x$1" = "x--secondary" ]; then |
| 165 | SECONDARY_DEX=":$DEX_LOCATION/$TEST_NAME-ex.jar" |
Calin Juravle | 175dc73 | 2015-08-25 15:42:32 +0100 | [diff] [blame] | 166 | # Enable cfg-append to make sure we get the dump for both dex files. |
| 167 | # (otherwise the runtime compilation of the secondary dex will overwrite |
Roland Levillain | b0103ca | 2016-11-01 14:48:47 +0000 | [diff] [blame] | 168 | # the dump of the first one). |
Calin Juravle | 175dc73 | 2015-08-25 15:42:32 +0100 | [diff] [blame] | 169 | FLAGS="${FLAGS} -Xcompiler-option --dump-cfg-append" |
| 170 | COMPILE_FLAGS="${COMPILE_FLAGS} --dump-cfg-append" |
Jeff Hao | 207a37d | 2014-10-29 17:24:25 -0700 | [diff] [blame] | 171 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 172 | elif [ "x$1" = "x--debug" ]; then |
| 173 | DEBUGGER="y" |
Brian Carlstrom | 93d6ce5 | 2014-11-04 22:31:35 -0800 | [diff] [blame] | 174 | TIME_OUT="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 175 | shift |
| 176 | elif [ "x$1" = "x--gdb" ]; then |
| 177 | USE_GDB="y" |
| 178 | DEV_MODE="y" |
Brian Carlstrom | 93d6ce5 | 2014-11-04 22:31:35 -0800 | [diff] [blame] | 179 | TIME_OUT="n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 180 | shift |
Mathieu Chartier | c0a8a80 | 2014-10-17 15:58:01 -0700 | [diff] [blame] | 181 | elif [ "x$1" = "x--gdb-arg" ]; then |
| 182 | shift |
| 183 | gdb_arg="$1" |
| 184 | GDB_ARGS="${GDB_ARGS} $gdb_arg" |
| 185 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 186 | elif [ "x$1" = "x--zygote" ]; then |
| 187 | ZYGOTE="-Xzygote" |
| 188 | msg "Spawning from zygote" |
| 189 | shift |
| 190 | elif [ "x$1" = "x--dev" ]; then |
| 191 | DEV_MODE="y" |
| 192 | shift |
| 193 | elif [ "x$1" = "x--interpreter" ]; then |
| 194 | INTERPRETER="y" |
| 195 | shift |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 196 | elif [ "x$1" = "x--jit" ]; then |
| 197 | JIT="y" |
| 198 | shift |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 199 | elif [ "x$1" = "x--jvm" ]; then |
| 200 | USE_JVM="y" |
| 201 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 202 | elif [ "x$1" = "x--invoke-with" ]; then |
| 203 | shift |
| 204 | if [ "x$1" = "x" ]; then |
| 205 | echo "$0 missing argument to --invoke-with" 1>&2 |
| 206 | exit 1 |
| 207 | fi |
| 208 | if [ "x$INVOKE_WITH" = "x" ]; then |
| 209 | INVOKE_WITH="$1" |
| 210 | else |
| 211 | INVOKE_WITH="$INVOKE_WITH $1" |
| 212 | fi |
| 213 | shift |
| 214 | elif [ "x$1" = "x--no-verify" ]; then |
| 215 | VERIFY="n" |
| 216 | shift |
Igor Murashkin | 7617abd | 2015-07-10 18:27:47 -0700 | [diff] [blame] | 217 | elif [ "x$1" = "x--verify-soft-fail" ]; then |
| 218 | VERIFY="s" |
| 219 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 220 | elif [ "x$1" = "x--no-optimize" ]; then |
| 221 | OPTIMIZE="n" |
| 222 | shift |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 223 | elif [ "x$1" = "x--android-root" ]; then |
| 224 | shift |
| 225 | ANDROID_ROOT="$1" |
| 226 | shift |
Andreas Gampe | 4d2ef33 | 2015-08-05 09:24:45 -0700 | [diff] [blame] | 227 | elif [ "x$1" = "x--instruction-set-features" ]; then |
| 228 | shift |
| 229 | INSTRUCTION_SET_FEATURES="$1" |
| 230 | shift |
Mathieu Chartier | 2576be2 | 2016-05-24 10:24:53 -0700 | [diff] [blame] | 231 | elif [ "x$1" = "x--timeout" ]; then |
| 232 | shift |
| 233 | TIME_OUT_VALUE="$1" |
| 234 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 235 | elif [ "x$1" = "x--" ]; then |
| 236 | shift |
| 237 | break |
| 238 | elif [ "x$1" = "x--64" ]; then |
| 239 | ISA="x86_64" |
| 240 | GDB_SERVER="gdbserver64" |
| 241 | DALVIKVM="dalvikvm64" |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 242 | LIBRARY_DIRECTORY="lib64" |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 243 | TEST_DIRECTORY="nativetest64" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 244 | ARCHITECTURES_PATTERN="${ARCHITECTURES_64}" |
| 245 | shift |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 246 | elif [ "x$1" = "x--pic-test" ]; then |
| 247 | FLAGS="${FLAGS} -Xcompiler-option --compile-pic" |
| 248 | COMPILE_FLAGS="${COMPILE_FLAGS} --compile-pic" |
| 249 | shift |
Alex Light | 8a0e033 | 2015-10-26 10:11:58 -0700 | [diff] [blame] | 250 | elif [ "x$1" = "x--experimental" ]; then |
| 251 | if [ "$#" -lt 2 ]; then |
| 252 | echo "missing --experimental option" 1>&2 |
| 253 | exit 1 |
| 254 | fi |
| 255 | EXPERIMENTAL="$EXPERIMENTAL $2" |
| 256 | shift 2 |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 257 | elif [ "x$1" = "x--external-log-tags" ]; then |
| 258 | EXTERNAL_LOG_TAGS="y" |
| 259 | shift |
| 260 | elif [ "x$1" = "x--dry-run" ]; then |
| 261 | DRY_RUN="y" |
| 262 | shift |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 263 | elif [ "x$1" = "x--vdex" ]; then |
| 264 | TEST_VDEX="y" |
| 265 | shift |
Nicolas Geoffray | 7498105 | 2017-01-16 17:54:09 +0000 | [diff] [blame] | 266 | elif [ "x$1" = "x--vdex-filter" ]; then |
| 267 | shift |
| 268 | option="$1" |
| 269 | VDEX_FILTER="--compiler-filter=$option" |
| 270 | shift |
Igor Murashkin | 271a0f8 | 2017-02-14 21:14:17 +0000 | [diff] [blame] | 271 | elif [ "x$1" = "x--sync" ]; then |
| 272 | SYNC_BEFORE_RUN="y" |
| 273 | shift |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 274 | elif [ "x$1" = "x--profile" ]; then |
| 275 | PROFILE="y" |
| 276 | shift |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 277 | elif [ "x$1" = "x--random-profile" ]; then |
| 278 | RANDOM_PROFILE="y" |
| 279 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 280 | elif expr "x$1" : "x--" >/dev/null 2>&1; then |
| 281 | echo "unknown $0 option: $1" 1>&2 |
| 282 | exit 1 |
| 283 | else |
| 284 | break |
| 285 | fi |
| 286 | done |
| 287 | |
Alex Light | 8a0e033 | 2015-10-26 10:11:58 -0700 | [diff] [blame] | 288 | if [ "$USE_JVM" = "n" ]; then |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 289 | FLAGS="${FLAGS} ${ANDROID_FLAGS}" |
Alex Light | 8a0e033 | 2015-10-26 10:11:58 -0700 | [diff] [blame] | 290 | for feature in ${EXPERIMENTAL}; do |
Alex Light | fa02285 | 2015-10-28 09:13:20 -0700 | [diff] [blame] | 291 | FLAGS="${FLAGS} -Xexperimental:${feature} -Xcompiler-option --runtime-arg -Xcompiler-option -Xexperimental:${feature}" |
Alex Light | 8a0e033 | 2015-10-26 10:11:58 -0700 | [diff] [blame] | 292 | COMPILE_FLAGS="${COMPILE_FLAGS} --runtime-arg -Xexperimental:${feature}" |
| 293 | done |
| 294 | fi |
| 295 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 296 | if [ "x$1" = "x" ] ; then |
| 297 | MAIN="Main" |
| 298 | else |
| 299 | MAIN="$1" |
Andreas Gampe | f2fdc73 | 2014-06-11 08:20:47 -0700 | [diff] [blame] | 300 | shift |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 301 | fi |
| 302 | |
| 303 | if [ "$ZYGOTE" = "" ]; then |
| 304 | if [ "$OPTIMIZE" = "y" ]; then |
| 305 | if [ "$VERIFY" = "y" ]; then |
| 306 | DEX_OPTIMIZE="-Xdexopt:verified" |
| 307 | else |
| 308 | DEX_OPTIMIZE="-Xdexopt:all" |
| 309 | fi |
| 310 | msg "Performing optimizations" |
| 311 | else |
| 312 | DEX_OPTIMIZE="-Xdexopt:none" |
| 313 | msg "Skipping optimizations" |
| 314 | fi |
| 315 | |
| 316 | if [ "$VERIFY" = "y" ]; then |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 317 | JVM_VERIFY_ARG="-Xverify:all" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 318 | msg "Performing verification" |
Igor Murashkin | 7617abd | 2015-07-10 18:27:47 -0700 | [diff] [blame] | 319 | elif [ "$VERIFY" = "s" ]; then |
| 320 | JVM_VERIFY_ARG="Xverify:all" |
| 321 | DEX_VERIFY="-Xverify:softfail" |
| 322 | msg "Forcing verification to be soft fail" |
| 323 | else # VERIFY = "n" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 324 | DEX_VERIFY="-Xverify:none" |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 325 | JVM_VERIFY_ARG="-Xverify:none" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 326 | msg "Skipping verification" |
| 327 | fi |
| 328 | fi |
| 329 | |
| 330 | msg "------------------------------" |
| 331 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 332 | if [ "$DEBUGGER" = "y" ]; then |
| 333 | # Use this instead for ddms and connect by running 'ddms': |
| 334 | # DEBUGGER_OPTS="-agentlib:jdwp=transport=dt_android_adb,server=y,suspend=y" |
| 335 | # TODO: add a separate --ddms option? |
| 336 | |
| 337 | PORT=12345 |
| 338 | msg "Waiting for jdb to connect:" |
| 339 | if [ "$HOST" = "n" ]; then |
| 340 | msg " adb forward tcp:$PORT tcp:$PORT" |
| 341 | fi |
| 342 | msg " jdb -attach localhost:$PORT" |
| 343 | DEBUGGER_OPTS="-agentlib:jdwp=transport=dt_socket,address=$PORT,server=y,suspend=y" |
| 344 | fi |
| 345 | |
Alex Light | fba89fe | 2017-01-12 16:11:02 -0800 | [diff] [blame] | 346 | if [ "$IS_JVMTI_TEST" = "y" ]; then |
| 347 | plugin=libopenjdkjvmtid.so |
| 348 | agent=libtiagentd.so |
| 349 | lib=tiagentd |
| 350 | if [[ "$TEST_IS_NDEBUG" = "y" ]]; then |
| 351 | agent=libtiagent.so |
| 352 | plugin=libopenjdkjvmti.so |
| 353 | lib=tiagent |
| 354 | fi |
| 355 | |
| 356 | ARGS="${ARGS} ${lib}" |
| 357 | if [[ "$USE_JVM" = "y" ]]; then |
| 358 | FLAGS="${FLAGS} -agentpath:${ANDROID_HOST_OUT}/nativetest64/${agent}=${TEST_NAME},jvm" |
| 359 | else |
| 360 | FLAGS="${FLAGS} -agentpath:${agent}=${TEST_NAME},art" |
| 361 | FLAGS="${FLAGS} -Xplugin:${plugin}" |
Nicolas Geoffray | a0619e2 | 2016-12-20 13:57:43 +0000 | [diff] [blame] | 362 | FLAGS="${FLAGS} -Xcompiler-option --debuggable" |
Alex Light | fba89fe | 2017-01-12 16:11:02 -0800 | [diff] [blame] | 363 | # Always make the compilation be debuggable. |
| 364 | COMPILE_FLAGS="${COMPILE_FLAGS} --debuggable" |
| 365 | fi |
| 366 | fi |
| 367 | |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 368 | if [ "$USE_JVM" = "y" ]; then |
Alex Light | 9c20a14 | 2016-08-23 15:05:12 -0700 | [diff] [blame] | 369 | export LD_LIBRARY_PATH=${ANDROID_HOST_OUT}/lib64 |
Mathieu Chartier | a61894d | 2015-04-23 16:32:54 -0700 | [diff] [blame] | 370 | # Xmx is necessary since we don't pass down the ART flags to JVM. |
Vladimir Marko | c5798bf | 2016-12-09 10:20:54 +0000 | [diff] [blame] | 371 | # We pass the classes2 path whether it's used (src-multidex) or not. |
| 372 | cmdline="${JAVA} ${DEBUGGER_OPTS} ${JVM_VERIFY_ARG} -Xmx256m -classpath classes:classes2 ${FLAGS} $MAIN $@ ${ARGS}" |
Andreas Gampe | 3f1dc56 | 2015-05-18 15:52:22 -0700 | [diff] [blame] | 373 | if [ "$DEV_MODE" = "y" ]; then |
| 374 | echo $cmdline |
| 375 | fi |
| 376 | $cmdline |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 377 | exit |
| 378 | fi |
| 379 | |
| 380 | |
| 381 | if [ "$HAVE_IMAGE" = "n" ]; then |
Vladimir Marko | e00e559 | 2017-02-24 14:58:29 +0000 | [diff] [blame] | 382 | if [ "${HOST}" = "y" ]; then |
| 383 | framework="${ANDROID_HOST_OUT}/framework" |
| 384 | bpath_suffix="-hostdex" |
| 385 | else |
| 386 | framework="${ANDROID_ROOT}/framework" |
Nicolas Geoffray | 320ccca | 2017-03-01 10:03:08 +0000 | [diff] [blame] | 387 | bpath_suffix="-testdex" |
Vladimir Marko | e00e559 | 2017-02-24 14:58:29 +0000 | [diff] [blame] | 388 | fi |
Vladimir Marko | e00e559 | 2017-02-24 14:58:29 +0000 | [diff] [blame] | 389 | bpath="${framework}/core-libart${bpath_suffix}.jar" |
| 390 | bpath="${bpath}:${framework}/core-oj${bpath_suffix}.jar" |
| 391 | bpath="${bpath}:${framework}/conscrypt${bpath_suffix}.jar" |
| 392 | bpath="${bpath}:${framework}/okhttp${bpath_suffix}.jar" |
| 393 | bpath="${bpath}:${framework}/bouncycastle${bpath_suffix}.jar" |
| 394 | # Pass down the bootclasspath |
| 395 | FLAGS="${FLAGS} -Xbootclasspath:${bpath}" |
Nicolas Geoffray | 47e61d5 | 2017-01-31 09:13:52 +0000 | [diff] [blame] | 396 | # Add 5 minutes to give some time to generate the boot image. |
| 397 | TIME_OUT_VALUE=$((${TIME_OUT_VALUE} + 300)) |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 398 | DALVIKVM_BOOT_OPT="-Ximage:/system/non-existant/core.art" |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 399 | else |
| 400 | DALVIKVM_BOOT_OPT="-Ximage:${BOOT_IMAGE}" |
Nicolas Geoffray | 288a4a2 | 2014-10-07 11:02:40 +0100 | [diff] [blame] | 401 | fi |
| 402 | |
| 403 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 404 | if [ "$USE_GDB" = "y" ]; then |
| 405 | if [ "$HOST" = "n" ]; then |
| 406 | GDB="$GDB_SERVER :5039" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 407 | else |
| 408 | if [ `uname` = "Darwin" ]; then |
| 409 | GDB=lldb |
Mathieu Chartier | c0a8a80 | 2014-10-17 15:58:01 -0700 | [diff] [blame] | 410 | GDB_ARGS="$GDB_ARGS -- $DALVIKVM" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 411 | DALVIKVM= |
| 412 | else |
| 413 | GDB=gdb |
Mathieu Chartier | c0a8a80 | 2014-10-17 15:58:01 -0700 | [diff] [blame] | 414 | GDB_ARGS="$GDB_ARGS --args $DALVIKVM" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 415 | # Enable for Emacs "M-x gdb" support. TODO: allow extra gdb arguments on command line. |
| 416 | # gdbargs="--annotate=3 $gdbargs" |
| 417 | fi |
| 418 | fi |
| 419 | fi |
| 420 | |
| 421 | if [ "$INTERPRETER" = "y" ]; then |
Nicolas Geoffray | e722d29 | 2015-12-15 11:51:37 +0000 | [diff] [blame] | 422 | INT_OPTS="-Xint" |
Andreas Gampe | 2b0fa5b | 2014-10-31 18:12:30 -0700 | [diff] [blame] | 423 | if [ "$VERIFY" = "y" ] ; then |
Richard Uhler | f4b3487 | 2016-04-13 11:03:46 -0700 | [diff] [blame] | 424 | INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=interpret-only" |
Andreas Gampe | 2b0fa5b | 2014-10-31 18:12:30 -0700 | [diff] [blame] | 425 | COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=interpret-only" |
Igor Murashkin | 7617abd | 2015-07-10 18:27:47 -0700 | [diff] [blame] | 426 | elif [ "$VERIFY" = "s" ]; then |
Richard Uhler | f4b3487 | 2016-04-13 11:03:46 -0700 | [diff] [blame] | 427 | INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-at-runtime" |
Igor Murashkin | 7617abd | 2015-07-10 18:27:47 -0700 | [diff] [blame] | 428 | COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-at-runtime" |
| 429 | DEX_VERIFY="${DEX_VERIFY} -Xverify:softfail" |
| 430 | else # VERIFY = "n" |
Richard Uhler | f4b3487 | 2016-04-13 11:03:46 -0700 | [diff] [blame] | 431 | INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-none" |
Andreas Gampe | 2b0fa5b | 2014-10-31 18:12:30 -0700 | [diff] [blame] | 432 | COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-none" |
| 433 | DEX_VERIFY="${DEX_VERIFY} -Xverify:none" |
| 434 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 435 | fi |
| 436 | |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 437 | if [ "$JIT" = "y" ]; then |
Nicolas Geoffray | e722d29 | 2015-12-15 11:51:37 +0000 | [diff] [blame] | 438 | INT_OPTS="-Xusejit:true" |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 439 | if [ "$VERIFY" = "y" ] ; then |
Calin Juravle | 0966558 | 2016-12-20 14:00:48 +0000 | [diff] [blame] | 440 | INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=interpret-only" |
| 441 | COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=interpret-only" |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 442 | else |
Richard Uhler | f4b3487 | 2016-04-13 11:03:46 -0700 | [diff] [blame] | 443 | INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-none" |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 444 | COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-none" |
| 445 | DEX_VERIFY="${DEX_VERIFY} -Xverify:none" |
| 446 | fi |
| 447 | fi |
| 448 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 449 | JNI_OPTS="-Xjnigreflimit:512 -Xcheck:jni" |
| 450 | |
Richard Uhler | 020c0f3 | 2017-03-14 16:23:17 +0000 | [diff] [blame] | 451 | COMPILE_FLAGS="${COMPILE_FLAGS} --runtime-arg -Xnorelocate" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 452 | if [ "$RELOCATE" = "y" ]; then |
Richard Uhler | c52f303 | 2017-03-02 13:45:45 +0000 | [diff] [blame] | 453 | FLAGS="${FLAGS} -Xrelocate" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 454 | else |
| 455 | FLAGS="$FLAGS -Xnorelocate" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 456 | fi |
| 457 | |
| 458 | if [ "$HOST" = "n" ]; then |
Nicolas Geoffray | d295bc8 | 2016-11-04 13:03:05 +0000 | [diff] [blame] | 459 | # Need to be root to query /data/dalvik-cache |
| 460 | adb root > /dev/null |
| 461 | adb wait-for-device |
| 462 | ISA= |
| 463 | ISA_adb_invocation= |
| 464 | ISA_outcome= |
| 465 | # We iterate a few times to workaround an adb issue. b/32655576 |
| 466 | for i in {1..10}; do |
| 467 | ISA_adb_invocation=$(adb shell ls -F /data/dalvik-cache) |
| 468 | ISA_outcome=$? |
| 469 | ISA=$(echo $ISA_adb_invocation | grep -Ewo "${ARCHITECTURES_PATTERN}") |
| 470 | if [ x"$ISA" != "x" ]; then |
| 471 | break; |
| 472 | fi |
| 473 | done |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 474 | if [ x"$ISA" = "x" ]; then |
| 475 | echo "Unable to determine architecture" |
Nicolas Geoffray | 8f500fa | 2016-11-03 11:18:48 +0000 | [diff] [blame] | 476 | # Print a few things for helping diagnosing the problem. |
Nicolas Geoffray | d295bc8 | 2016-11-04 13:03:05 +0000 | [diff] [blame] | 477 | echo "adb invocation output: $ISA_adb_invocation" |
| 478 | echo "adb invocation outcome: $ISA_outcome" |
Nicolas Geoffray | 8f500fa | 2016-11-03 11:18:48 +0000 | [diff] [blame] | 479 | echo $(adb shell ls -F /data/dalvik-cache) |
| 480 | echo $(adb shell ls /data/dalvik-cache) |
| 481 | echo ${ARCHITECTURES_PATTERN} |
| 482 | echo $(adb shell ls -F /data/dalvik-cache | grep -Ewo "${ARCHITECTURES_PATTERN}") |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 483 | exit 1 |
| 484 | fi |
| 485 | fi |
| 486 | |
Wojciech Staszkiewicz | e663653 | 2016-09-23 10:59:55 -0700 | [diff] [blame] | 487 | # Prevent test from silently falling back to interpreter in no-prebuild mode. This happens |
| 488 | # when DEX_LOCATION path is too long, because vdex/odex filename is constructed by taking |
| 489 | # full path to dex, stripping leading '/', appending '@classes.vdex' and changing every |
| 490 | # remaining '/' into '@'. |
| 491 | if [ "$HOST" = "y" ]; then |
| 492 | max_filename_size=$(getconf NAME_MAX $DEX_LOCATION) |
| 493 | else |
| 494 | # There is no getconf on device, fallback to standard value. See NAME_MAX in kernel <linux/limits.h> |
| 495 | max_filename_size=255 |
| 496 | fi |
| 497 | # Compute VDEX_NAME. |
| 498 | DEX_LOCATION_STRIPPED="${DEX_LOCATION#/}" |
| 499 | VDEX_NAME="${DEX_LOCATION_STRIPPED//\//@}@$TEST_NAME.jar@classes.vdex" |
| 500 | if [ ${#VDEX_NAME} -gt $max_filename_size ]; then |
Nicolas Geoffray | bea3e31 | 2017-03-07 09:59:05 +0000 | [diff] [blame] | 501 | echo "Dex location path too long:" |
| 502 | echo "$VDEX_NAME is ${#VDEX_NAME} character long, and the limit is $max_filename_size." |
Wojciech Staszkiewicz | e663653 | 2016-09-23 10:59:55 -0700 | [diff] [blame] | 503 | exit 1 |
| 504 | fi |
| 505 | |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 506 | profman_cmdline="true" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 507 | dex2oat_cmdline="true" |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 508 | vdex_cmdline="true" |
Alex Light | afb5d19 | 2016-05-24 15:57:45 -0700 | [diff] [blame] | 509 | mkdir_locations="${DEX_LOCATION}/dalvik-cache/$ISA" |
Richard Uhler | 76f5cb6 | 2016-04-04 13:30:16 -0700 | [diff] [blame] | 510 | strip_cmdline="true" |
Igor Murashkin | 271a0f8 | 2017-02-14 21:14:17 +0000 | [diff] [blame] | 511 | sync_cmdline="true" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 512 | |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 513 | # PROFILE takes precedence over RANDOM_PROFILE, since PROFILE tests require a |
| 514 | # specific profile to run properly. |
| 515 | if [ "$PROFILE" = "y" ] || [ "$RANDOM_PROFILE" = "y" ]; then |
Nicolas Geoffray | 0b6a638 | 2017-03-10 09:38:35 +0000 | [diff] [blame] | 516 | profman_cmdline="${ANDROID_ROOT}/bin/profman \ |
| 517 | --apk=$DEX_LOCATION/$TEST_NAME.jar \ |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 518 | --dex-location=$DEX_LOCATION/$TEST_NAME.jar" |
Nicolas Geoffray | 0b6a638 | 2017-03-10 09:38:35 +0000 | [diff] [blame] | 519 | COMPILE_FLAGS="${COMPILE_FLAGS} --profile-file=$DEX_LOCATION/$TEST_NAME.prof" |
| 520 | FLAGS="${FLAGS} -Xcompiler-option --profile-file=$DEX_LOCATION/$TEST_NAME.prof" |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 521 | if [ "$PROFILE" = "y" ]; then |
| 522 | profman_cmdline="${profman_cmdline} --create-profile-from=$DEX_LOCATION/profile \ |
| 523 | --reference-profile-file=$DEX_LOCATION/$TEST_NAME.prof" |
| 524 | else |
| 525 | profman_cmdline="${profman_cmdline} --generate-test-profile=$DEX_LOCATION/$TEST_NAME.prof \ |
| 526 | --generate-test-profile-seed=0" |
| 527 | fi |
Nicolas Geoffray | 0b6a638 | 2017-03-10 09:38:35 +0000 | [diff] [blame] | 528 | fi |
| 529 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 530 | if [ "$PREBUILD" = "y" ]; then |
Alex Light | afb5d19 | 2016-05-24 15:57:45 -0700 | [diff] [blame] | 531 | mkdir_locations="${mkdir_locations} ${DEX_LOCATION}/oat/$ISA" |
Calin Juravle | 857f058 | 2016-12-20 14:36:59 +0000 | [diff] [blame] | 532 | if [ "$APP_IMAGE" = "y" ]; then |
| 533 | # Pick a base that will force the app image to get relocated. |
| 534 | app_image="--base=0x4000 --app-image-file=$DEX_LOCATION/oat/$ISA/$TEST_NAME.art" |
| 535 | fi |
| 536 | |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 537 | dex2oat_cmdline="$INVOKE_WITH $ANDROID_ROOT/bin/dex2oatd \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 538 | $COMPILE_FLAGS \ |
Nicolas Geoffray | 68e25eb | 2014-10-29 23:02:11 +0000 | [diff] [blame] | 539 | --boot-image=${BOOT_IMAGE} \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 540 | --dex-file=$DEX_LOCATION/$TEST_NAME.jar \ |
Andreas Gampe | 1475924 | 2016-03-23 10:54:21 -0700 | [diff] [blame] | 541 | --oat-file=$DEX_LOCATION/oat/$ISA/$TEST_NAME.odex \ |
Jeff Hao | dcdc85b | 2015-12-04 14:06:18 -0800 | [diff] [blame] | 542 | ${app_image} \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 543 | --instruction-set=$ISA" |
Andreas Gampe | 4d2ef33 | 2015-08-05 09:24:45 -0700 | [diff] [blame] | 544 | if [ "x$INSTRUCTION_SET_FEATURES" != "x" ] ; then |
| 545 | dex2oat_cmdline="${dex2oat_cmdline} --instruction-set-features=${INSTRUCTION_SET_FEATURES}" |
| 546 | fi |
Andreas Gampe | 2ea7b70 | 2015-08-07 08:07:16 -0700 | [diff] [blame] | 547 | |
| 548 | # Add in a timeout. This is important for testing the compilation/verification time of |
| 549 | # pathological cases. |
| 550 | # Note: as we don't know how decent targets are (e.g., emulator), only do this on the host for |
| 551 | # now. We should try to improve this. |
| 552 | # The current value is rather arbitrary. run-tests should compile quickly. |
| 553 | if [ "$HOST" != "n" ]; then |
| 554 | # Use SIGRTMIN+2 to try to dump threads. |
| 555 | # Use -k 1m to SIGKILL it a minute later if it hasn't ended. |
| 556 | dex2oat_cmdline="timeout -k 1m -s SIGRTMIN+2 1m ${dex2oat_cmdline}" |
| 557 | fi |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 558 | if [ "$TEST_VDEX" = "y" ]; then |
Nicolas Geoffray | 7498105 | 2017-01-16 17:54:09 +0000 | [diff] [blame] | 559 | vdex_cmdline="${dex2oat_cmdline} ${VDEX_FILTER} --input-vdex=$DEX_LOCATION/oat/$ISA/$TEST_NAME.vdex" |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 560 | fi |
Andreas Gampe | 4d2ef33 | 2015-08-05 09:24:45 -0700 | [diff] [blame] | 561 | fi |
| 562 | |
Richard Uhler | 76f5cb6 | 2016-04-04 13:30:16 -0700 | [diff] [blame] | 563 | if [ "$STRIP_DEX" = "y" ]; then |
| 564 | strip_cmdline="zip --quiet --delete $DEX_LOCATION/$TEST_NAME.jar classes.dex" |
| 565 | fi |
| 566 | |
Igor Murashkin | 271a0f8 | 2017-02-14 21:14:17 +0000 | [diff] [blame] | 567 | if [ "$SYNC_BEFORE_RUN" = "y" ]; then |
| 568 | sync_cmdline="sync" |
| 569 | fi |
| 570 | |
Andreas Gampe | 4d2ef33 | 2015-08-05 09:24:45 -0700 | [diff] [blame] | 571 | DALVIKVM_ISA_FEATURES_ARGS="" |
| 572 | if [ "x$INSTRUCTION_SET_FEATURES" != "x" ] ; then |
| 573 | DALVIKVM_ISA_FEATURES_ARGS="-Xcompiler-option --instruction-set-features=${INSTRUCTION_SET_FEATURES}" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 574 | fi |
| 575 | |
Nicolas Geoffray | c525604 | 2015-12-26 19:41:37 +0000 | [diff] [blame] | 576 | # java.io.tmpdir can only be set at launch time. |
| 577 | TMP_DIR_OPTION="" |
| 578 | if [ "$HOST" = "n" ]; then |
| 579 | TMP_DIR_OPTION="-Djava.io.tmpdir=/data/local/tmp" |
| 580 | fi |
| 581 | |
Nicolas Geoffray | a73280d | 2016-02-15 13:05:16 +0000 | [diff] [blame] | 582 | # We set DumpNativeStackOnSigQuit to false to avoid stressing libunwind. |
| 583 | # b/27185632 |
| 584 | # b/24664297 |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 585 | dalvikvm_cmdline="$INVOKE_WITH $GDB $ANDROID_ROOT/bin/$DALVIKVM \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 586 | $GDB_ARGS \ |
| 587 | $FLAGS \ |
Andreas Gampe | 2b0fa5b | 2014-10-31 18:12:30 -0700 | [diff] [blame] | 588 | $DEX_VERIFY \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 589 | -XXlib:$LIB \ |
| 590 | $PATCHOAT \ |
| 591 | $DEX2OAT \ |
Andreas Gampe | 4d2ef33 | 2015-08-05 09:24:45 -0700 | [diff] [blame] | 592 | $DALVIKVM_ISA_FEATURES_ARGS \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 593 | $ZYGOTE \ |
| 594 | $JNI_OPTS \ |
| 595 | $INT_OPTS \ |
| 596 | $DEBUGGER_OPTS \ |
| 597 | $DALVIKVM_BOOT_OPT \ |
Nicolas Geoffray | c525604 | 2015-12-26 19:41:37 +0000 | [diff] [blame] | 598 | $TMP_DIR_OPTION \ |
Nicolas Geoffray | a73280d | 2016-02-15 13:05:16 +0000 | [diff] [blame] | 599 | -XX:DumpNativeStackOnSigQuit:false \ |
Mathieu Chartier | 031768a | 2015-08-27 10:25:02 -0700 | [diff] [blame] | 600 | -cp $DEX_LOCATION/$TEST_NAME.jar$SECONDARY_DEX $MAIN $ARGS" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 601 | |
Andreas Gampe | 3ad5d5e | 2015-02-03 18:26:55 -0800 | [diff] [blame] | 602 | # Remove whitespace. |
| 603 | dex2oat_cmdline=$(echo $dex2oat_cmdline) |
| 604 | dalvikvm_cmdline=$(echo $dalvikvm_cmdline) |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 605 | vdex_cmdline=$(echo $vdex_cmdline) |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 606 | profman_cmdline=$(echo $profman_cmdline) |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 607 | |
| 608 | if [ "$HOST" = "n" ]; then |
| 609 | adb root > /dev/null |
| 610 | adb wait-for-device |
| 611 | if [ "$QUIET" = "n" ]; then |
| 612 | adb shell rm -r $DEX_LOCATION |
| 613 | adb shell mkdir -p $DEX_LOCATION |
| 614 | adb push $TEST_NAME.jar $DEX_LOCATION |
| 615 | adb push $TEST_NAME-ex.jar $DEX_LOCATION |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 616 | if [ "$PROFILE" = "y" ] || [ "$RANDOM_PROFILE" = "y" ]; then |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 617 | adb push profile $DEX_LOCATION |
| 618 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 619 | else |
| 620 | adb shell rm -r $DEX_LOCATION >/dev/null 2>&1 |
| 621 | adb shell mkdir -p $DEX_LOCATION >/dev/null 2>&1 |
| 622 | adb push $TEST_NAME.jar $DEX_LOCATION >/dev/null 2>&1 |
| 623 | adb push $TEST_NAME-ex.jar $DEX_LOCATION >/dev/null 2>&1 |
Jeff Hao | 002b931 | 2017-03-27 16:23:08 -0700 | [diff] [blame] | 624 | if [ "$PROFILE" = "y" ] || [ "$RANDOM_PROFILE" = "y" ]; then |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 625 | adb push profile $DEX_LOCATION >/dev/null 2>&1 |
| 626 | fi |
| 627 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 628 | fi |
| 629 | |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 630 | LD_LIBRARY_PATH=/data/$TEST_DIRECTORY/art/$ISA |
Nicolas Geoffray | eb441dd | 2014-10-31 15:34:50 +0000 | [diff] [blame] | 631 | if [ "$ANDROID_ROOT" != "/system" ]; then |
| 632 | # Current default installation is dalvikvm 64bits and dex2oat 32bits, |
| 633 | # so we can only use LD_LIBRARY_PATH when testing on a local |
| 634 | # installation. |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 635 | LD_LIBRARY_PATH=$ANDROID_ROOT/$LIBRARY_DIRECTORY:$LD_LIBRARY_PATH |
Nicolas Geoffray | eb441dd | 2014-10-31 15:34:50 +0000 | [diff] [blame] | 636 | fi |
| 637 | |
Dimitry Ivanov | 49c2c92 | 2017-02-14 11:06:14 -0800 | [diff] [blame] | 638 | # System libraries needed by libarttestd.so |
| 639 | PUBLIC_LIBS=libart.so:libartd.so:libc++.so:libbacktrace.so:libbase.so:libnativehelper.so |
Dimitry Ivanov | 90d48f2 | 2016-05-05 17:24:28 -0700 | [diff] [blame] | 640 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 641 | # Create a script with the command. The command can get longer than the longest |
| 642 | # allowed adb command and there is no way to get the exit status from a adb shell |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 643 | # command. Dalvik cache is cleaned before running to make subsequent executions |
| 644 | # of the script follow the same runtime path. |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 645 | cmdline="cd $DEX_LOCATION && \ |
| 646 | export ANDROID_DATA=$DEX_LOCATION && \ |
Dimitry Ivanov | 90d48f2 | 2016-05-05 17:24:28 -0700 | [diff] [blame] | 647 | export ANDROID_ADDITIONAL_PUBLIC_LIBRARIES=$PUBLIC_LIBS && \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 648 | export DEX_LOCATION=$DEX_LOCATION && \ |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 649 | export ANDROID_ROOT=$ANDROID_ROOT && \ |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 650 | rm -rf ${DEX_LOCATION}/dalvik-cache/ && \ |
Alex Light | afb5d19 | 2016-05-24 15:57:45 -0700 | [diff] [blame] | 651 | mkdir -p ${mkdir_locations} && \ |
Sebastien Hertz | 7cde48c | 2015-01-20 16:06:43 +0100 | [diff] [blame] | 652 | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH && \ |
Nicolas Geoffray | 4f7fdd2 | 2015-04-24 11:57:37 +0100 | [diff] [blame] | 653 | export PATH=$ANDROID_ROOT/bin:$PATH && \ |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 654 | $profman_cmdline && \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 655 | $dex2oat_cmdline && \ |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 656 | $vdex_cmdline && \ |
Richard Uhler | 76f5cb6 | 2016-04-04 13:30:16 -0700 | [diff] [blame] | 657 | $strip_cmdline && \ |
Igor Murashkin | 271a0f8 | 2017-02-14 21:14:17 +0000 | [diff] [blame] | 658 | $sync_cmdline && \ |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 659 | $dalvikvm_cmdline" |
| 660 | |
| 661 | cmdfile=$(tempfile -p "cmd-" -s "-$TEST_NAME") |
| 662 | echo "$cmdline" > $cmdfile |
| 663 | |
| 664 | if [ "$DEV_MODE" = "y" ]; then |
| 665 | echo $cmdline |
| 666 | fi |
| 667 | |
| 668 | if [ "$QUIET" = "n" ]; then |
| 669 | adb push $cmdfile $DEX_LOCATION/cmdline.sh |
| 670 | else |
| 671 | adb push $cmdfile $DEX_LOCATION/cmdline.sh > /dev/null 2>&1 |
| 672 | fi |
| 673 | |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 674 | if [ "$DRY_RUN" != "y" ]; then |
| 675 | adb shell sh $DEX_LOCATION/cmdline.sh |
| 676 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 677 | |
| 678 | rm -f $cmdfile |
| 679 | else |
| 680 | export ANDROID_PRINTF_LOG=brief |
Andreas Gampe | a878082 | 2015-03-13 19:51:09 -0700 | [diff] [blame] | 681 | |
| 682 | # By default, and for prebuild dex2oat, we are interested in errors being logged. In dev mode |
| 683 | # we want debug messages. |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 684 | if [ "$EXTERNAL_LOG_TAGS" = "n" ]; then |
| 685 | if [ "$DEV_MODE" = "y" ]; then |
| 686 | export ANDROID_LOG_TAGS='*:d' |
| 687 | else |
| 688 | export ANDROID_LOG_TAGS='*:e' |
| 689 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 690 | fi |
Andreas Gampe | a878082 | 2015-03-13 19:51:09 -0700 | [diff] [blame] | 691 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 692 | export ANDROID_DATA="$DEX_LOCATION" |
Nicolas Geoffray | 8eedb47 | 2014-10-29 14:05:59 +0000 | [diff] [blame] | 693 | export ANDROID_ROOT="${ANDROID_ROOT}" |
Colin Cross | afd3c9e | 2016-09-16 13:47:21 -0700 | [diff] [blame] | 694 | export LD_LIBRARY_PATH="${ANDROID_ROOT}/${LIBRARY_DIRECTORY}:${ANDROID_ROOT}/${TEST_DIRECTORY}" |
| 695 | export DYLD_LIBRARY_PATH="${ANDROID_ROOT}/${LIBRARY_DIRECTORY}:${ANDROID_ROOT}/${TEST_DIRECTORY}" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 696 | export PATH="$PATH:${ANDROID_ROOT}/bin" |
| 697 | |
David Srbecky | c9ede38 | 2015-06-20 06:03:53 +0100 | [diff] [blame] | 698 | # Temporarily disable address space layout randomization (ASLR). |
| 699 | # This is needed on the host so that the linker loads core.oat at the necessary address. |
| 700 | export LD_USE_LOAD_BIAS=1 |
| 701 | |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 702 | cmdline="$dalvikvm_cmdline" |
| 703 | |
Hiroshi Yamauchi | 6ffb9cc | 2015-08-31 15:14:17 -0700 | [diff] [blame] | 704 | if [ "$TIME_OUT" = "gdb" ]; then |
| 705 | if [ `uname` = "Darwin" ]; then |
| 706 | # Fall back to timeout on Mac. |
| 707 | TIME_OUT="timeout" |
Hiroshi Yamauchi | c823eff | 2015-09-01 16:21:35 -0700 | [diff] [blame] | 708 | elif [ "$ISA" = "x86" ]; then |
| 709 | # prctl call may fail in 32-bit on an older (3.2) 64-bit Linux kernel. Fall back to timeout. |
| 710 | TIME_OUT="timeout" |
Hiroshi Yamauchi | 6ffb9cc | 2015-08-31 15:14:17 -0700 | [diff] [blame] | 711 | else |
| 712 | # Check if gdb is available. |
| 713 | gdb --eval-command="quit" > /dev/null 2>&1 |
| 714 | if [ $? != 0 ]; then |
| 715 | # gdb isn't available. Fall back to timeout. |
| 716 | TIME_OUT="timeout" |
| 717 | fi |
| 718 | fi |
| 719 | fi |
| 720 | |
| 721 | if [ "$TIME_OUT" = "timeout" ]; then |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 722 | # Add timeout command if time out is desired. |
Andreas Gampe | 038bb22 | 2015-01-13 19:48:14 -0800 | [diff] [blame] | 723 | # |
Andreas Gampe | 6fb9256 | 2016-08-01 21:53:57 -0700 | [diff] [blame] | 724 | # Note: We first send SIGRTMIN+2 (usually 36) to ART, which will induce a full thread dump |
| 725 | # before abort. However, dumping threads might deadlock, so we also use the "-k" |
| 726 | # option to definitely kill the child. |
| 727 | cmdline="timeout -k 120s -s SIGRTMIN+2 ${TIME_OUT_VALUE}s $cmdline" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 728 | fi |
| 729 | |
| 730 | if [ "$DEV_MODE" = "y" ]; then |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 731 | echo "mkdir -p ${mkdir_locations} && $profman_cmdline && $dex2oat_cmdline && $vdex_cmdline && $strip_cmdline && $sync_cmdline && $cmdline" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 732 | fi |
| 733 | |
| 734 | cd $ANDROID_BUILD_TOP |
| 735 | |
David Srbecky | 2e4afe8 | 2016-01-27 18:42:06 +0000 | [diff] [blame] | 736 | rm -rf ${DEX_LOCATION}/dalvik-cache/ |
Alex Light | afb5d19 | 2016-05-24 15:57:45 -0700 | [diff] [blame] | 737 | mkdir -p ${mkdir_locations} || exit 1 |
Calin Juravle | 13439f0 | 2017-02-21 01:17:21 -0800 | [diff] [blame] | 738 | $profman_cmdline || { echo "Profman failed." >&2 ; exit 2; } |
Andreas Gampe | a878082 | 2015-03-13 19:51:09 -0700 | [diff] [blame] | 739 | $dex2oat_cmdline || { echo "Dex2oat failed." >&2 ; exit 2; } |
Nicolas Geoffray | b0bbe8e | 2016-11-19 10:42:37 +0000 | [diff] [blame] | 740 | $vdex_cmdline || { echo "Dex2oat failed." >&2 ; exit 2; } |
Richard Uhler | 76f5cb6 | 2016-04-04 13:30:16 -0700 | [diff] [blame] | 741 | $strip_cmdline || { echo "Strip failed." >&2 ; exit 3; } |
Igor Murashkin | 271a0f8 | 2017-02-14 21:14:17 +0000 | [diff] [blame] | 742 | $sync_cmdline || { echo "Sync failed." >&2 ; exit 4; } |
Andreas Gampe | a878082 | 2015-03-13 19:51:09 -0700 | [diff] [blame] | 743 | |
| 744 | # For running, we must turn off logging when dex2oat or patchoat are missing. Otherwise we use |
| 745 | # the same defaults as for prebuilt: everything when --dev, otherwise errors and above only. |
Wojciech Staszkiewicz | d7a819a | 2016-09-01 14:43:39 -0700 | [diff] [blame] | 746 | if [ "$EXTERNAL_LOG_TAGS" = "n" ]; then |
| 747 | if [ "$DEV_MODE" = "y" ]; then |
| 748 | export ANDROID_LOG_TAGS='*:d' |
| 749 | elif [ "$USE_DEX2OAT_AND_PATCHOAT" = "n" ]; then |
| 750 | # All tests would log the error of failing dex2oat/patchoat. Be silent here and only |
| 751 | # log fatal events. |
| 752 | export ANDROID_LOG_TAGS='*:s' |
| 753 | else |
| 754 | # We are interested in LOG(ERROR) output. |
| 755 | export ANDROID_LOG_TAGS='*:e' |
| 756 | fi |
| 757 | fi |
| 758 | |
| 759 | if [ "$DRY_RUN" = "y" ]; then |
| 760 | exit 0 |
Andreas Gampe | a878082 | 2015-03-13 19:51:09 -0700 | [diff] [blame] | 761 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 762 | |
| 763 | if [ "$USE_GDB" = "y" ]; then |
| 764 | # When running under gdb, we cannot do piping and grepping... |
Dmitriy Ivanov | f57874d | 2014-10-07 13:43:23 -0700 | [diff] [blame] | 765 | $cmdline "$@" |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 766 | else |
Hiroshi Yamauchi | 6ffb9cc | 2015-08-31 15:14:17 -0700 | [diff] [blame] | 767 | if [ "$TIME_OUT" != "gdb" ]; then |
| 768 | trap 'kill -INT -$pid' INT |
| 769 | $cmdline "$@" 2>&1 & pid=$! |
| 770 | wait $pid |
| 771 | # Add extra detail if time out is enabled. |
| 772 | if [ ${PIPESTATUS[0]} = 124 ] && [ "$TIME_OUT" = "timeout" ]; then |
| 773 | echo -e "\e[91mTEST TIMED OUT!\e[0m" >&2 |
| 774 | fi |
| 775 | else |
| 776 | # With a thread dump that uses gdb if a timeout. |
| 777 | trap 'kill -INT -$pid' INT |
| 778 | $cmdline "$@" 2>&1 & pid=$! |
| 779 | # Spawn a watcher process. |
| 780 | ( sleep $TIME_OUT_VALUE && \ |
| 781 | echo "##### Thread dump using gdb on test timeout" && \ |
| 782 | ( gdb -q -p $pid --eval-command="info thread" --eval-command="thread apply all bt" \ |
| 783 | --eval-command="call exit(124)" --eval-command=quit || \ |
| 784 | kill $pid )) 2> /dev/null & watcher=$! |
| 785 | wait $pid |
| 786 | test_exit_status=$? |
| 787 | pkill -P $watcher 2> /dev/null # kill the sleep which will in turn end the watcher as well |
| 788 | if [ $test_exit_status = 0 ]; then |
| 789 | # The test finished normally. |
| 790 | exit 0 |
| 791 | else |
| 792 | # The test failed or timed out. |
| 793 | if [ $test_exit_status = 124 ]; then |
| 794 | # The test timed out. |
| 795 | echo -e "\e[91mTEST TIMED OUT!\e[0m" >&2 |
| 796 | fi |
| 797 | fi |
Nicolas Geoffray | 1a58b7f | 2014-10-06 12:23:04 +0100 | [diff] [blame] | 798 | fi |
| 799 | fi |
| 800 | fi |