blob: 09e62ca3da09cb555e6089a1a50cb99fddbdec3f [file] [log] [blame]
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "system_tools_hidl_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["system_tools_hidl_license"],
}
genrule {
name: "hidl_hash_version_gen",
tools: [
"hidl-gen",
],
cmd: "set +o pipefail; $(location hidl-gen) -L check " +
" -r test.version:system/tools/hidl/test/version_test/good" +
" test.version.version@1.0" +
" test.version.version@2.2" +
" test.version.version@2.3" +
" test.version.version@2.4" +
" test.version.version@2.5" +
" test.version.version@3.0" +
" test.version.version@3.1" +
"&&" +
"($(location hidl-gen) -L check " +
" -r test.version:system/tools/hidl/test/version_test/bad1" +
" test.version.version@2.3 2>&1 | grep \"Cannot enforce minor version\" > /dev/null)" +
"&&" +
"($(location hidl-gen) -L check " +
" -r test.version:system/tools/hidl/test/version_test/bad2" +
" test.version.version@2.4 2>&1 | grep \"Cannot enforce minor version\" > /dev/null)" +
"&&" +
"($(location hidl-gen) -L check " +
" -r test.version:system/tools/hidl/test/version_test/bad3" +
" test.version.version@2.5 2>&1 | grep \"Cannot enforce minor version\" > /dev/null)" +
"&&" +
"($(location hidl-gen) -L check " +
" -r test.version:system/tools/hidl/test/version_test/bad4" +
" test.version.version@2.3 2>&1 | grep \"doesn't pass minor version\" > /dev/null)" +
"&&" +
"($(location hidl-gen) -L check " +
" -r test.version:system/tools/hidl/test/version_test/bad5" +
" test.version.version@2.3 2>&1 | grep \"doesn't pass minor version\" > /dev/null)" +
"&&" +
"echo 'int main(){return 0;}' > $(genDir)/TODO_b_37575883.cpp",
out: ["TODO_b_37575883.cpp"],
srcs: [
":android.hidl.base@1.0_hal",
"bad1/version/1.0/IFoo.hal",
"bad1/version/2.2/IBar.hal",
"bad1/version/2.3/IBar.hal",
"bad2/version/2.2/IBar.hal",
"bad2/version/2.3/IBar.hal",
"bad2/version/2.4/IBar.hal",
"bad3/version/2.2/IBar.hal",
"bad3/version/2.2/IFoo.hal",
"bad3/version/2.3/IBar.hal",
"bad3/version/2.4/IBar.hal",
"bad3/version/2.4/IFoo.hal",
"bad3/version/2.5/IBar.hal",
"bad3/version/2.5/IFoo.hal",
"bad4/version/1.0/IFoo.hal",
"bad4/version/2.2/IBar.hal",
"bad4/version/2.2/IFoo.hal",
"bad4/version/2.3/IBaz.hal",
"bad5/version/2.2/IFoo.hal",
"bad5/version/2.3/IBaz.hal",
"good/version/1.0/IFoo.hal",
"good/version/2.2/IBar.hal",
"good/version/2.2/IFoo.hal",
"good/version/2.3/IBar.hal",
"good/version/2.3/IBaz.hal",
"good/version/2.4/IBar.hal",
"good/version/2.4/IFoo.hal",
"good/version/2.5/IBar.hal",
"good/version/2.5/IFoo.hal",
"good/version/3.0/types.hal",
"good/version/3.1/ICanExtendTypesOnly.hal",
"good/version/3.1/types.hal",
]
}
cc_test_host {
name: "hidl_version_test",
cflags: ["-Wall", "-Werror"],
generated_sources: ["hidl_hash_version_gen"],
gtest: false,
}