diff options
author | Harry Cutts <hcutts@google.com> | 2023-10-05 14:41:17 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-18 13:55:48 +0000 |
commit | eff665b6e8184b98b4139e576d0c0194c84b1937 (patch) | |
tree | dffdea8cb405bbc28dbcd282864158069958b91d | |
parent | 36467839006b1aef5ae93cb17e7b355fff1b9dd0 (diff) | |
download | libchrome-gestures-eff665b6e8184b98b4139e576d0c0194c84b1937.tar.gz |
Android.bp: sanitize tests, enable more sanitizers
Since some of the unit tests are quite complex, I think it's worth
enabling sanitizers for them.
BUG=b:302041840
TEST=run unit tests on Android
Change-Id: Id5fea00ff5e633c2d202ef539b03920c4dbf096c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/gestures/+/4916790
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Tested-by: Harry Cutts <hcutts@chromium.org>
Code-Coverage: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Siarhei Vishniakou <svv@google.com>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
-rw-r--r-- | Android.bp | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -18,7 +18,7 @@ license { } cc_defaults { - name: "libchrome-gestures_cflags", + name: "libchrome-gestures_defaults", cflags: [ "-fno-exceptions", "-fno-strict-aliasing", @@ -39,6 +39,18 @@ cc_defaults { "-D_FILE_OFFSET_BITS=64", "-DGESTURES_INTERNAL=1", ], + sanitize: { + all_undefined: true, + integer_overflow: true, + undefined: true, + }, + target: { + host: { + sanitize: { + address: true, + }, + }, + }, } cc_library_headers { @@ -52,7 +64,7 @@ cc_library_headers { cc_library_static { name: "libchrome-gestures", defaults: [ - "libchrome-gestures_cflags", + "libchrome-gestures_defaults", ], local_include_dirs: ["."], header_libs: [ @@ -102,18 +114,13 @@ cc_library_static { "//frameworks/native/services/inputflinger:__subpackages__", ], rtti: true, - sanitize: { - cfi: true, - integer_overflow: true, - misc_undefined: ["bounds"], - }, host_supported: true, } cc_test { name: "libchrome-gestures_test", defaults: [ - "libchrome-gestures_cflags", + "libchrome-gestures_defaults", ], srcs: [ "src/accel_filter_interpreter_unittest.cc", @@ -168,5 +175,11 @@ cc_test { "-Wno-sign-compare", ], host_supported: false, + sanitize: { + hwaddress: true, + diag: { + integer_overflow: true, + }, + }, test_suites: ["general-tests"], } |