• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17genrule {
18    name: "hidl_format_test_diff",
19    tools: ["hidl-gen"],
20    cmd: "$(location hidl-gen) -L format -o $(genDir)/ " +
21        "-r hidl_format_test_pkg:system/tools/hidl/test/format_test " +
22        "hidl_format_test_pkg@1.0 && " +
23        "cp $$(dirname $(in) | uniq)/Android.bp $(genDir)/system/tools/hidl/test/format_test/1.0 && " +
24        "diff -r -C3 $(genDir)/system/tools/hidl/test/format_test/1.0 $$(dirname $(in) | uniq)",
25    srcs: [
26        "1.0/Android.bp",
27        "1.0/IBar.hal",
28        "1.0/IFoo.hal",
29        "1.0/types.hal",
30    ],
31    required: ["android.hidl.base@1.0"],
32    out: [
33        "system/tools/hidl/test/format_test/1.0/Android.bp",
34        "system/tools/hidl/test/format_test/1.0/IBar.hal",
35        "system/tools/hidl/test/format_test/1.0/IFoo.hal",
36        "system/tools/hidl/test/format_test/1.0/types.hal",
37    ],
38}
39
40hidl_package_root {
41    name: "hidl_format_test_pkg",
42}
43
44phony {
45    name: "hidl_format_test",
46    required: [
47        "hidl_format_test_diff",
48        "hidl_format_test_pkg@1.0",
49    ],
50}
51