From a320077b5a144e514d17ef04a586ad8b561763fb Mon Sep 17 00:00:00 2001 From: Amrathesh Date: Fri, 12 Jun 2026 05:51:00 +0000 Subject: [PATCH] Add sbmr level config and init.sh change - Add sbmr_level config with M2.1 as the default value as per SRS v3.1.1 - Pass --level to SBMR ACS inband testing. Signed-off-by: Amrathesh Change-Id: I676b33596c709c657727c3d5f8daa80f13cdf7b4 --- common/config/acs_run_config.ini | 2 ++ common/linux_scripts/init.sh | 7 ++++++- common/linux_scripts/sbmr.sh | 17 +++++++++++------ common/parser/Parser.py | 4 ++++ 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/common/config/acs_run_config.ini b/common/config/acs_run_config.ini index 8b90aa8e..b97416d2 100755 --- a/common/config/acs_run_config.ini +++ b/common/config/acs_run_config.ini @@ -64,3 +64,5 @@ automation_bbsr_tpm_run = false [SBMR] # This variable Enable/Disable SBMR in-band run(Valid values true or false). automation_sbmr_in_band_run = false +# SBMR ACS level. Leave empty to use sbmr-acs default behavior. +sbmr_level = M2.1 diff --git a/common/linux_scripts/init.sh b/common/linux_scripts/init.sh index ff7d04d8..51b0be02 100644 --- a/common/linux_scripts/init.sh +++ b/common/linux_scripts/init.sh @@ -82,6 +82,7 @@ if [ "$automation_enabled" == "True" ]; then sbsa_enabled="`python3 /mnt/acs_tests/parser/Parser.py -automation_sbsa_run`" sbmr_enabled="`python3 /mnt/acs_tests/parser/Parser.py -automation_sbmr_in_band_run`" + sbmr_level="`python3 /mnt/acs_tests/parser/Parser.py -sbmr_level`" fi if [ $ADDITIONAL_CMD_OPTION != "noacs" ]; then @@ -150,7 +151,11 @@ if [ $ADDITIONAL_CMD_OPTION != "noacs" ]; then cd /usr/bin python redfish-finder cd sbmr-acs - ./run-sbmr-acs.sh linux + if [ -n "$sbmr_level" ]; then + ./run-sbmr-acs.sh linux --level "$sbmr_level" + else + ./run-sbmr-acs.sh linux + fi mkdir -p ${LOG_DIR}/sbmr cp -r logs ${LOG_DIR}/sbmr/sbmr_in_band_logs cd / diff --git a/common/linux_scripts/sbmr.sh b/common/linux_scripts/sbmr.sh index 3180c7bc..e340b2df 100644 --- a/common/linux_scripts/sbmr.sh +++ b/common/linux_scripts/sbmr.sh @@ -20,24 +20,29 @@ LOG_DIR="/mnt/acs_results_template/acs_results" automation_enabled="`python3 /mnt/acs_tests/parser/Parser.py -automation`" -if [ "$automation_enabled" == "True" ]; then - sbmr_enabled="`python3 /mnt/acs_tests/parser/Parser.py -automation_sbmr_in_band_run`" -fi +sbmr_enabled="`python3 /mnt/acs_tests/parser/Parser.py -automation_sbmr_in_band_run`" +sbmr_level="`python3 /mnt/acs_tests/parser/Parser.py -sbmr_level`" run_sbmr_in_band(){ echo "Call SBMR ACS in-band test" cd /usr/bin python redfish-finder cd sbmr-acs - ./run-sbmr-acs.sh linux + if [ -n "$sbmr_level" ]; then + ./run-sbmr-acs.sh linux --level "$sbmr_level" + else + ./run-sbmr-acs.sh linux + fi mkdir -p ${LOG_DIR}/sbmr cp -r logs ${LOG_DIR}/sbmr/sbmr_in_band_logs cd / echo "SBMR ACS in-band run is completed\n" } - # Run SBMR-ACS In-Band Tests if run with grub option -if [ "$automation_enabled" == "True" ] && [ "$sbmr_enabled" == "False" ]; then + # Run SBMR-ACS In-Band Tests if automation and SBMR are enabled in config file +if [ "$automation_enabled" == "False" ]; then + echo "********* Automation run is disabled in config file**************" +elif [ "$sbmr_enabled" == "False" ]; then echo "********* SBMR in-band test is disabled in config file**************" else run_sbmr_in_band diff --git a/common/parser/Parser.py b/common/parser/Parser.py index 17fe3f18..f2861272 100644 --- a/common/parser/Parser.py +++ b/common/parser/Parser.py @@ -111,6 +111,7 @@ def main(): parser.add_argument('-automation_bbsr_tpm_run', action='store_true', help='Check if BBSR TPM is enabled') parser.add_argument('--config', default='/mnt/acs_tests/config/acs_run_config.ini', help='Path to the config file') parser.add_argument('-automation_sbmr_in_band_run', action='store_true', help='Check if SBMR is enabled') + parser.add_argument('-sbmr_level', action='store_true', help='Get SBMR ACS level') args = parser.parse_args() @@ -151,6 +152,9 @@ def main(): elif args.automation_sbmr_in_band_run: enabled = check_section_enable(config, 'SBMR', 'automation_sbmr_in_band_run') print(enabled) + elif args.sbmr_level: + level = config.get('SBMR', 'sbmr_level', fallback='') + print(level) else: print("Please specify a valid command or use --help for more information.") return