blob: a34428625948c4c1cb437f1fac08a39db1c58af6 [file] [log] [blame]
Vladimir Marko421087b2018-02-27 11:00:17 +00001/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "oatdump_test.h"
18
19namespace art {
20
21TEST_F(OatDumpTest, TestAppWithBootImage) {
Andreas Gampe38aa0b52018-07-10 23:26:55 -070022 ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M"}));
23 ASSERT_TRUE(Exec(kDynamic, kModeOatWithBootImage, {}, kListAndCode));
Vladimir Marko421087b2018-02-27 11:00:17 +000024}
25TEST_F(OatDumpTest, TestAppWithBootImageStatic) {
26 TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
Andreas Gampe38aa0b52018-07-10 23:26:55 -070027 ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M"}));
28 ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode));
Vladimir Marko421087b2018-02-27 11:00:17 +000029}
30
31TEST_F(OatDumpTest, TestPicAppWithBootImage) {
Andreas Gampe38aa0b52018-07-10 23:26:55 -070032 ASSERT_TRUE(GenerateAppOdexFile(kDynamic, {"--runtime-arg", "-Xmx64M", "--compile-pic"}));
33 ASSERT_TRUE(Exec(kDynamic, kModeOatWithBootImage, {}, kListAndCode));
Vladimir Marko421087b2018-02-27 11:00:17 +000034}
35TEST_F(OatDumpTest, TestPicAppWithBootImageStatic) {
36 TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
Andreas Gampe38aa0b52018-07-10 23:26:55 -070037 ASSERT_TRUE(GenerateAppOdexFile(kStatic, {"--runtime-arg", "-Xmx64M", "--compile-pic"}));
38 ASSERT_TRUE(Exec(kStatic, kModeOatWithBootImage, {}, kListAndCode));
Vladimir Marko421087b2018-02-27 11:00:17 +000039}
40
41} // namespace art