aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Android.bp
blob: a5bdee9e95ef2a7acbb8144a36f252fddf1b621e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// Build the unit tests.

cc_test {
    name: "JniInvocation_test",
    test_suites: ["device-tests"],
    host_supported: true,
    srcs: ["JniInvocation_test.cpp"],
    cflags: ["-Wall", "-Werror"],
    shared_libs: ["libnativehelper"],
}

cc_test {
  name: "JniSafeRegisterNativeMethods_test",
  host_supported: true,
  srcs: ["JniSafeRegisterNativeMethods_test.cpp"],

  cflags: [
      // Base set of cflags used by all things ART.
      "-fno-rtti",
      "-ggdb3",
      "-Wall",
      "-Werror",
      "-Wextra",
      "-Wstrict-aliasing",
      "-fstrict-aliasing",
      "-Wunreachable-code",
      "-Wredundant-decls",
      "-Wshadow",
      "-Wunused",
      "-fvisibility=protected",

      // Warn about thread safety violations with clang.
      "-Wthread-safety",
      "-Wthread-safety-negative",

      // Warn if switch fallthroughs aren't annotated.
      "-Wimplicit-fallthrough",

      // Enable float equality warnings.
      "-Wfloat-equal",

      // Enable warning of converting ints to void*.
      "-Wint-to-void-pointer-cast",

      // Enable warning of wrong unused annotations.
      "-Wused-but-marked-unused",

      // Enable warning for deprecated language features.
      "-Wdeprecated",

      // Enable warning for unreachable break & return.
      "-Wunreachable-code-break",
      "-Wunreachable-code-return",

      // Enable thread annotations for std::mutex, etc.
      "-D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS",
  ],

  shared_libs: ["libnativehelper"],
}