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_version_gen", 12 tools: [ 13 "hidl-gen", 14 ], 15 cmd: "$(location hidl-gen) -L check " + 16 " -r test.version:system/tools/hidl/test/version_test/good" + 17 " test.version.version@1.0" + 18 " test.version.version@2.2" + 19 " test.version.version@2.3" + 20 " test.version.version@2.4" + 21 " test.version.version@2.5" + 22 " test.version.version@3.0" + 23 " test.version.version@3.1" + 24 "&&" + 25 "($(location hidl-gen) -L check " + 26 " -r test.version:system/tools/hidl/test/version_test/bad1" + 27 " test.version.version@2.3 2>&1 | grep \"Cannot enforce minor version\" > /dev/null)" + 28 "&&" + 29 "($(location hidl-gen) -L check " + 30 " -r test.version:system/tools/hidl/test/version_test/bad2" + 31 " test.version.version@2.4 2>&1 | grep \"Cannot enforce minor version\" > /dev/null)" + 32 "&&" + 33 "($(location hidl-gen) -L check " + 34 " -r test.version:system/tools/hidl/test/version_test/bad3" + 35 " test.version.version@2.5 2>&1 | grep \"Cannot enforce minor version\" > /dev/null)" + 36 "&&" + 37 "($(location hidl-gen) -L check " + 38 " -r test.version:system/tools/hidl/test/version_test/bad4" + 39 " test.version.version@2.3 2>&1 | grep \"doesn't pass minor version\" > /dev/null)" + 40 "&&" + 41 "($(location hidl-gen) -L check " + 42 " -r test.version:system/tools/hidl/test/version_test/bad5" + 43 " test.version.version@2.3 2>&1 | grep \"doesn't pass minor version\" > /dev/null)" + 44 "&&" + 45 "echo 'int main(){return 0;}' > $(genDir)/TODO_b_37575883.cpp", 46 out: ["TODO_b_37575883.cpp"], 47 48 srcs: [ 49 "bad1/version/1.0/IFoo.hal", 50 "bad1/version/2.2/IBar.hal", 51 "bad1/version/2.3/IBar.hal", 52 "bad2/version/2.2/IBar.hal", 53 "bad2/version/2.3/IBar.hal", 54 "bad2/version/2.4/IBar.hal", 55 "bad3/version/2.2/IBar.hal", 56 "bad3/version/2.2/IFoo.hal", 57 "bad3/version/2.3/IBar.hal", 58 "bad3/version/2.4/IBar.hal", 59 "bad3/version/2.4/IFoo.hal", 60 "bad3/version/2.5/IBar.hal", 61 "bad3/version/2.5/IFoo.hal", 62 "bad4/version/1.0/IFoo.hal", 63 "bad4/version/2.2/IBar.hal", 64 "bad4/version/2.2/IFoo.hal", 65 "bad4/version/2.3/IBaz.hal", 66 "bad5/version/2.2/IFoo.hal", 67 "bad5/version/2.3/IBaz.hal", 68 "good/version/1.0/IFoo.hal", 69 "good/version/2.2/IBar.hal", 70 "good/version/2.2/IFoo.hal", 71 "good/version/2.3/IBar.hal", 72 "good/version/2.3/IBaz.hal", 73 "good/version/2.4/IBar.hal", 74 "good/version/2.4/IFoo.hal", 75 "good/version/2.5/IBar.hal", 76 "good/version/2.5/IFoo.hal", 77 "good/version/3.0/types.hal", 78 "good/version/3.1/ICanExtendTypesOnly.hal", 79 "good/version/3.1/types.hal", 80 ] 81} 82 83cc_test_host { 84 name: "hidl_version_test", 85 cflags: ["-Wall", "-Werror"], 86 generated_sources: ["hidl_hash_version_gen"], 87 gtest: false, 88} 89