blob: 7308f828b174cd93aae2c34a79c8c92e8a1fbfbd [file] [log] [blame]
Vladimir Marko1352f132017-04-28 15:28:29 +01001/*
Vladimir Marko421087b2018-02-27 11:00:17 +00002 * Copyright (C) 2017 The Android Open Source Project
Vladimir Marko1352f132017-04-28 15:28:29 +01003 *
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
Vladimir Marko8bc59912020-02-12 10:52:22 +000021// Disable tests on arm and arm64 as they are taking too long to run. b/27824283.
22#define TEST_DISABLED_FOR_ARM_AND_ARM64() \
Andreas Gampe38aa0b52018-07-10 23:26:55 -070023 TEST_DISABLED_FOR_ARM(); \
24 TEST_DISABLED_FOR_ARM64(); \
Andreas Gampe38aa0b52018-07-10 23:26:55 -070025
Vladimir Marko1352f132017-04-28 15:28:29 +010026TEST_F(OatDumpTest, TestImage) {
Vladimir Marko8bc59912020-02-12 10:52:22 +000027 TEST_DISABLED_FOR_ARM_AND_ARM64();
Vladimir Marko1352f132017-04-28 15:28:29 +010028 std::string error_msg;
Vladimir Markoa64c1ad2021-03-08 14:27:05 +000029 ASSERT_TRUE(Exec(Flavor::kDynamic, kModeArt, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010030}
31TEST_F(OatDumpTest, TestImageStatic) {
Vladimir Marko8bc59912020-02-12 10:52:22 +000032 TEST_DISABLED_FOR_ARM_AND_ARM64();
Vladimir Marko1352f132017-04-28 15:28:29 +010033 TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
34 std::string error_msg;
Vladimir Markoa64c1ad2021-03-08 14:27:05 +000035 ASSERT_TRUE(Exec(Flavor::kStatic, kModeArt, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010036}
37
38TEST_F(OatDumpTest, TestOatImage) {
Vladimir Marko8bc59912020-02-12 10:52:22 +000039 TEST_DISABLED_FOR_ARM_AND_ARM64();
Vladimir Marko1352f132017-04-28 15:28:29 +010040 std::string error_msg;
Vladimir Markoa64c1ad2021-03-08 14:27:05 +000041 ASSERT_TRUE(Exec(Flavor::kDynamic, kModeCoreOat, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010042}
43TEST_F(OatDumpTest, TestOatImageStatic) {
Vladimir Marko8bc59912020-02-12 10:52:22 +000044 TEST_DISABLED_FOR_ARM_AND_ARM64();
Vladimir Marko1352f132017-04-28 15:28:29 +010045 TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
46 std::string error_msg;
Vladimir Markoa64c1ad2021-03-08 14:27:05 +000047 ASSERT_TRUE(Exec(Flavor::kStatic, kModeCoreOat, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010048}
Andreas Gampe38aa0b52018-07-10 23:26:55 -070049
Vladimir Marko1352f132017-04-28 15:28:29 +010050} // namespace art