mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
acrn-config: add max VM count check when generating scenario XML file
Add max VM count check when generating scenario XML file. Tracked-On: #4641 Signed-off-by: Wei Liu <weix.w.liu@intel.com> Acked-by: Victor Sun <victor.sun@intel.com> Acked-by: Terry Zou <terry.zou@intel.com>
This commit is contained in:
@@ -42,6 +42,11 @@ def main(args):
|
||||
common.get_vm_num(params['--scenario'])
|
||||
common.get_vm_types()
|
||||
|
||||
if common.VM_COUNT > common.MAX_VM_NUM:
|
||||
err_dic['vm count'] = "The vm count in config xml should be less or equal {}!".format(common.MAX_VM_NUM)
|
||||
return err_dic
|
||||
|
||||
# check if this is the scenario config which matched board info
|
||||
# get board name
|
||||
(err_dic, board) = common.get_board_name()
|
||||
if err_dic:
|
||||
@@ -99,7 +104,7 @@ def main(args):
|
||||
return err_dic
|
||||
|
||||
|
||||
def ui_entry_api(board_info, scenario_info, out):
|
||||
def ui_entry_api(board_info, scenario_info, out=''):
|
||||
|
||||
arg_list = ['board_cfg_gen.py', '--board', board_info, '--scenario', scenario_info, '--out', out]
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ def sos_bootarg_diff(sos_cmdlines, config):
|
||||
i += 1
|
||||
if i == 1:
|
||||
if sos_len == 1:
|
||||
print('#define SOS_BOOTARGS_DIFF\t{}'.format(sos_cmdline), file=config)
|
||||
print('#define SOS_BOOTARGS_DIFF\t"{}"'.format(sos_cmdline.strip('"')), file=config)
|
||||
else:
|
||||
print('#define SOS_BOOTARGS_DIFF\t"{} " \\'.format(sos_cmdline), file=config)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user