commit | 71f091347acddfb178dd289a3d1c0af89f1addc7 | [log] [tgz] |
---|---|---|
author | Steven Moreland <smoreland@google.com> | Tue Feb 20 12:24:30 2018 -0800 |
committer | Steven Moreland <smoreland@google.com> | Tue Feb 20 15:36:11 2018 -0800 |
tree | 995e941451cc749190f21e6f1534262abd1138bd | |
parent | 8bd38de72b7d0b81f60e2e7d4eca1be5bf5e0854 [diff] |
Import fails if parsing fails. Previously, hidl-gen doesn't distinguish between failed parse due to parsing errors or due to the file being missing. This means that any of a number of times when a file was imported, it could fail to parse, but the parsing of the file that referenced it would continue on happily. A case to hidl_error_test was also added which fails before this patch and succeeds after. Change-Id: Ie51a56eff6ef35c7ae5c513252a3a7e6581addb1 Fixes: 64773282 Test: hidl's run_all_host_tests.sh
croot make hidl-gen
hidl-gen -o output-path -L language (-r interface-root) fqname output-path: directory to store the output files. language: output file for given language. e.g.c++, vts.. fqname: fully qualified name of the input files. For singe file input, follow the format: package@version::fileName For directory input, follow the format: package@version interface-root(optional): prefix and root path for fqname. If not set, use the default prefix: android.hardware and default root path defined in $TOP. examples: croot hidl-gen -o output -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0::INfc.hal hidl-gen -o output -L vts -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -o test -L c++ -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0 hidl-gen -L hash -r android.hardware:hardware/interfaces -r android.hidl:system/libhidl/transport android.hardware.nfc@1.0