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