Commit Graph

2 Commits

Author SHA1 Message Date
Junjie Mao
bd28e548d0 config_tools: populate default values to all nodes
The default value population algorithm introduced by commit
2bfaa34 ("config_tools: populate default values in scenario XML") only
populates default values to the first occurrence of a tag when the tag is
specified to allow multiple occurrences under an xs:all node. This may lead
to incomplete scenario XML as some of the default values are missed.

This patch fixes this issue by checking **all** nodes having the same tag
under a node specified by an xs:all schema.

Fixes: 2bfaa34 ("config_tools: populate default values in scenario XML")

Tracked-On: #6292
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-09-23 09:15:44 +08:00
Junjie Mao
2bfaa34cf2 config_tools: populate default values in scenario XML
While we have default values of configuration entries stated in the schema
of scenario XMLs, today we still require user-given scenario XMLs to
contain literally ALL XML nodes. Missing of a single node will cause schema
validation errors even though we can use its default value defined in the
schema.

This patch allows user-given scenario XMLs to ignore nodes with default
values. It is done by adding the missing nodes, all containing the defined
default values, to the input scenario XML when copying it to the build
directory. This approach imposes no changes to either the schema or
subsequent scripts in the build system.

Tracked-On: #6292
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
2021-09-13 09:05:52 +08:00