misc: add processing for Console vUART is None

The current code assume there was one Console vUART all the time, and
there is an issue when the Console vUART is None.

This patch add the case of "None" and add assert to check no serial
console config.

Tracked-On: #6690
Signed-off-by: Chenli Wei chenli.wei@intel.com
This commit is contained in:
Chenli Wei 2022-06-07 11:17:14 +08:00 committed by acrnsi-robot
parent 181ab6afea
commit ddefcccb26
2 changed files with 8 additions and 0 deletions

View File

@ -43,4 +43,10 @@
</xs:annotation>
</xs:assert>
<xs:assert test="not (//BUILD_TYPE = 'debug' and //SERIAL_CONSOLE = 'None')">
<xs:annotation acrn:severity="error" acrn:report-on="//BUILD_TYPE">
<xs:documentation>You can't use debug Build type when there is no serial console config</xs:documentation>
</xs:annotation>
</xs:assert>
</xs:schema>

View File

@ -43,6 +43,8 @@ def get_console_vuart_port(scenario_etree, vm_name):
port = "0x3E8U"
elif port == "COM Port 4":
port = "0x2E8U"
else:
port = "0x0U"
return port