• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    // See: http://go/android-license-faq
3    // A large-scale-change added 'default_applicable_licenses' to import
4    // all of the 'license_kinds' from "system_tools_hidl_license"
5    // to get the below license kinds:
6    //   SPDX-license-identifier-Apache-2.0
7    default_applicable_licenses: ["system_tools_hidl_license"],
8}
9
10genrule {
11    name: "hidl_hash_test_gen",
12    tools: [
13        "hidl-gen",
14    ],
15    cmd: "$(location hidl-gen) -L check " +
16        "    -r android.hidl:system/libhidl/transport" +
17        "    -r test.hash:system/tools/hidl/test/hash_test/correct_hash" +
18        "    test.hash.hash@1.0" +
19        "&&" +
20        "!($(location hidl-gen) -F -L check " +
21        "    -r android.hidl:system/libhidl/transport" +
22        "    -r test.hash:system/tools/hidl/test/hash_test/missing_hash" +
23        "    test.hash.hash@1.0 2> /dev/null)" +
24        "&&" +
25        "!($(location hidl-gen) -L check " +
26        "    -r android.hidl:system/libhidl/transport" +
27        "    -r test.hash:system/tools/hidl/test/hash_test/incorrect_hash" +
28        "    test.hash.hash@1.0 2> /dev/null)" +
29        "&&" +
30        "$(location hidl-gen) -L hash " +
31        "    -r android.hidl:system/libhidl/transport" +
32        "    -r test.hash:system/tools/hidl/test/hash_test/incorrect_hash" +
33        "    test.hash.hash@1.0 > /dev/null" +
34        "&&" +
35        "echo 'int main(){return 0;}' > $(genDir)/TODO_b_37575883.cpp",
36    out: ["TODO_b_37575883.cpp"],
37
38    srcs: [
39        "correct_hash/current.txt",
40        "correct_hash/hash/1.0/IHash.hal",
41        "incorrect_hash/current.txt",
42        "incorrect_hash/hash/1.0/IHash.hal",
43        "missing_hash/hash/1.0/IUnhashed.hal",
44    ],
45}
46
47cc_test_host {
48    name: "hidl_hash_test",
49    cflags: [
50        "-Wall",
51        "-Werror",
52    ],
53    generated_sources: ["hidl_hash_test_gen"],
54    gtest: false,
55}
56