From 2e9edcb04275e5f3e9b3f0703944ded865a963dc Mon Sep 17 00:00:00 2001 From: nelsonli Date: Tue, 10 Sep 2019 17:04:27 +0800 Subject: [PATCH] [vts-core] Add vts_core_liblp_test to vts-core Add vts_core_liblp_test to vts-core suite and skip the test if the first-api-level < 29. Bug: 132702215 Test: atest vts_core_liblp_test Change-Id: I09ea8ff923b5300bae513146f6d07dc029d36661 --- fs_mgr/liblp/Android.bp | 32 ++++++++++++++++++++------------ fs_mgr/liblp/vts_core/Android.bp | 22 ++++++++++++++++++++++ 2 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 fs_mgr/liblp/vts_core/Android.bp diff --git a/fs_mgr/liblp/Android.bp b/fs_mgr/liblp/Android.bp index b2572f64d..7fee83ce1 100644 --- a/fs_mgr/liblp/Android.bp +++ b/fs_mgr/liblp/Android.bp @@ -55,9 +55,26 @@ cc_library { export_include_dirs: ["include"], } +filegroup { + name: "liblp_test_srcs", + srcs: [ + "builder_test.cpp", + "device_test.cpp", + "io_test.cpp", + "test_partition_opener.cpp", + "utility_test.cpp", + ], +} + cc_defaults { name: "liblp_test_defaults", - defaults: ["fs_mgr_defaults"], + sanitize: { + misc_undefined: ["integer"], + }, + cflags: [ + "-Wall", + "-Werror", + ], cppflags: [ "-Wno-unused-parameter", ], @@ -71,23 +88,14 @@ cc_defaults { "libstorage_literals_headers", ], stl: "libc++_static", - srcs: [ - "builder_test.cpp", - "device_test.cpp", - "io_test.cpp", - "test_partition_opener.cpp", - "utility_test.cpp", - ], + srcs: [":liblp_test_srcs"], } cc_test { name: "liblp_test", defaults: ["liblp_test_defaults"], test_config: "liblp_test.xml", - test_suites: [ - "device-tests", - "vts-core", - ], + test_suites: ["device-tests"], } cc_test { diff --git a/fs_mgr/liblp/vts_core/Android.bp b/fs_mgr/liblp/vts_core/Android.bp new file mode 100644 index 000000000..7af0b9e35 --- /dev/null +++ b/fs_mgr/liblp/vts_core/Android.bp @@ -0,0 +1,22 @@ +// +// 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_core_liblp_test", + defaults: ["liblp_test_defaults"], + test_suites: ["vts-core"], + test_min_api_level: 29, +}