blob: de48b04214631f31ef52c97c1cd2d580071e7838 [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
21// Disable tests on arm and mips as they are taking too long to run. b/27824283.
Andreas Gampe38aa0b52018-07-10 23:26:55 -070022#define TEST_DISABLED_FOR_ARM_AND_MIPS() \
23 TEST_DISABLED_FOR_ARM(); \
24 TEST_DISABLED_FOR_ARM64(); \
25 TEST_DISABLED_FOR_MIPS(); \
26 TEST_DISABLED_FOR_MIPS64(); \
27
Vladimir Marko1352f132017-04-28 15:28:29 +010028TEST_F(OatDumpTest, TestImage) {
Andreas Gampe38aa0b52018-07-10 23:26:55 -070029 TEST_DISABLED_FOR_ARM_AND_MIPS();
Vladimir Marko1352f132017-04-28 15:28:29 +010030 std::string error_msg;
Andreas Gampe38aa0b52018-07-10 23:26:55 -070031 ASSERT_TRUE(Exec(kDynamic, kModeArt, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010032}
33TEST_F(OatDumpTest, TestImageStatic) {
Andreas Gampe38aa0b52018-07-10 23:26:55 -070034 TEST_DISABLED_FOR_ARM_AND_MIPS();
Vladimir Marko1352f132017-04-28 15:28:29 +010035 TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
36 std::string error_msg;
Andreas Gampe38aa0b52018-07-10 23:26:55 -070037 ASSERT_TRUE(Exec(kStatic, kModeArt, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010038}
39
40TEST_F(OatDumpTest, TestOatImage) {
Andreas Gampe38aa0b52018-07-10 23:26:55 -070041 TEST_DISABLED_FOR_ARM_AND_MIPS();
Vladimir Marko1352f132017-04-28 15:28:29 +010042 std::string error_msg;
Andreas Gampe38aa0b52018-07-10 23:26:55 -070043 ASSERT_TRUE(Exec(kDynamic, kModeOat, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010044}
45TEST_F(OatDumpTest, TestOatImageStatic) {
Andreas Gampe38aa0b52018-07-10 23:26:55 -070046 TEST_DISABLED_FOR_ARM_AND_MIPS();
Vladimir Marko1352f132017-04-28 15:28:29 +010047 TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
48 std::string error_msg;
Andreas Gampe38aa0b52018-07-10 23:26:55 -070049 ASSERT_TRUE(Exec(kStatic, kModeOat, {}, kListAndCode));
Vladimir Marko1352f132017-04-28 15:28:29 +010050}
Andreas Gampe38aa0b52018-07-10 23:26:55 -070051
Vladimir Marko1352f132017-04-28 15:28:29 +010052} // namespace art