platform_bionic/libc/kernel/tools
Christopher Ferris f2484aaed7 Fix handling of #elif.
When a construct like:

if defined(something)
  blocks1
elif 1
  blocks2
else
  blocks3
endif

The parser would put the first clause but then simply omit the elif and
put all of blocks2 without a terminating #endif. The code also did
something similar when the #else was an #endif.

Also convert all of the unit tests to real unit tests and only run
them if you run cpp.py by itself. Added new unit tests to cover the
new cases.

Test: Ran cpp.py unit tests.
Test: Reran update_all.py and verified nothing changed, and that running
Test: it on the new kernel headers that exposed this problem.
Change-Id: Ie168511303c4e15afdb60c37baef75a966ca29a8
2018-10-26 22:42:26 +00:00
..
clean_header.py Use in_addr in ip_mreq_source and ip_msfilter. 2017-12-14 10:07:27 -08:00
cpp.py Fix handling of #elif. 2018-10-26 22:42:26 +00:00
defaults.py Use in_addr in ip_mreq_source and ip_msfilter. 2017-12-14 10:07:27 -08:00
generate_uapi_headers.sh Modify the script to use the linux source tree. 2018-05-24 15:10:33 -07:00
kernel.py Make cpp.py less braindead. 2013-11-06 12:04:48 -08:00
update_all.py Enable exporting the non-uapi scsi headers. 2017-05-25 19:17:55 -07:00
utils.py Refactor the kernel update scripts. 2017-03-02 15:21:42 -08:00