• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2016 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
15package {
16    // See: http://go/android-license-faq
17    // A large-scale-change added 'default_applicable_licenses' to import
18    // all of the 'license_kinds' from "system_libufdt_license"
19    // to get the below license kinds:
20    //   SPDX-license-identifier-Apache-2.0
21    default_applicable_licenses: ["system_libufdt_license"],
22}
23
24libufdt_tests_cflags = [
25    "-Wall",
26    "-Werror",
27    "-Wno-error=format",
28]
29
30cc_binary_host {
31    name: "ufdt_gen_test_dts",
32    cflags: libufdt_tests_cflags,
33    srcs: ["ufdt_gen_test_dts.c"],
34}
35
36cc_binary {
37    name: "ufdt_apply_overlay",
38    host_supported: true,
39    cflags: libufdt_tests_cflags,
40    srcs: [
41        "ufdt_overlay_test_app.c",
42        "util.c",
43    ],
44    static_libs: [
45        "libufdt",
46        "libfdt",
47        "libufdt_sysdeps",
48    ],
49    required: ["dtc"],
50    target: {
51        host: {
52            stl: "none",
53            dist: {
54                targets: ["dist_files"],
55                dir: "libufdt",
56            },
57        },
58    },
59}
60
61cc_binary_host {
62    name: "extract_dtb",
63    cflags: libufdt_tests_cflags,
64    srcs: [
65        "extract_dtb.c",
66        "util.c",
67    ],
68    static_libs: [
69        "libfdt",
70        "libufdt_sysdeps",
71    ],
72    required: ["dtc"],
73    stl: "none",
74    dist: {
75        targets: ["dist_files"],
76        dir: "libufdt",
77    },
78}
79
80cc_binary {
81    name: "fdt_apply_overlay",
82    host_supported: true,
83    cflags: libufdt_tests_cflags,
84    srcs: [
85        "fdt_overlay_test_app.c",
86        "util.c",
87    ],
88    static_libs: [
89        "libfdt",
90        "libufdt_sysdeps",
91    ],
92    required: ["dtc"],
93    target: {
94        host: {
95            stl: "none",
96            dist: {
97                targets: ["dist_files"],
98                dir: "libufdt",
99            },
100        },
101    },
102}
103
104cc_binary_host {
105    name: "ufdt_verify_overlay_host",
106    cflags: libufdt_tests_cflags,
107    srcs: ["ufdt_verify_overlay_app.cpp"],
108    static_libs: [
109        "libufdt",
110        "libfdt",
111        "libufdt_sysdeps",
112        "libufdt_verify",
113    ],
114    required: ["dtc"],
115
116}
117
118cc_test {
119    name: "ufdt_verify_overlay",
120    cflags: libufdt_tests_cflags,
121    srcs: ["ufdt_verify_overlay_app.cpp"],
122    static_libs: [
123        "libufdt",
124        "libfdt",
125        "libufdt_sysdeps",
126        "libufdt_verify",
127    ],
128    required: ["dtc"],
129    test_suites: ["vts"],
130    auto_gen_config: false,
131}
132