From eb12845f8ced18659c05bee52eed850859010839 Mon Sep 17 00:00:00 2001 From: wanchao-xu Date: Wed, 31 Jan 2024 15:41:01 +0800 Subject: [PATCH] Fix can't get the mic version correctly issue. * Mic version can't be got because the mic notification is added before version. Change-Id: I726942f6e496bce42371e3f603c53946afc02854 Signed-off-by: wanchao-xu --- cases/create/func_cases/mic_cr_auto_fs.case | 2 +- cases/create/func_cases/mic_cr_auto_fs_d_v_i.case | 6 +++--- cases/create/func_cases/mic_cr_auto_fs_parameter_run_script.case | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cases/create/func_cases/mic_cr_auto_fs.case b/cases/create/func_cases/mic_cr_auto_fs.case index 1fb97f1..ac9a46f 100755 --- a/cases/create/func_cases/mic_cr_auto_fs.case +++ b/cases/create/func_cases/mic_cr_auto_fs.case @@ -35,7 +35,7 @@ if [ "$loop_used_before" -ne "$loop_used_after" ];then exit 1 fi fs_dir=$(ls mic-output/ | grep 'handset_blackbay_fs-.*-rs.tar.gz') -mic_version=$(mic --version 2>&1 | awk -F ' ' '{print $2}') +mic_version=$(mic --version 2>&1 | awk -F ' ' '$2 ~ /[0-9]/p{print $2}') python3 parse_manifest.py $fs_dir $mic_version ]]> diff --git a/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case b/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case index cefd4b9..2a57b46 100755 --- a/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case +++ b/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case @@ -12,11 +12,11 @@ import sys import json img_file = sys.argv[1] -#mic_version = sys.argv[2] +mic_version = sys.argv[2] manifest_file=open('mic-output/manifest.json') manifest=json.load(manifest_file) assert manifest['format'] == 'fs' -#assert manifest['version'] == mic_version +assert manifest['version'] == mic_version assert manifest['fs']['pack'] == '.tar.gz' assert img_file in manifest['fs']['image_files'] @@ -35,7 +35,7 @@ if [ "$loop_used_before" -ne "$loop_used_after" ];then exit 1 fi fs_dir=$(ls mic-output/ | grep 'handset_blackbay_fs_d_v_i-.*-rs.tar.gz') -mic_version=$(mic --version | awk '{print $2}') +mic_version=$(mic --version 2>&1 | awk -F ' ' '$2 ~ /[0-9]/p{print $2}') python3 parse_manifest.py $fs_dir $mic_version ]]> diff --git a/cases/create/func_cases/mic_cr_auto_fs_parameter_run_script.case b/cases/create/func_cases/mic_cr_auto_fs_parameter_run_script.case index 9df78e5..8fdefc4 100755 --- a/cases/create/func_cases/mic_cr_auto_fs_parameter_run_script.case +++ b/cases/create/func_cases/mic_cr_auto_fs_parameter_run_script.case @@ -34,7 +34,7 @@ if [ "$loop_used_before" -ne "$loop_used_after" ];then exit 1 fi fs_dir=$(ls mic-output/ | grep 'handset_blackbay_fs-.*-rs.tar.gz') -mic_version=$(mic --version 2>&1 | awk -F ' ' '{print $2}') +mic_version=$(mic --version 2>&1 | awk -F ' ' '$2 ~ /[0-9]/p{print $2}') python3 parse_manifest.py $fs_dir $mic_version ]]> -- 2.7.4