blob: c81de32a2b2949aa255a919f239f640b6b753f39 [file] [log] [blame]
Lloyd Pique70d91362018-10-18 16:02:55 -07001cc_defaults {
2 name: "libcompositionengine_defaults",
3 defaults: ["surfaceflinger_defaults"],
4 cflags: [
5 "-DLOG_TAG=\"CompositionEngine\"",
6 ],
Lloyd Pique441d5042018-10-18 16:49:51 -07007 shared_libs: [
8 "android.hardware.graphics.allocator@2.0",
9 "android.hardware.graphics.composer@2.1",
10 "android.hardware.graphics.composer@2.2",
11 "android.hardware.graphics.composer@2.3",
12 "android.hardware.power@1.0",
13 "android.hardware.power@1.3",
14 "libbase",
15 "libcutils",
16 "libgui",
17 "liblayers_proto",
18 "liblog",
19 "libtimestats_proto",
20 "libui",
21 "libutils",
22 ],
23 static_libs: [
24 "libmath",
25 "librenderengine",
26 "libtrace_proto",
27 ],
28 header_libs: [
29 "libsurfaceflinger_headers",
30 ],
Lloyd Pique70d91362018-10-18 16:02:55 -070031}
32
33cc_library {
34 name: "libcompositionengine",
35 defaults: ["libcompositionengine_defaults"],
36 srcs: [
37 "src/CompositionEngine.cpp",
38 ],
39 local_include_dirs: ["include"],
40 export_include_dirs: ["include"],
41}
42
43cc_library {
44 name: "libcompositionengine_mocks",
45 defaults: ["libcompositionengine_defaults"],
46 srcs: [
47 "mock/CompositionEngine.cpp",
48 ],
49 static_libs: [
50 "libgtest",
51 "libgmock",
52 "libcompositionengine",
53 ],
54 local_include_dirs: ["include"],
55 export_include_dirs: ["include"],
56}
57
58cc_test {
59 name: "libcompositionengine_test",
60 test_suites: ["device-tests"],
61 defaults: ["libcompositionengine_defaults"],
62 srcs: [
63 "tests/CompositionEngineTest.cpp",
Lloyd Pique441d5042018-10-18 16:49:51 -070064 "tests/MockHWComposer.cpp",
Lloyd Pique70d91362018-10-18 16:02:55 -070065 ],
66 static_libs: [
67 "libcompositionengine",
68 "libcompositionengine_mocks",
69 "libgmock",
70 "libgtest",
71 ],
72 sanitize: {
73 // By using the address sanitizer, we not only uncover any issues
74 // with the test, but also any issues with the code under test.
75 //
76 // Note: If you get an runtime link error like:
77 //
78 // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found
79 //
80 // it is because the address sanitizer shared objects are not installed
81 // by default in the system image.
82 //
83 // You can either "make dist tests" before flashing, or set this
84 // option to false temporarily.
85 address: true,
86 },
87}