Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 1 | /* |
Vladimir Marko | 421087b | 2018-02-27 11:00:17 +0000 | [diff] [blame] | 2 | * Copyright (C) 2017 The Android Open Source Project |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 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 | |
| 19 | namespace art { |
| 20 | |
| 21 | // Disable tests on arm and mips as they are taking too long to run. b/27824283. |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 22 | #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 Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 28 | TEST_F(OatDumpTest, TestImage) { |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 29 | TEST_DISABLED_FOR_ARM_AND_MIPS(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 30 | std::string error_msg; |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 31 | ASSERT_TRUE(Exec(kDynamic, kModeArt, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 32 | } |
| 33 | TEST_F(OatDumpTest, TestImageStatic) { |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 34 | TEST_DISABLED_FOR_ARM_AND_MIPS(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 35 | TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS(); |
| 36 | std::string error_msg; |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 37 | ASSERT_TRUE(Exec(kStatic, kModeArt, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | TEST_F(OatDumpTest, TestOatImage) { |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 41 | TEST_DISABLED_FOR_ARM_AND_MIPS(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 42 | std::string error_msg; |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 43 | ASSERT_TRUE(Exec(kDynamic, kModeOat, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 44 | } |
| 45 | TEST_F(OatDumpTest, TestOatImageStatic) { |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 46 | TEST_DISABLED_FOR_ARM_AND_MIPS(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 47 | TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS(); |
| 48 | std::string error_msg; |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 49 | ASSERT_TRUE(Exec(kStatic, kModeOat, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 50 | } |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 51 | |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 52 | } // namespace art |