| Tomasz Wasilczyk | e38d3a6 | 2017-05-08 15:29:10 -0700 | [diff] [blame] | 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 | cc_defaults { | 
|  | 18 | name: "libnativebridge-dummy-defaults", | 
|  | 19 |  | 
|  | 20 | host_supported: true, | 
|  | 21 | cflags: [ | 
|  | 22 | "-Wall", | 
|  | 23 | "-Wextra", | 
|  | 24 | "-Werror", | 
|  | 25 | ], | 
| Jiyong Park | 00f2ebe | 2019-01-29 00:08:55 +0900 | [diff] [blame] | 26 | header_libs: ["libnativebridge-headers"], | 
| Tomasz Wasilczyk | e38d3a6 | 2017-05-08 15:29:10 -0700 | [diff] [blame] | 27 | cppflags: ["-fvisibility=protected"], | 
| Tomasz Wasilczyk | e38d3a6 | 2017-05-08 15:29:10 -0700 | [diff] [blame] | 28 | } | 
|  | 29 |  | 
|  | 30 | cc_library_shared { | 
|  | 31 | name: "libnativebridge-dummy", | 
|  | 32 | srcs: ["DummyNativeBridge.cpp"], | 
|  | 33 | defaults: ["libnativebridge-dummy-defaults"], | 
|  | 34 | } | 
|  | 35 |  | 
|  | 36 | cc_library_shared { | 
|  | 37 | name: "libnativebridge2-dummy", | 
|  | 38 | srcs: ["DummyNativeBridge2.cpp"], | 
|  | 39 | defaults: ["libnativebridge-dummy-defaults"], | 
|  | 40 | } | 
|  | 41 |  | 
|  | 42 | cc_library_shared { | 
|  | 43 | name: "libnativebridge3-dummy", | 
|  | 44 | srcs: ["DummyNativeBridge3.cpp"], | 
|  | 45 | defaults: ["libnativebridge-dummy-defaults"], | 
|  | 46 | } | 
| Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 47 |  | 
|  | 48 | // Build the unit tests. | 
| Jiyong Park | 00f2ebe | 2019-01-29 00:08:55 +0900 | [diff] [blame] | 49 | cc_defaults { | 
|  | 50 | name: "libnativebridge-tests-defaults", | 
| Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 51 | test_per_src: true, | 
|  | 52 |  | 
|  | 53 | cflags: [ | 
|  | 54 | "-Wall", | 
|  | 55 | "-Werror", | 
|  | 56 | ], | 
|  | 57 |  | 
|  | 58 | srcs: [ | 
|  | 59 | "CodeCacheCreate_test.cpp", | 
|  | 60 | "CodeCacheExists_test.cpp", | 
|  | 61 | "CodeCacheStatFail_test.cpp", | 
|  | 62 | "CompleteFlow_test.cpp", | 
|  | 63 | "InvalidCharsNativeBridge_test.cpp", | 
|  | 64 | "NativeBridge2Signal_test.cpp", | 
|  | 65 | "NativeBridgeVersion_test.cpp", | 
|  | 66 | "NeedsNativeBridge_test.cpp", | 
|  | 67 | "PreInitializeNativeBridge_test.cpp", | 
|  | 68 | "PreInitializeNativeBridgeFail1_test.cpp", | 
|  | 69 | "PreInitializeNativeBridgeFail2_test.cpp", | 
|  | 70 | "ReSetupNativeBridge_test.cpp", | 
|  | 71 | "UnavailableNativeBridge_test.cpp", | 
|  | 72 | "ValidNameNativeBridge_test.cpp", | 
|  | 73 | "NativeBridge3UnloadLibrary_test.cpp", | 
|  | 74 | "NativeBridge3GetError_test.cpp", | 
|  | 75 | "NativeBridge3IsPathSupported_test.cpp", | 
|  | 76 | "NativeBridge3InitAnonymousNamespace_test.cpp", | 
|  | 77 | "NativeBridge3CreateNamespace_test.cpp", | 
|  | 78 | "NativeBridge3LoadLibraryExt_test.cpp", | 
|  | 79 | ], | 
|  | 80 |  | 
|  | 81 | shared_libs: [ | 
|  | 82 | "liblog", | 
| Dan Willemsen | 3e963f9 | 2018-10-31 10:32:32 -0700 | [diff] [blame] | 83 | "libnativebridge-dummy", | 
|  | 84 | ], | 
|  | 85 | header_libs: ["libbase_headers"], | 
|  | 86 | } | 
| Nicolas Geoffray | d9b4d9b | 2019-01-10 16:27:54 +0000 | [diff] [blame] | 87 |  | 
| Jiyong Park | 00f2ebe | 2019-01-29 00:08:55 +0900 | [diff] [blame] | 88 | cc_test { | 
|  | 89 | name: "libnativebridge-tests", | 
|  | 90 | defaults: ["libnativebridge-tests-defaults"], | 
|  | 91 | host_supported: true, | 
|  | 92 | shared_libs: ["libnativebridge"], | 
|  | 93 | } | 
|  | 94 |  | 
|  | 95 | cc_test { | 
|  | 96 | name: "libnativebridge-lazy-tests", | 
|  | 97 | defaults: ["libnativebridge-tests-defaults"], | 
|  | 98 | shared_libs: ["libnativebridge_lazy"], | 
|  | 99 | } | 
|  | 100 |  | 
| Nicolas Geoffray | d9b4d9b | 2019-01-10 16:27:54 +0000 | [diff] [blame] | 101 | // Build the test for the C API. | 
| Nicolas Geoffray | b6b910b | 2019-01-14 13:40:16 +0000 | [diff] [blame] | 102 | cc_test { | 
| Nicolas Geoffray | d9b4d9b | 2019-01-10 16:27:54 +0000 | [diff] [blame] | 103 | name: "libnativebridge-api-tests", | 
|  | 104 | host_supported: true, | 
|  | 105 | test_per_src: true, | 
|  | 106 | srcs: [ | 
|  | 107 | "NativeBridgeApi.c", | 
|  | 108 | ], | 
| Jiyong Park | 00f2ebe | 2019-01-29 00:08:55 +0900 | [diff] [blame] | 109 | header_libs: ["libnativebridge-headers"], | 
| Nicolas Geoffray | d9b4d9b | 2019-01-10 16:27:54 +0000 | [diff] [blame] | 110 | } |