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 mips as they are taking too long to run. b/27824283.
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 
TEST_F(OatDumpTest,TestImage)28 TEST_F(OatDumpTest, TestImage) {
29   TEST_DISABLED_FOR_ARM_AND_MIPS();
30   std::string error_msg;
31   ASSERT_TRUE(Exec(kDynamic, kModeArt, {}, kListAndCode));
32 }
TEST_F(OatDumpTest,TestImageStatic)33 TEST_F(OatDumpTest, TestImageStatic) {
34   TEST_DISABLED_FOR_ARM_AND_MIPS();
35   TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
36   std::string error_msg;
37   ASSERT_TRUE(Exec(kStatic, kModeArt, {}, kListAndCode));
38 }
39 
TEST_F(OatDumpTest,TestOatImage)40 TEST_F(OatDumpTest, TestOatImage) {
41   TEST_DISABLED_FOR_ARM_AND_MIPS();
42   std::string error_msg;
43   ASSERT_TRUE(Exec(kDynamic, kModeCoreOat, {}, kListAndCode));
44 }
TEST_F(OatDumpTest,TestOatImageStatic)45 TEST_F(OatDumpTest, TestOatImageStatic) {
46   TEST_DISABLED_FOR_ARM_AND_MIPS();
47   TEST_DISABLED_FOR_NON_STATIC_HOST_BUILDS();
48   std::string error_msg;
49   ASSERT_TRUE(Exec(kStatic, kModeCoreOat, {}, kListAndCode));
50 }
51 
52 }  // namespace art
53