echo "Number of loop devices is not the same with previous number."
exit 1
fi
++
++mic_copied=$(grep -i -s "Copy host mic to bootstrap" log.file || true)
++if [ -n "$mic_copied" ];then
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
++else
++echo "mic is not copied."
++fi
]]>
</steps>
echo "Number of loop devices is not the same with previous number."
exit 1
fi
++
++mic_copied=$(grep -i -s "Copy host mic to bootstrap" log.file || true)
++if [ -n "$mic_copied" ];then
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
++else
++echo "mic is not copied."
++fi
]]>
</steps>
echo "Number of loop devices is not the same with previous number."
exit 1
fi
++
++mic_copied=$(grep -i -s "Copy host mic to bootstrap" log.file || true)
++if [ -n "$mic_copied" ];then
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
++else
++echo "mic is not copied."
++fi
]]>
</steps>
+++ /dev/null
--<testcase>
-- <summary>Cp tpk to specific folder, and magic line in this ks file is:
--# -*-mic2-options-*- -f loop -*-mic2-options-*-
-- </summary>
-- <fixtures>
-- <copy src="ks_files/handset_blackbay_http_tpk_repo.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- <copydir src="tpk" />
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py handset_blackbay_http_tpk_repo.ks repo_config.json common-with-tpk-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_http_tpk_repo.ks --logfile=log.file --tpk_install="./tpk"
--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
--sudo mkdir -p mic-output/platform
--sudo mount mic-output/platform.img mic-output/platform
--sudo test -f mic-output/platform/usr/apps/.preload-tpk/org.tizen.calendar-1.0.0-x86.tpk
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--sudo umount mic-output/platform
--test -d ./mic-output && sudo rm -rf mic-output
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>Test option "check-pkgs".</summary>
-- <fixtures>
-- <copy src="ks_files/qcow_image.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py qcow_image.ks repo_config.json qcow-profile
--
--losetup_path=$(sudo which losetup)
--
--sudo $losetup_path -a
--
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--
--sudo mic -d -v cr qcow -A=i686 qcow_image.ks --tmpfs --check-pkgs=bash,rpm --logfile=qcow1.log -k /home/build/mic-tmp-cache
--
--# use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
--# use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
--# Ubuntu_12.04_64bit qemu-kvm
--
--test -f qcow1.log
--
--grep 'Finished' qcow1.log
--
--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
--
--test -f ./mic-output/emulimg-3.0.img
--
--sudo mic -d -v cr qcow -A=i686 qcow_image.ks --check-pkgs=bashrr --logfile=qcow2.log -k /home/build/mic-tmp-cache 2>&1 | tee qcow2.log || true
--
--grep "Packages absent in image: bashrr" qcow2.log
--
--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
--
--]]></steps>
-- <teardown><![CDATA[
--
--echo "cleaning..."
--
--sudo rm -rf ./mic-output
--
--sudo rm -f qcow1.log qcow2.log
--
--test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
--
--echo "finish cleaning..."
--
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>This test case is used to test the option
-- "--config, --runtime"
-- </summary>
-- <fixtures>
-- <copy src="ks_files/qcow_image.ks" />
-- <copy src="conf/mic.conf" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py qcow_image.ks repo_config.json qcow-profile
--
--losetup_path=$(sudo which losetup)
--
--sudo $losetup_path -a
--
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--
--# set tmpdir and roordir to /home/build to avoid space lacking during build
--sed -i 's!^\(tmpdir=\).*!\1 /home/build/mic/tmp!g' mic.conf
--sed -i 's!^\(rootdir=\).*!\1 /home/build/mic-bootstrap!g' mic.conf
--
--sudo mic -d -v cr qcow -A=i686 qcow_image.ks \
-- --config=mic.conf \
-- --runtime=bootstrap \
-- --logfile=mic.log \
-- -k /home/build/mic-tmp-cache
--
--# use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
--# use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
--# Ubuntu_12.04_64bit qemu-kvm
--
--grep -i "Finished" mic.log
--
--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
--
--grep 'Start mic in bootstrap' mic.log
--
--sudo rm mic.log
--
--sudo test -f ./my_mic-output/emulimg-3.0.img
--
--
--]]></steps>
-- <teardown><![CDATA[
--
--echo "cleaning...."
--
--sudo rm -rf ./my_mic-output/
--
--sed -i 's!^\(tmpdir=\).*!\1 /var/tmp/mic!g' mic.conf
--sed -i 's!^\(rootdir=\).*!\1 /var/tmp/mic-bootstrap!g' mic.conf
--
--test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
--
--echo "finish clean space...."
--
--echo "finish cleaning...."
--
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>create qcow image with armv7l arch, and options is
-- "--local-pkgs-path=./rpm --record-pkgs=name,content,license --taring-to=@NAME@.tar.gz"</summary>
-- <fixtures>
-- <copy src="ks_files/qcow_image.ks" />
-- <copydir src="rpm/" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py qcow_image.ks repo_config.json qcow-profile
--
--losetup_path=$(sudo which losetup)
--
--sudo $losetup_path -a
--
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--
--enforce_path=$(sudo which setenforce || true)
--
--if [ ! -z $enforce_path ];then
-- sudo $enforce_path 0 || true
--fi
--
--sudo mic -d -v cr qcow -A=i686 qcow_image.ks \
-- --local-pkgs-path=./rpm \
-- --record-pkgs=name,content,license,vcs \
-- --taring-to=@NAME@.tar.gz \
-- --logfile=log.file \
-- -k /home/build/mic-tmp-cache
--
--# use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
--# use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
--# Ubuntu_12.04_64bit qemu-kvm
--
--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
--
--grep 'Marking .*.rpm to be installed' log.file
--
--sudo ls ./mic-output | grep 'qcow_image.*.tar.gz'
--
--sudo ls ./mic-output | grep 'qcow_image.*.packages'
--
--sudo ls ./mic-output | grep 'qcow_image.*.license'
--
--sudo ls ./mic-output | grep 'qcow_image.*.files'
--
--]]></steps>
-- <teardown><![CDATA[
--
--echo "cleaning...."
--
--sudo rm log.file
--
--sudo rm -rf ./mic-output
--
--test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
--
--echo "finish cleaning...."
--
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>create qcow image with option
--"--logfile=/custome/arm.log -c conf/mic.conf --release=tizen-2.2_20130719.3 --pkgmgr=zypp"</summary>
-- <fixtures>
-- <copy src="ks_files/qcow_image.ks" />
-- <copy src="conf/mic.conf" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py qcow_image.ks repo_config.json qcow-profile
--
--losetup_path=$(sudo which losetup)
--
--sudo $losetup_path -a
--
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--
--# on some platforms, the command "setenforce 0" is needed to be executed,
--# on some other platforms, it's not needed to execute this command or
--# no related package is installed, so we added "||"
--
--enforce_path=$(sudo which setenforce || true)
--
--if [ ! -z $enforce_path ];then
-- sudo $enforce_path 0 || true
--fi
--
--# set tmpdir and roordir to /home/build to avoid space lacking during build
--sed -i 's!^\(tmpdir=\).*!\1 /home/build/mic/tmp!g' mic.conf
--sed -i 's!^\(rootdir=\).*!\1 /home/build/mic-bootstrap!g' mic.conf
--
--sudo mic -d -v cr qcow -A=i686 qcow_image.ks --logfile=/custome/arm.log -c mic.conf --release=tizen-2.2_20130719.3 --pkgmgr=zypp -k /home/build/mic-tmp-cache
--
--# use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
--# use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
--# Ubuntu_12.04_64bit qemu-kvm
--
--sudo test -f /custome/arm.log
--
--grep "Finished" /custome/arm.log
--
--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
--
--test -f my_mic-output/tizen-2.2_20130719.3/images/qcow_image/emulimg-3.0.img
--
--file my_mic-output/tizen-2.2_20130719.3/images/qcow_image/emulimg-3.0.img | grep -i "QCOW"
--
--test -f my_mic-output/tizen-2.2_20130719.3/images/qcow_image/tizen-2.2_20130719.3_qcow_image.ks
--
--test -f my_mic-output/tizen-2.2_20130719.3/images/qcow_image/tizen-2.2_20130719.3_qcow_image.packages
--
--]]></steps>
-- <teardown><![CDATA[
--
--echo "cleaning...."
--
--sudo rm /custome/arm.log
--
--sudo rm -rf my_mic-output
--
--sed -i 's!^\(tmpdir=\).*!\1 /var/tmp/mic!g' mic.conf
--sed -i 's!^\(rootdir=\).*!\1 /var/tmp/mic-bootstrap!g' mic.conf
--
--test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
--
--echo "finish cleaning...."
--
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>if exist any file in fixed folder "/tmp/.postscript/error/", mic will abort creating image</summary>
-- <fixtures>
-- <copy src="ks_files/scriptlet_error.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- <copydir src="rpm/scriptlet" />
-- </fixtures>
-- <steps>
-- <![CDATA[
--#create local repo
--python3 repo_parse.py scriptlet_error.ks repo_config.json scriptlet-error-profile
--mkdir -p /home/build/scriptlet/
--cp ./scriptlet/* /home/build/scriptlet/
--createrepo /home/build/scriptlet
--losetup_path=$(sudo which losetup)
--sudo $losetup_path -a
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--#zypp pkg manager
--(sudo mic -d -v cr loop -A=i686 scriptlet_error.ks --logfile=./log/handset.log)
--grep 'scriptlet failed' ./log/handset.log
--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
-- ]]>
-- </steps>
-- <teardown>
-- <![CDATA[
--echo "cleaning..."
--sudo test -e ./mic-output && sudo rm -rf ./mic-output
--test -e ./log/handset.log && sudo rm ./log/handset.log
--test -e /home/build/scriptlet && sudo rm -rf /home/build/scriptlet
-- ]]>
-- </teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>check if env is right</summary>
-- <fixtures>
-- <copy src="ks_files/env_section.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py env_section.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 loop -A=i686 env_section.ks --logfile=mic.log
--grep 'Finished' mic.log
--grep 'VALUE1 = 0x1000' mic.log
--grep 'VALUE2 = "value"' mic.log
--test -e mic-output/platform.img
--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
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--test -d ./mic-output && sudo rm -rf ./mic-output
--test -f mic.log && sudo rm mic.log
--echo 'finish cleaning'
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>This test case is used to test full part ks</summary>
-- <fixtures>
-- <copy src="ks_files/whole_rd_210.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- <content target="parse_manifest.py">
--import sys
--import json
--img_file = sys.argv[1]
--mic_version = sys.argv[2]
--manifest_file=open('mic-output/manifest.json')
--manifest=json.load(manifest_file)
--assert manifest['format'] == 'loop'
--assert manifest['version'] == mic_version
--assert manifest['loop']['pack'] == '.tar.gz'
--assert img_file in manifest['loop']['image_files']
--assert manifest['loop']['partitions']['/'] == 'platform'
--assert manifest['loop']['partitions']['/opt'] == 'data'
--assert manifest['loop']['partitions']['/opt/usr'] == 'ums'
-- </content>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py whole_rd_210.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=armv7l whole_rd_210.ks --logfile=log.file
--grep "Finished" log.file
--sudo test -e ./mic-output/whole_rd_210-*.tar.gz
--img_file=$(ls mic-output | grep 'whole_rd_210-.*.tar.gz')
--sudo tar zxvf mic-output/whole_rd_210-*.tar.gz -C mic-output/
--sudo test -f mic-output/platform.img
--sudo test -f mic-output/data.img
--sudo test -f mic-output/ums.img
--sudo test -f mic-output/modules.img
--grep 'Copying attachment files' 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
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--test -f log.file && sudo rm log.file
--test -d mic-output && sudo rm -rf ./mic-output
--echo 'finished cleaning'
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>test if mic can install tpk sucessfully with local tpk repo</summary>
-- <fixtures>
-- <copy src="ks_files/qcow_image_tpk_http_repo.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py qcow_image_tpk_http_repo.ks repo_config.json qcow-with-tpk-profile
--losetup_path=$(sudo which losetup)
--sudo $losetup_path -a
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--sudo mic -d -v cr loop -A=i686 qcow_image_tpk_http_repo.ks --logfile=mic1.log
--grep "Finished" mic1.log
--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
--test -e mic-output/emulimg-3.0.img
--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
--sudo mkdir -p ./mic-output/emulimg
--sudo mount ./mic-output/emulimg-3.0.img ./mic-output/emulimg
--sudo test -f ./mic-output/emulimg/usr/apps/.preload-tpk/org.tizen.camera-app-1.0.0-x86.tpk
--sudo test -f ./mic-output/emulimg/usr/apps/.preload-tpk/org.tizen.contacts-2.0.0-x86.tpk
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--test -f mic1.log && sudo rm mic1.log
--sudo umount ./mic-output/emulimg
--test -d ./mic-output && sudo rm -rf ./mic-output
--echo "finish cleaning..."
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>create image with ks file use error package like named 'hg'</summary>
-- <fixtures>
-- <copy src="ks_files/error_package.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py error_package.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 error_package.ks --logfile=mic1.log)
--grep -i 'Unable to find package: hg' mic1.log
--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
--]]></steps>
-- <teardown><![CDATA[
--echo "clean space...."
--sudo rm mic1.log
--sudo rm -rf ./mic-output
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>create loop image with armv7l arch and -d -v option</summary>
-- <fixtures>
-- <copy src="ks_files/armv7l.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py armv7l.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)
--enforce_path=$(sudo which setenforce || true)
--if [ ! -z $enforce_path ];then
-- sudo $enforce_path 0 || true
--fi
--sudo mic --non-interactive -d -v cr loop -A=armv7l armv7l.ks -o out1 2>&1 | tee mic1.log
--grep -i 'Finished' mic1.log
--grep -i 'Debug' mic1.log
--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
--grep -i 'Verbose' mic1.log
--test -f ./out1/platform.img
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--sudo rm -rf ./out1/
--sudo rm mic1.log
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>Test option "--interactive" ,"--non-interactive"</summary>
-- <fixtures>
-- <copy src="ks_files/handset_blackbay.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py handset_blackbay.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)
--sed -i '/shadow-utils/d' handset_blackbay.ks
--sudo mic --non-interactive cr loop -A=i686 handset_blackbay.ks
--test -f ./mic-output/platform.img
--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
--bash -c "sudo mic -i cr loop -A=i686 handset_blackbay.ks 2>&1 >> tmp.log" << EOF
--n
--EOF
--grep ".* \[y/n](y): INFO" tmp.log
--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
--
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--test -d mic-output && sudo rm -rf ./mic-output
--test -d test-output && sudo rm -rf ./test-output
--test -e tmp.log && sudo rm tmp.log
--sed -i '/%packages/a\shadow-utils' ./ks_files/handset_blackbay.ks
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>create loop image with pkgmgr is yum</summary>
-- <fixtures>
-- <copy src="ks_files/handset_blackbay.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py handset_blackbay.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 loop -A=i686 handset_blackbay.ks --pkgmgr=yum 2>&1 | tee mic.log)
--grep -i "Can't find backend: yum" mic.log
--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
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--sudo rm -rf ./mic-output
--sudo rm mic.log
--echo "finish cleaning..."
--]]></teardown>
--</testcase>
+++ /dev/null
--<testcase>
-- <summary>Test '--logfile' option of 'qcow' format image</summary>
-- <fixtures>
-- <copy src="ks_files/qcow_image.ks" />
-- <copy src="conf/repo_config.json"/>
-- <copy src="py_scripts/repo_parse.py"/>
-- </fixtures>
-- <steps><![CDATA[
--python3 repo_parse.py qcow_image.ks repo_config.json qcow-profile
--losetup_path=$(sudo which losetup)
--sudo $losetup_path -a
--loop_used_before=$(sudo $losetup_path -a | wc -l)
--hostname=$(hostname)
--sudo mic -d -v cr qcow -A=i686 qcow_image.ks --logfile=./log/qcow.log -k /home/build/mic-tmp-cache
--# use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
--# use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
--# Ubuntu_12.04_64bit qemu-kvm
--test -f ./log/qcow.log
--test -e ./mic-output/emulimg-3.0.img
--grep 'Finished' ./log/qcow.log
--grep "$hostname" ./log/qcow.log
--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
--egrep 'mic [0-9]{1,2}\.[0-9]+' ./log/qcow.log
--]]></steps>
-- <teardown><![CDATA[
--echo "cleaning..."
--sudo rm -rf ./mic-output
--sudo rm ./log/qcow.log
--test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
--echo "finish cleaning..."
--]]></teardown>
--</testcase>
desktop --autologinuser=tizen
user --name tizen --groups audio,video --password 'tizen'
--repo --name=Tizen-base --baseurl=http://download.tizen.org/releases/milestone/tizen/base/tizen-base_20180928.1/repos/standard/packages/ --save --gpgkey=0 --ssl_verify=no
--repo --name=Tizen-main --baseurl=http://download.tizen.org/releases/milestone/tizen/unified/tizen-unified_20181024.1/repos/standard/packages/ --save --gpgkey=0 --ssl_verify=no
++repo --name=Tizen-base --baseurl=http://download.tizen.org/releases/milestone/TIZEN/Tizen/Tizen-Base/tizen-base_20230515.082838/repos/standard/packages/ --save --gpgkey=0 --ssl_verify=no
++repo --name=Tizen-main --baseurl=http://download.tizen.org/releases/milestone/TIZEN/Tizen/Tizen-Unified/tizen-unified_20230524.002652/repos/standard/packages/ --save --gpgkey=0 --ssl_verify=no
%env
VALUE1=0x1000