Steven Moreland | d520c9d | 2017-05-24 16:30:55 -0700 | [diff] [blame] | 1 | genrule { |
| 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 Moreland | 87b26d7 | 2017-10-11 09:35:42 -0700 | [diff] [blame] | 13 | " test.version.version@3.0" + |
| 14 | " test.version.version@3.1" + |
Steven Moreland | d520c9d | 2017-05-24 16:30:55 -0700 | [diff] [blame] | 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 | "&&" + |
Steven Moreland | 8775715 | 2017-11-09 08:57:59 -0800 | [diff] [blame] | 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 | "&&" + |
Steven Moreland | d520c9d | 2017-05-24 16:30:55 -0700 | [diff] [blame] | 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", |
Steven Moreland | 8775715 | 2017-11-09 08:57:59 -0800 | [diff] [blame] | 57 | "bad5/version/2.2/IFoo.hal", |
| 58 | "bad5/version/2.3/IBaz.hal", |
Steven Moreland | d520c9d | 2017-05-24 16:30:55 -0700 | [diff] [blame] | 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", |
Steven Moreland | 87b26d7 | 2017-10-11 09:35:42 -0700 | [diff] [blame] | 68 | "good/version/3.0/types.hal", |
| 69 | "good/version/3.1/ICanExtendTypesOnly.hal", |
| 70 | "good/version/3.1/types.hal", |
Steven Moreland | d520c9d | 2017-05-24 16:30:55 -0700 | [diff] [blame] | 71 | ] |
| 72 | } |
| 73 | |
| 74 | cc_test_host { |
| 75 | name: "hidl_version_test", |
Chih-Hung Hsieh | b8e21fd | 2017-10-02 10:04:02 -0700 | [diff] [blame] | 76 | cflags: ["-Wall", "-Werror"], |
Steven Moreland | d520c9d | 2017-05-24 16:30:55 -0700 | [diff] [blame] | 77 | generated_sources: ["hidl_hash_version_gen"], |
Chih-Hung Hsieh | b8e21fd | 2017-10-02 10:04:02 -0700 | [diff] [blame] | 78 | } |