only enable to test f2fs module with ubuntu24.04 43/320543/1 accepted/tools_devbase_tools devel master accepted/tools/devbase/tools/20250527.103752 accepted/tools/devbase/tools/20250528.062230
authorwang biao <biao716.wang@samsung.com>
Mon, 18 Nov 2024 07:52:31 +0000 (15:52 +0800)
committerwang biao <biao716.wang@samsung.com>
Mon, 18 Nov 2024 07:52:31 +0000 (15:52 +0800)
Change-Id: I4a60ff227d5822598b15bdbe961eb21f75f95cb2
Signed-off-by: wang biao <biao716.wang@samsung.com>
cases/create/func_cases/mic_cr_auto_loop_f2fs.case

index 83f121169dd0514e170ab540171e2b980ed29d2f..231dd24b5a079ea8b39f606f9a4e35b9b89b56cd 100755 (executable)
@@ -10,19 +10,25 @@ which called magic line, and magic line in this ks file is:
     <copy src="py_scripts/repo_parse.py"/>
   </fixtures>
   <steps><![CDATA[
-python3 repo_parse.py handset_blackbay_f2fs.ks repo_config.json common-no-source-profile
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-loop_used_before=$(sudo $losetup_path -a | wc -l)
-sudo mic -d -v cr auto -A=i686 handset_blackbay_f2fs.ks --logfile=log.file
-grep "Finished" log.file
-sudo $losetup_path -a
-loop_used_after=$(sudo $losetup_path -a | wc -l)
-if [ "$loop_used_before" -ne "$loop_used_after" ];then
-    echo "Number of loop devices is not the same with previous number."
-    exit 1
+distro_name=$(python3 -c 'import distro;print(distro.name().lower().rstrip())')
+echo $distro_name
+distro_version=$(python3 -c 'import distro;print(distro.version().lower().rstrip())')
+echo $distro_version
+if [ "$distro_name" = "ubuntu" ] && [ "$distro_version" = "24.04" ]; then
+  python3 repo_parse.py handset_blackbay_f2fs.ks repo_config.json common-no-source-profile
+  losetup_path=$(sudo which losetup)
+  sudo $losetup_path -a
+  loop_used_before=$(sudo $losetup_path -a | wc -l)
+  sudo mic -d -v cr auto -A=i686 handset_blackbay_f2fs.ks --logfile=log.file
+  grep "Finished" log.file
+  sudo $losetup_path -a
+  loop_used_after=$(sudo $losetup_path -a | wc -l)
+  if [ "$loop_used_before" -ne "$loop_used_after" ];then
+      echo "Number of loop devices is not the same with previous number."
+      exit 1
+  fi
+  ls mic-output/ | grep 'handset_blackbay_f2fs-.*-rs.zip'
 fi
-ls mic-output/ | grep 'handset_blackbay_f2fs-.*-rs.zip'
 ]]></steps>
   <teardown><![CDATA[
 echo "cleaning..."