blob: 8bbeed7d19eb480193325f0215884450d3da9ee1 [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"],
Martin Stjernholm022ac4d2019-02-12 15:30:30 +00009 // Link to the non-stub version of the library to access some internal
10 // functions.
11 bootstrap: true,
12 shared_libs: ["libnativehelper"],
Colin Crosscf47d9b2016-07-27 10:35:53 -070013}
Igor Murashkina1969c42018-02-16 13:30:57 -080014
15cc_test {
16 name: "JniSafeRegisterNativeMethods_test",
17 host_supported: true,
18 srcs: ["JniSafeRegisterNativeMethods_test.cpp"],
19
20 cflags: [
21 // Base set of cflags used by all things ART.
22 "-fno-rtti",
23 "-ggdb3",
24 "-Wall",
25 "-Werror",
26 "-Wextra",
27 "-Wstrict-aliasing",
28 "-fstrict-aliasing",
29 "-Wunreachable-code",
30 "-Wredundant-decls",
31 "-Wshadow",
32 "-Wunused",
33 "-fvisibility=protected",
34
35 // Warn about thread safety violations with clang.
36 "-Wthread-safety",
37 "-Wthread-safety-negative",
38
39 // Warn if switch fallthroughs aren't annotated.
40 "-Wimplicit-fallthrough",
41
42 // Enable float equality warnings.
43 "-Wfloat-equal",
44
45 // Enable warning of converting ints to void*.
46 "-Wint-to-void-pointer-cast",
47
48 // Enable warning of wrong unused annotations.
49 "-Wused-but-marked-unused",
50
51 // Enable warning for deprecated language features.
52 "-Wdeprecated",
53
54 // Enable warning for unreachable break & return.
55 "-Wunreachable-code-break",
56 "-Wunreachable-code-return",
57
58 // Enable thread annotations for std::mutex, etc.
59 "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS",
60 ],
61
Igor Murashkind8a06772018-03-06 14:15:46 -080062 tidy: true,
63
Igor Murashkina1969c42018-02-16 13:30:57 -080064 shared_libs: ["libnativehelper"],
65}
Orion Hodsonb01e7fe2018-11-07 06:07:50 +000066
67cc_test {
68 name: "libnativehelper_api_test",
69 host_supported: true,
70 cflags: ["-Wall", "-Werror"],
71 srcs: ["libnativehelper_api_test.c"], // C Compilation test.
72 tidy: true,
73 shared_libs: ["libnativehelper"],
Martin Stjernholm8f6839c2019-02-05 15:06:45 +000074}