misc: fail to save config_summary.rst while changing board.xml

This patch is to fix the bug which will report while changing board.xml.

The former coder added data into the list without removing old ones,
and the file config_summary.rst won't be dropped before generating a new one.

I removed the old data when I want to close the file config_summary.rst.

I tested by change board.xml with different pcpus and make confirmation
the result is correct now.

Tracked-On: #8718
Signed-off-by: dongpingx <dongpingx.wu@intel.com>
This commit is contained in:
dongpingx 2024-08-30 14:21:34 +08:00
parent 0198edf145
commit 1a8d2a9def

View File

@ -448,7 +448,9 @@ class GenerateRst:
# Close the Rst file after all information is written.
def close_file(self):
self.file.close()
if self.file:
self.service_vm_used_pcpu_list.clear()
self.file.close()
def main(board_xml, scenario_xml, config_summary):