2 <summary>This test case is used to test the option
6 <copy src="ks_files/qcow_image.ks" />
7 <copy src="conf/mic.conf" />
11 losetup_path=$(sudo which losetup)
15 sudo $losetup_path -a | wc -l | xargs test 0 -eq
17 # set tmpdir and roordir to /home/build to avoid space lacking during build
18 sed -i 's!^\(tmpdir=\).*!\1 /home/build/mic/tmp!g' mic.conf
19 sed -i 's!^\(rootdir=\).*!\1 /home/build/mic-bootstrap!g' mic.conf
21 sudo mic cr -d -v qcow qcow_image.ks \
25 -k /home/build/mic-tmp-cache
27 # use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
28 # use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
29 # Ubuntu_12.04_64bit qemu-kvm
31 grep -i "Finished" mic.log
35 sudo $losetup_path -a | wc -l | xargs test 0 -eq
37 grep 'Start mic in bootstrap' mic.log
41 sudo test -f ./my_mic-output/emulimg-3.0.img
43 file ./my_mic-output/emulimg-3.0.img | grep -i "QCOW"
50 sudo rm -rf ./my_mic-output/
52 sed -i 's!^\(tmpdir=\).*!\1 /var/tmp/mic!g' mic.conf
53 sed -i 's!^\(rootdir=\).*!\1 /var/tmp/mic-bootstrap!g' mic.conf
55 test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
57 echo "finish clean space...."
59 echo "finish cleaning...."