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 | |
Vladimir Marko | 8bc5991 | 2020-02-12 10:52:22 +0000 | [diff] [blame] | 21 | // 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 Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 23 | TEST_DISABLED_FOR_ARM(); \ |
| 24 | TEST_DISABLED_FOR_ARM64(); \ |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 25 | |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 26 | TEST_F(OatDumpTest, TestImage) { |
Vladimir Marko | 8bc5991 | 2020-02-12 10:52:22 +0000 | [diff] [blame] | 27 | TEST_DISABLED_FOR_ARM_AND_ARM64(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 28 | std::string error_msg; |
Vladimir Marko | a64c1ad | 2021-03-08 14:27:05 +0000 | [diff] [blame] | 29 | ASSERT_TRUE(Exec(Flavor::kDynamic, kModeArt, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 30 | } |
| 31 | TEST_F(OatDumpTest, TestImageStatic) { |
Vladimir Marko | 8bc5991 | 2020-02-12 10:52:22 +0000 | [diff] [blame] | 32 | TEST_DISABLED_FOR_ARM_AND_ARM64(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 33 | TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS(); |
| 34 | std::string error_msg; |
Vladimir Marko | a64c1ad | 2021-03-08 14:27:05 +0000 | [diff] [blame] | 35 | ASSERT_TRUE(Exec(Flavor::kStatic, kModeArt, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | TEST_F(OatDumpTest, TestOatImage) { |
Vladimir Marko | 8bc5991 | 2020-02-12 10:52:22 +0000 | [diff] [blame] | 39 | TEST_DISABLED_FOR_ARM_AND_ARM64(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 40 | std::string error_msg; |
Vladimir Marko | a64c1ad | 2021-03-08 14:27:05 +0000 | [diff] [blame] | 41 | ASSERT_TRUE(Exec(Flavor::kDynamic, kModeCoreOat, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 42 | } |
| 43 | TEST_F(OatDumpTest, TestOatImageStatic) { |
Vladimir Marko | 8bc5991 | 2020-02-12 10:52:22 +0000 | [diff] [blame] | 44 | TEST_DISABLED_FOR_ARM_AND_ARM64(); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 45 | TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS(); |
| 46 | std::string error_msg; |
Vladimir Marko | a64c1ad | 2021-03-08 14:27:05 +0000 | [diff] [blame] | 47 | ASSERT_TRUE(Exec(Flavor::kStatic, kModeCoreOat, {}, kListAndCode)); |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 48 | } |
Andreas Gampe | 38aa0b5 | 2018-07-10 23:26:55 -0700 | [diff] [blame] | 49 | |
Vladimir Marko | 1352f13 | 2017-04-28 15:28:29 +0100 | [diff] [blame] | 50 | } // namespace art |