Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 1 | cc_defaults { |
| 2 | name: "libcompositionengine_defaults", |
| 3 | defaults: ["surfaceflinger_defaults"], |
| 4 | cflags: [ |
| 5 | "-DLOG_TAG=\"CompositionEngine\"", |
| 6 | ], |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 7 | 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 Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | cc_library { |
| 34 | name: "libcompositionengine", |
| 35 | defaults: ["libcompositionengine_defaults"], |
| 36 | srcs: [ |
| 37 | "src/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 38 | "src/Display.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame^] | 39 | "src/DisplaySurface.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 40 | "src/DumpHelpers.cpp", |
| 41 | "src/Output.cpp", |
| 42 | "src/OutputCompositionState.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 43 | ], |
| 44 | local_include_dirs: ["include"], |
| 45 | export_include_dirs: ["include"], |
| 46 | } |
| 47 | |
| 48 | cc_library { |
| 49 | name: "libcompositionengine_mocks", |
| 50 | defaults: ["libcompositionengine_defaults"], |
| 51 | srcs: [ |
| 52 | "mock/CompositionEngine.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 53 | "mock/Display.cpp", |
Lloyd Pique | 542307f | 2018-10-19 13:24:08 -0700 | [diff] [blame^] | 54 | "mock/DisplaySurface.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 55 | "mock/Output.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 56 | ], |
| 57 | static_libs: [ |
| 58 | "libgtest", |
| 59 | "libgmock", |
| 60 | "libcompositionengine", |
| 61 | ], |
| 62 | local_include_dirs: ["include"], |
| 63 | export_include_dirs: ["include"], |
| 64 | } |
| 65 | |
| 66 | cc_test { |
| 67 | name: "libcompositionengine_test", |
| 68 | test_suites: ["device-tests"], |
| 69 | defaults: ["libcompositionengine_defaults"], |
| 70 | srcs: [ |
| 71 | "tests/CompositionEngineTest.cpp", |
Lloyd Pique | 45a165a | 2018-10-19 11:54:47 -0700 | [diff] [blame] | 72 | "tests/DisplayTest.cpp", |
Lloyd Pique | 32cbe28 | 2018-10-19 13:09:22 -0700 | [diff] [blame] | 73 | "tests/OutputTest.cpp", |
Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 74 | "tests/MockHWComposer.cpp", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 75 | ], |
| 76 | static_libs: [ |
| 77 | "libcompositionengine", |
| 78 | "libcompositionengine_mocks", |
Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 79 | "librenderengine_mocks", |
Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 80 | "libgmock", |
| 81 | "libgtest", |
| 82 | ], |
| 83 | sanitize: { |
| 84 | // By using the address sanitizer, we not only uncover any issues |
| 85 | // with the test, but also any issues with the code under test. |
| 86 | // |
| 87 | // Note: If you get an runtime link error like: |
| 88 | // |
| 89 | // CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found |
| 90 | // |
| 91 | // it is because the address sanitizer shared objects are not installed |
| 92 | // by default in the system image. |
| 93 | // |
| 94 | // You can either "make dist tests" before flashing, or set this |
| 95 | // option to false temporarily. |
| 96 | address: true, |
| 97 | }, |
| 98 | } |