blob: 222bc4c3ee823281ee966d5da34d7b4260c32270 [file] [log] [blame]
Tomasz Wasilczyke38d3a62017-05-08 15:29:10 -07001//
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
17cc_defaults {
18 name: "libnativebridge-dummy-defaults",
19
20 host_supported: true,
21 cflags: [
22 "-Wall",
23 "-Wextra",
24 "-Werror",
25 ],
Steven Morelandb2b88e32017-06-30 12:46:57 -070026 header_libs: ["libnativebridge-dummy-headers"],
Tomasz Wasilczyke38d3a62017-05-08 15:29:10 -070027 cppflags: ["-fvisibility=protected"],
Tomasz Wasilczyke38d3a62017-05-08 15:29:10 -070028}
29
30cc_library_shared {
31 name: "libnativebridge-dummy",
32 srcs: ["DummyNativeBridge.cpp"],
33 defaults: ["libnativebridge-dummy-defaults"],
34}
35
36cc_library_shared {
37 name: "libnativebridge2-dummy",
38 srcs: ["DummyNativeBridge2.cpp"],
39 defaults: ["libnativebridge-dummy-defaults"],
40}
41
42cc_library_shared {
43 name: "libnativebridge3-dummy",
44 srcs: ["DummyNativeBridge3.cpp"],
45 defaults: ["libnativebridge-dummy-defaults"],
46}
Dan Willemsen3e963f92018-10-31 10:32:32 -070047
48// Build the unit tests.
49cc_test {
50 name: "libnativebridge-tests",
51 host_supported: true,
52 test_per_src: true,
53
54 cflags: [
55 "-Wall",
56 "-Werror",
57 ],
58
59 srcs: [
60 "CodeCacheCreate_test.cpp",
61 "CodeCacheExists_test.cpp",
62 "CodeCacheStatFail_test.cpp",
63 "CompleteFlow_test.cpp",
64 "InvalidCharsNativeBridge_test.cpp",
65 "NativeBridge2Signal_test.cpp",
66 "NativeBridgeVersion_test.cpp",
67 "NeedsNativeBridge_test.cpp",
68 "PreInitializeNativeBridge_test.cpp",
69 "PreInitializeNativeBridgeFail1_test.cpp",
70 "PreInitializeNativeBridgeFail2_test.cpp",
71 "ReSetupNativeBridge_test.cpp",
72 "UnavailableNativeBridge_test.cpp",
73 "ValidNameNativeBridge_test.cpp",
74 "NativeBridge3UnloadLibrary_test.cpp",
75 "NativeBridge3GetError_test.cpp",
76 "NativeBridge3IsPathSupported_test.cpp",
77 "NativeBridge3InitAnonymousNamespace_test.cpp",
78 "NativeBridge3CreateNamespace_test.cpp",
79 "NativeBridge3LoadLibraryExt_test.cpp",
80 ],
81
82 shared_libs: [
83 "liblog",
84 "libnativebridge",
85 "libnativebridge-dummy",
86 ],
87 header_libs: ["libbase_headers"],
88}