1 /*
2  * Copyright (C) 2017 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 
19 namespace art {
20 
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() \
23     TEST_DISABLED_FOR_ARM(); \
24     TEST_DISABLED_FOR_ARM64(); \
25 
TEST_F(OatDumpTest,TestImage)26 TEST_F(OatDumpTest, TestImage) {
27   TEST_DISABLED_FOR_ARM_AND_ARM64();
28   std::string error_msg;
29   ASSERT_TRUE(Exec(kDynamic, kModeArt, {}, kListAndCode));
30 }
TEST_F(OatDumpTest,TestImageStatic)31 TEST_F(OatDumpTest, TestImageStatic) {
32   TEST_DISABLED_FOR_ARM_AND_ARM64();
33   TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
34   std::string error_msg;
35   ASSERT_TRUE(Exec(kStatic, kModeArt, {}, kListAndCode));
36 }
37 
TEST_F(OatDumpTest,TestOatImage)38 TEST_F(OatDumpTest, TestOatImage) {
39   TEST_DISABLED_FOR_ARM_AND_ARM64();
40   std::string error_msg;
41   ASSERT_TRUE(Exec(kDynamic, kModeCoreOat, {}, kListAndCode));
42 }
TEST_F(OatDumpTest,TestOatImageStatic)43 TEST_F(OatDumpTest, TestOatImageStatic) {
44   TEST_DISABLED_FOR_ARM_AND_ARM64();
45   TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
46   std::string error_msg;
47   ASSERT_TRUE(Exec(kStatic, kModeCoreOat, {}, kListAndCode));
48 }
49 
50 }  // namespace art
51