| 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", | 
|  | 38 | ], | 
|  | 39 | local_include_dirs: ["include"], | 
|  | 40 | export_include_dirs: ["include"], | 
|  | 41 | } | 
|  | 42 |  | 
|  | 43 | cc_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 |  | 
|  | 58 | cc_test { | 
|  | 59 | name: "libcompositionengine_test", | 
|  | 60 | test_suites: ["device-tests"], | 
|  | 61 | defaults: ["libcompositionengine_defaults"], | 
|  | 62 | srcs: [ | 
|  | 63 | "tests/CompositionEngineTest.cpp", | 
| Lloyd Pique | 441d504 | 2018-10-18 16:49:51 -0700 | [diff] [blame] | 64 | "tests/MockHWComposer.cpp", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 65 | ], | 
|  | 66 | static_libs: [ | 
|  | 67 | "libcompositionengine", | 
|  | 68 | "libcompositionengine_mocks", | 
| Lloyd Pique | b97e04f | 2018-10-18 17:07:05 -0700 | [diff] [blame] | 69 | "librenderengine_mocks", | 
| Lloyd Pique | 70d9136 | 2018-10-18 16:02:55 -0700 | [diff] [blame] | 70 | "libgmock", | 
|  | 71 | "libgtest", | 
|  | 72 | ], | 
|  | 73 | sanitize: { | 
|  | 74 | // By using the address sanitizer, we not only uncover any issues | 
|  | 75 | // with the test, but also any issues with the code under test. | 
|  | 76 | // | 
|  | 77 | // Note: If you get an runtime link error like: | 
|  | 78 | // | 
|  | 79 | //   CANNOT LINK EXECUTABLE "/data/local/tmp/libcompositionengine_test": library "libclang_rt.asan-aarch64-android.so" not found | 
|  | 80 | // | 
|  | 81 | // it is because the address sanitizer shared objects are not installed | 
|  | 82 | // by default in the system image. | 
|  | 83 | // | 
|  | 84 | // You can either "make dist tests" before flashing, or set this | 
|  | 85 | // option to false temporarily. | 
|  | 86 | address: true, | 
|  | 87 | }, | 
|  | 88 | } |