blob: 8aaa887a90eab5bc44eb7ec29a960920931bd562 [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 := \
23 ByteBucketArray_test.cpp \
Adam Lesinski31245b42014-08-22 19:10:56 -070024 Config_test.cpp \
25 ConfigLocale_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070026 Idmap_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070027 ResTable_test.cpp \
28 Split_test.cpp \
Adam Lesinski9d9cc622014-08-29 14:10:04 -070029 Theme_test.cpp \
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070030 TypeWrappers_test.cpp \
31 ZipUtils_test.cpp
32
33# ==========================================================
34# Build the host tests: libandroidfw_tests
35# ==========================================================
Adam Lesinski16c4d152014-01-24 13:27:13 -080036include $(CLEAR_VARS)
37
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070038LOCAL_MODULE := libandroidfw_tests
Adam Lesinski16c4d152014-01-24 13:27:13 -080039
Andreas Gampe2204f0b2014-10-21 23:04:54 -070040LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
41# gtest is broken.
42LOCAL_CFLAGS += -Wno-unnamed-type-template-args
43
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070044LOCAL_SRC_FILES := $(testFiles)
45LOCAL_STATIC_LIBRARIES := \
46 libandroidfw \
47 libutils \
48 libcutils \
Andreas Gampe2204f0b2014-10-21 23:04:54 -070049 liblog
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070050
51include $(BUILD_HOST_NATIVE_TEST)
52
53
54# ==========================================================
55# Build the device tests: libandroidfw_tests
56# ==========================================================
57include $(CLEAR_VARS)
58
59LOCAL_MODULE := libandroidfw_tests
60
Andreas Gampe2204f0b2014-10-21 23:04:54 -070061LOCAL_CFLAGS += -Wall -Werror -Wunused -Wunreachable-code
62# gtest is broken.
63LOCAL_CFLAGS += -Wno-unnamed-type-template-args
64
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070065LOCAL_SRC_FILES := $(testFiles) \
66 BackupData_test.cpp \
67 ObbFile_test.cpp
68
69LOCAL_SHARED_LIBRARIES := \
Adam Lesinski16c4d152014-01-24 13:27:13 -080070 libandroidfw \
71 libcutils \
72 libutils \
73 libui \
Adam Lesinski16c4d152014-01-24 13:27:13 -080074
Adam Lesinskif90f2f8d2014-06-06 14:27:00 -070075include $(BUILD_NATIVE_TEST)