1 // Build the unit tests. 2 3 cc_test { 4 name: "JniInvocation_test", 5 test_suites: ["device-tests"], 6 host_supported: true, 7 srcs: ["JniInvocation_test.cpp"], 8 cflags: ["-Wall", "-Werror"], 9 shared_libs: ["libnativehelper"], 10 } 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 } 61