platform_build/tools/fs_config/Android.bp
Dan Willemsen c0a0f2dc1f Convert to Android.bp
Test: m atree fs_config fs_config_generate_test fs_config-unit-tests fs_get_stats zipalign
Test: cd out/host/linux-x86/nativetest64/fs_config-unit-tests ./fs_config-unit-tests
Change-Id: I3c5403a7f1cf221715eb52a41c640af9afcee175
2017-09-09 13:47:34 -07:00

63 lines
1.7 KiB
Text

// Copyright (C) 2008 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_binary_host {
name: "fs_config",
srcs: ["fs_config.c"],
shared_libs: [
"libcutils",
"libselinux",
],
cflags: ["-Werror"],
}
// -----------------------------------------------------------------------------
// Unit tests.
// -----------------------------------------------------------------------------
test_c_flags = [
"-fstack-protector-all",
"-g",
"-Wall",
"-Wextra",
"-Werror",
"-fno-builtin",
"-DANDROID_FILESYSTEM_CONFIG=\"android_filesystem_config_test_data.h\"",
]
//#################################
// test executable
cc_test_host {
name: "fs_config_generate_test",
srcs: ["fs_config_generate.c"],
shared_libs: ["libcutils"],
cflags: test_c_flags,
relative_install_path: "fs_config-unit-tests",
no_named_install_directory: true,
gtest: false,
}
//#################################
// gTest tool
cc_test_host {
name: "fs_config-unit-tests",
cflags: test_c_flags + ["-DHOST"],
shared_libs: [
"liblog",
"libcutils",
"libbase",
],
srcs: ["fs_config_test.cpp"],
}