No changes were necessary, but since I noticed "die"
wasn't defined I removed usages of it.
Test: python3 ./tools/kconfig_xml_fixup.py --input android-5.15/android-base-conditional.xml --output-matrix ./outputmatrix --output-version ./outputversion
Bug: 203436762
Change-Id: I7a94c57c88b96aba393655151cc5e872953dee6e
If pass -S option in python binaries wrapper, kconfig_xml_fixup
will meet below error (NameError: name 'exit' is not defined).
Bug:122343420
Test: 1. full build.
2. m kconfig_xml_fixup
out/soong/host/linux-x86/bin/kconfig_xml_fixup
--input kernel/configs/android-4.14/android-base-conditional.xml
--output-version
out/soong/.intermediates/kernel/configs/android-4.14/kernel_config_current_4.14/gen/version.txt
--output-matrix
out/soong/.intermediates/kernel/configs/android-4.14/kernel_config_current_4.14/gen/conditional.xml
Change-Id: I1fef27321c1051a7a6e9e809328c0695f83cfced
The xml file used to express conditional kernel config requirements
differs from the format used by the compatibility matrix in two ways.
This script fixes up the xml file so it may be included in the
compatibility matrix.
1. The kernel config XML specifies the minimum LTS version once at the
top of the file rather than for every group of configs in the file. It
also uses the "group" tag for groups of configs rather than the "kernel"
tag. The script removes the top entry and converts each "group" tag to a
"kernel" tag with the minimum LTS version.
2. The kernel config XML supports identifying config values as bools as
well as tristates. These values are treated no differently by the vintf
code, however it may reduce confusion for developers maintaining the
kernel configs by not forcing them to denote boolean kernel config
values as tristates in the XML source. These get converted to tristate
when creating the compatibility matrix as only tristate is supported
there.
Test: run script manually
Change-Id: I0480eaf8de02746f03a980c65572d266739523da