projectacrn / acrn-hypervisor

Project ACRN hypervisor
BSD 3-Clause "New" or "Revised" License
1.1k stars 505 forks source link

debian/debian_build.sh fails when a work folder contains files other than XML #8344

Open junjiemao1 opened 1 year ago

junjiemao1 commented 1 year ago

Describe the bug debian/debian_build.sh fails when a work folder contains files other than XML.

Platform Any

Codebase Main branch

Scenario Any

To Reproduce Steps to reproduce the behavior:

  1. Create a work folder that contains a board XML, a scenario XML and some arbitrary text files.
  2. Build debian packages using debuild -eACRN_BOARDLIST= -eACRN_SCENARIOLIST= -eCONFIGDIRS=test_scenario -- binary

Expected behavior Build succeeds.

Error log Traceback (most recent call last): File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 1713, in feed self.parser.Parse(data, False) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/david/acrn-work/acrn-hypervisor/misc/config_tools/scenario_config/default_populator.py", line 102, in main(args) File "/home/david/acrn-work/acrn-hypervisor/misc/config_tools/scenario_config/default_populator.py", line 89, in main pipeline.run(obj) File "/home/david/acrn-work/acrn-hypervisor/misc/config_tools/scenario_config/pipeline.py", line 68, in run stage.run(obj) File "/home/david/acrn-work/acrn-hypervisor/misc/config_tools/scenario_config/xml_loader.py", line 18, in run etree = parse(xml_path) File "/usr/lib/python3/dist-packages/defusedxml/common.py", line 100, in parse return _parse(source, parser) File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 1222, in parse tree.parse(source, parser) File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 586, in parse parser.feed(data) File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 1715, in feed self._raiseerror(v) File "/usr/lib/python3.10/xml/etree/ElementTree.py", line 1622, in _raiseerror raise err xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 1, column 0

NanlinXie commented 1 year ago

[External_System_ID] ACRN-9524