blob: c634900218afb7f03a2caf19bc89b202e43f1a34 [file] [log] [blame]
Alex Light9dcc4572014-08-14 14:16:26 -07001#!/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.
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -080019flags="$@"
20
21# This test is supposed to test with oat files. Make sure that the no-prebuild flag isn't set,
22# or complain.
23# Note: prebuild is the default.
24if [[ "${flags}" == *--no-prebuild* ]] ; then
25 echo "Test 117-nopatchoat is not intended to run in no-prebuild mode."
26 exit 1
27fi
28
29# This test is supposed to test relocation. Make sure that the no-relocate flag isn't set,
30# or complain.
31# Note: relocate is the default.
32if [[ "${flags}" == *--no-relocate* ]] ; then
33 echo "Test 117-nopatchoat is not intended to run in no-relocate mode."
34 exit 1
35fi
Alex Light9dcc4572014-08-14 14:16:26 -070036
37# Make sure we can run without relocation
38echo "Run without dex2oat/patchoat"
Alex Light9dcc4572014-08-14 14:16:26 -070039${RUN} ${flags} --runtime-option -Xnodex2oat
40
41# Make sure we can run with the oat file.
42echo "Run with dexoat/patchoat"
43${RUN} ${flags} --runtime-option -Xdex2oat
44
45# Make sure we can run with the default settings.
46echo "Run default"
47${RUN} ${flags}