github.com/westcoastroms/westcoastroms-build@v0.0.0-20190928114312-2350e5a73030/build/make/tools/fs_config/Android.bp (about)

     1  // Copyright (C) 2008 The Android Open Source Project
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  cc_binary_host {
    16      name: "fs_config",
    17      srcs: ["fs_config.c"],
    18      shared_libs: [
    19          "libcutils",
    20          "libselinux",
    21      ],
    22      cflags: ["-Werror"],
    23  }
    24  
    25  // -----------------------------------------------------------------------------
    26  // Unit tests.
    27  // -----------------------------------------------------------------------------
    28  
    29  test_c_flags = [
    30      "-fstack-protector-all",
    31      "-g",
    32      "-Wall",
    33      "-Wextra",
    34      "-Werror",
    35      "-fno-builtin",
    36      "-DANDROID_FILESYSTEM_CONFIG=\"android_filesystem_config_test_data.h\"",
    37  ]
    38  
    39  //#################################
    40  // test executable
    41  cc_test_host {
    42      name: "fs_config_generate_test",
    43      srcs: ["fs_config_generate.c"],
    44      shared_libs: ["libcutils"],
    45      cflags: test_c_flags,
    46      relative_install_path: "fs_config-unit-tests",
    47      no_named_install_directory: true,
    48      gtest: false,
    49  
    50  }
    51  
    52  //#################################
    53  // gTest tool
    54  cc_test_host {
    55      name: "fs_config-unit-tests",
    56      cflags: test_c_flags + ["-DHOST"],
    57      shared_libs: [
    58          "liblog",
    59          "libcutils",
    60          "libbase",
    61      ],
    62      srcs: ["fs_config_test.cpp"],
    63  }