One more minor extension, a command  line option to generate the output as a table:

<verbatim>
megatest -show-runconfig -target target


Section  Key   Value  Source
-------  ---   -----  ------
default  VAR1  val1   global.runconfigs.config
target   VAR2  val2   user.runconfigs.config
target   VAR3  val3   runconfigs.include

</verbatim>