blob: 58b78b5f44695526bddd58955e0def8b3d762480 [file] [log] [blame]
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -07001#
2# Copyright (C) 2014 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# ==========================================================
18# Setup some common variables for the different build
19# targets here.
20# ==========================================================
Adam Lesinski16c4d152014-01-24 13:27:13 -080021LOCAL_PATH:= $(call my-dir)
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070022testFiles := \
Adam Lesinskia7d1d732014-10-01 18:24:54 -070023 AttributeFinder_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070024 ByteBucketArray_test.cpp \
Adam Lesinski31245b42014-08-22 19:10:56 -070025 Config_test.cpp \
26 ConfigLocale_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070027 Idmap_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070028 ResTable_test.cpp \
29 Split_test.cpp \
Adam Lesinski60293192014-10-21 18:36:42 -070030 TestHelpers.cpp \
Adam Lesinski9d9cc622014-08-29 14:10:04 -070031 Theme_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070032 TypeWrappers_test.cpp \
33 ZipUtils_test.cpp
34
35# ==========================================================
36# Build the host tests: libandroidfw_tests
37# ==========================================================
Adam Lesinski16c4d152014-01-24 13:27:13 -080038include $(CLEAR_VARS)
39
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070040LOCAL_MODULE := libandroidfw_tests
Adam Lesinski16c4d152014-01-24 13:27:13 -080041
Andreas Gampe2204f0b2014-10-21 23:04:54 -070042LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
43# gtest is broken.
44LOCAL_CFLAGS += -Wno-unnamed-type-template-args
45
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070046LOCAL_SRC_FILES := $(testFiles)
47LOCAL_STATIC_LIBRARIES := \
48 libandroidfw \
49 libutils \
50 libcutils \
Andreas Gampe2204f0b2014-10-21 23:04:54 -070051 liblog
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070052
53include $(BUILD_HOST_NATIVE_TEST)
54
55
56# ==========================================================
57# Build the device tests: libandroidfw_tests
58# ==========================================================
Adam Lesinskif001e372014-10-20 16:15:33 -070059ifneq ($(SDK_ONLY),true)
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070060include $(CLEAR_VARS)
61
62LOCAL_MODULE := libandroidfw_tests
63
Andreas Gampe2204f0b2014-10-21 23:04:54 -070064LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
65# gtest is broken.
66LOCAL_CFLAGS += -Wno-unnamed-type-template-args
67
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070068LOCAL_SRC_FILES := $(testFiles) \
69 BackupData_test.cpp \
70 ObbFile_test.cpp
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070071LOCAL_SHARED_LIBRARIES := \
Adam Lesinski16c4d152014-01-24 13:27:13 -080072 libandroidfw \
73 libcutils \
74 libutils \
75 libui \
Adam Lesinski16c4d152014-01-24 13:27:13 -080076
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070077include $(BUILD_NATIVE_TEST)
Adam Lesinskif001e372014-10-20 16:15:33 -070078endif # Not SDK_ONLY
79