1 #!/bin/bash 2 # 3 # Copyright (C) 2014 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 # ensure flags includes prebuild and relocate. It doesn't make sense unless we 18 # have a oat file we want to relocate. 19 # TODO Unfortunately we have no way to force prebuild on for both host and target (or skip if not on). 20 flags="${@/--relocate/}" 21 flags="${flags/--no-relocate/}" 22 flags="${flags} --relocate" 23 24 # Make sure we can run without relocation 25 echo "Run without dex2oat/patchoat" 26 # /bin/false is actually not even there for either, so the exec will fail. 27 # Unfortunately there is no equivalent to /bin/false in android. 28 ${RUN} ${flags} --runtime-option -Xnodex2oat 29 30 # Make sure we can run with the oat file. 31 echo "Run with dexoat/patchoat" 32 ${RUN} ${flags} --runtime-option -Xdex2oat 33 34 # Make sure we can run with the default settings. 35 echo "Run default" 36 ${RUN} ${flags} 37