diff --git a/fs_mgr/libdm/Android.bp b/fs_mgr/libdm/Android.bp index 4cdea7158..449a170a3 100644 --- a/fs_mgr/libdm/Android.bp +++ b/fs_mgr/libdm/Android.bp @@ -44,9 +44,24 @@ cc_library_static { }, } -cc_test { - name: "libdm_test", - defaults: ["fs_mgr_defaults"], +filegroup { + name: "libdm_test_srcs", + srcs: [ + "dm_test.cpp", + "loop_control_test.cpp", + "test_util.cpp", + ], +} + +cc_defaults { + name: "libdm_defaults", + sanitize: { + misc_undefined: ["integer"], + }, + cflags: [ + "-Wall", + "-Werror", + ], static_libs: [ "libdm", "libbase", @@ -54,9 +69,10 @@ cc_test { "libfs_mgr", "liblog", ], - srcs: [ - "dm_test.cpp", - "loop_control_test.cpp", - "test_util.cpp", - ] + srcs: [":libdm_test_srcs"], +} + +cc_test { + name: "libdm_test", + defaults: ["libdm_defaults"], } diff --git a/fs_mgr/libdm/vts_core/Android.bp b/fs_mgr/libdm/vts_core/Android.bp new file mode 100644 index 000000000..2eceb28a9 --- /dev/null +++ b/fs_mgr/libdm/vts_core/Android.bp @@ -0,0 +1,23 @@ +// +// Copyright (C) 2019 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +cc_test { + name: "vts_libdm_test", + defaults: ["libdm_defaults"], + test_suites: ["vts-core"], + require_root: true, + test_min_api_level: 29, +}