1 genrule { 2 name: "hidl_hash_test_gen", 3 tools: [ 4 "hidl-gen", 5 ], 6 cmd: "$(location hidl-gen) -L check " + 7 " -r android.hidl:system/libhidl/transport" + 8 " -r test.hash:system/tools/hidl/test/hash_test/good" + 9 " test.hash.hash (a] 1.0" + 10 "&&" + 11 "!($(location hidl-gen) -L check " + 12 " -r android.hidl:system/libhidl/transport" + 13 " -r test.hash:system/tools/hidl/test/hash_test/bad" + 14 " test.hash.hash (a] 1.0 2> /dev/null)" + 15 "&&" + 16 "$(location hidl-gen) -L hash " + 17 " -r android.hidl:system/libhidl/transport" + 18 " -r test.hash:system/tools/hidl/test/hash_test/bad" + 19 " test.hash.hash (a] 1.0 > /dev/null" + 20 "&&" + 21 "echo 'int main(){return 0;}' > $(genDir)/TODO_b_37575883.cpp", 22 out: ["TODO_b_37575883.cpp"], 23 24 srcs: [ 25 "bad/hash/1.0/IHash.hal", 26 "bad/current.txt", 27 "good/hash/1.0/IHash.hal", 28 "good/current.txt", 29 ], 30 } 31 32 cc_test_host { 33 name: "hidl_hash_test", 34 cflags: ["-Wall", "-Werror"], 35 generated_sources: ["hidl_hash_test_gen"], 36 } 37