Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | # |
| 3 | # Copyright (C) 2011 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 | |
Brian Carlstrom | 69b15fb | 2011-09-03 12:25:21 -0700 | [diff] [blame] | 17 | oatexec=oatexec |
Elliott Hughes | 4b3b727 | 2011-08-18 09:52:17 -0700 | [diff] [blame] | 18 | invoke_with= |
| 19 | |
| 20 | while true; do |
| 21 | if [ "$1" = "--invoke-with" ]; then |
| 22 | shift |
| 23 | invoke_with="$1" |
| 24 | shift |
| 25 | elif [ "$1" = "-d" ]; then |
Brian Carlstrom | 69b15fb | 2011-09-03 12:25:21 -0700 | [diff] [blame] | 26 | oatexec="oatexecd" |
Elliott Hughes | 4b3b727 | 2011-08-18 09:52:17 -0700 | [diff] [blame] | 27 | shift |
| 28 | elif expr "$1" : "--" >/dev/null 2>&1; then |
| 29 | echo "unknown option: $1" 1>&2 |
| 30 | exit 1 |
| 31 | else |
| 32 | break |
| 33 | fi |
| 34 | done |
| 35 | |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 36 | mkdir -p /tmp/android-data/art-cache |
| 37 | ANDROID_DATA=/tmp/android-data \ |
Brian Carlstrom | 223f20f | 2012-02-04 23:06:55 -0800 | [diff] [blame] | 38 | ANDROID_ROOT=$ANDROID_HOST_OUT \ |
| 39 | LD_LIBRARY_PATH=$ANDROID_HOST_OUT/lib \ |
| 40 | $invoke_with $ANDROID_HOST_OUT/bin/$oatexec \ |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 41 | -Xbootclasspath\ |
Brian Carlstrom | 223f20f | 2012-02-04 23:06:55 -0800 | [diff] [blame] | 42 | :$ANDROID_HOST_OUT/framework/core-hostdex.jar\ |
| 43 | :$ANDROID_HOST_OUT/framework/core-junit-hostdex.jar\ |
| 44 | :$ANDROID_HOST_OUT/framework/core-tests-hostdex.jar\ |
| 45 | :$ANDROID_HOST_OUT/framework/bouncycastle-hostdex.jar\ |
| 46 | :$ANDROID_HOST_OUT/framework/apache-xml-hostdex.jar \ |
Elliott Hughes | 40ef99e | 2011-08-11 17:44:34 -0700 | [diff] [blame] | 47 | $* |