blob: 3629b8abd7c84cc1edcb7173aea30869d329d8c0 [file] [log] [blame]
Steven Morelandd520c9d2017-05-24 16:30:55 -07001genrule {
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" +
Steven Moreland87b26d72017-10-11 09:35:42 -070013 " test.version.version@3.0" +
14 " test.version.version@3.1" +
Steven Morelandd520c9d2017-05-24 16:30:55 -070015 "&&" +
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 "&&" +
Steven Moreland87757152017-11-09 08:57:59 -080032 "($(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 "&&" +
Steven Morelandd520c9d2017-05-24 16:30:55 -070036 "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",
Steven Moreland87757152017-11-09 08:57:59 -080057 "bad5/version/2.2/IFoo.hal",
58 "bad5/version/2.3/IBaz.hal",
Steven Morelandd520c9d2017-05-24 16:30:55 -070059 "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",
Steven Moreland87b26d72017-10-11 09:35:42 -070068 "good/version/3.0/types.hal",
69 "good/version/3.1/ICanExtendTypesOnly.hal",
70 "good/version/3.1/types.hal",
Steven Morelandd520c9d2017-05-24 16:30:55 -070071 ]
72}
73
74cc_test_host {
75 name: "hidl_version_test",
Chih-Hung Hsiehb8e21fd2017-10-02 10:04:02 -070076 cflags: ["-Wall", "-Werror"],
Steven Morelandd520c9d2017-05-24 16:30:55 -070077 generated_sources: ["hidl_hash_version_gen"],
Chih-Hung Hsiehb8e21fd2017-10-02 10:04:02 -070078}