blob: a5bdee9e95ef2a7acbb8144a36f252fddf1b621e [file] [log] [blame]
Colin Crosscf47d9b2016-07-27 10:35:53 -07001// Build the unit tests.
2
3cc_test {
4 name: "JniInvocation_test",
Dan Shi8ffbd0d2017-03-29 23:49:45 -07005 test_suites: ["device-tests"],
Colin Crosscf47d9b2016-07-27 10:35:53 -07006 host_supported: true,
Nicolas Geoffray396b56f2017-12-09 12:48:21 +00007 srcs: ["JniInvocation_test.cpp"],
Chih-Hung Hsiehbc2a2372017-10-03 10:39:11 -07008 cflags: ["-Wall", "-Werror"],
Colin Crosscf47d9b2016-07-27 10:35:53 -07009 shared_libs: ["libnativehelper"],
10}
Igor Murashkina1969c42018-02-16 13:30:57 -080011
12cc_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}