Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 1 | // Build the unit tests. |
| 2 | |
| 3 | cc_test { |
| 4 | name: "JniInvocation_test", |
Dan Shi | 8ffbd0d | 2017-03-29 23:49:45 -0700 | [diff] [blame] | 5 | test_suites: ["device-tests"], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 6 | host_supported: true, |
Nicolas Geoffray | 396b56f | 2017-12-09 12:48:21 +0000 | [diff] [blame] | 7 | srcs: ["JniInvocation_test.cpp"], |
Chih-Hung Hsieh | bc2a237 | 2017-10-03 10:39:11 -0700 | [diff] [blame] | 8 | cflags: ["-Wall", "-Werror"], |
Colin Cross | cf47d9b | 2016-07-27 10:35:53 -0700 | [diff] [blame] | 9 | shared_libs: ["libnativehelper"], |
| 10 | } |
Igor Murashkin | a1969c4 | 2018-02-16 13:30:57 -0800 | [diff] [blame] | 11 | |
| 12 | cc_test { |
| 13 | name: "JniSafeRegisterNativeMethods_test", |
| 14 | host_supported: true, |
| 15 | srcs: ["JniSafeRegisterNativeMethods_test.cpp"], |
| 16 | |
| 17 | cflags: [ |
| 18 | // Base set of cflags used by all things ART. |
| 19 | "-fno-rtti", |
| 20 | "-ggdb3", |
| 21 | "-Wall", |
| 22 | "-Werror", |
| 23 | "-Wextra", |
| 24 | "-Wstrict-aliasing", |
| 25 | "-fstrict-aliasing", |
| 26 | "-Wunreachable-code", |
| 27 | "-Wredundant-decls", |
| 28 | "-Wshadow", |
| 29 | "-Wunused", |
| 30 | "-fvisibility=protected", |
| 31 | |
| 32 | // Warn about thread safety violations with clang. |
| 33 | "-Wthread-safety", |
| 34 | "-Wthread-safety-negative", |
| 35 | |
| 36 | // Warn if switch fallthroughs aren't annotated. |
| 37 | "-Wimplicit-fallthrough", |
| 38 | |
| 39 | // Enable float equality warnings. |
| 40 | "-Wfloat-equal", |
| 41 | |
| 42 | // Enable warning of converting ints to void*. |
| 43 | "-Wint-to-void-pointer-cast", |
| 44 | |
| 45 | // Enable warning of wrong unused annotations. |
| 46 | "-Wused-but-marked-unused", |
| 47 | |
| 48 | // Enable warning for deprecated language features. |
| 49 | "-Wdeprecated", |
| 50 | |
| 51 | // Enable warning for unreachable break & return. |
| 52 | "-Wunreachable-code-break", |
| 53 | "-Wunreachable-code-return", |
| 54 | |
| 55 | // Enable thread annotations for std::mutex, etc. |
| 56 | "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS", |
| 57 | ], |
| 58 | |
| 59 | shared_libs: ["libnativehelper"], |
| 60 | } |