Don't check the files by using mic chroot method
[tools/itest-cases-mic.git] / cases / create / opt_cases / mic_cr_qcow_logfile-current-file_ia32.case
1 <testcase>
2   <summary>Test '--logfile' option of 'qcow' format image</summary>
3   <fixtures>
4     <copy src="ks_files/qcow_image.ks" />
5   </fixtures>
6   <steps><![CDATA[
7 losetup_path=$(sudo which losetup)
8 sudo $losetup_path -a
9 sudo $losetup_path -a | wc -l | xargs test 0 -eq
10 hostname=$(hostname)
11 sudo mic cr -d -v qcow qcow_image.ks --logfile=./log/qcow.log -k /home/build/mic-tmp-cache
12 # use '-k /home/build/mic-tmp-cache', because directory '/home/build/' has larger space, if
13 # use default cache dir, mic will throw error 'Failed to umount /var/***/install_root' on
14 # Ubuntu_12.04_64bit qemu-kvm
15 test -f ./log/qcow.log
16 test -e ./mic-output/emulimg-3.0.img
17 file ./mic-output/emulimg-3.0.img | grep -i 'QCOW'
18 grep 'Finished' ./log/qcow.log
19 grep "$hostname" ./log/qcow.log
20 sudo $losetup_path -a
21 sudo $losetup_path -a | wc -l | xargs test 0 -eq
22 egrep 'mic [0-9]{1,2}\.[0-9]+' ./log/qcow.log
23 ]]></steps>
24   <teardown><![CDATA[
25 echo "cleaning..."
26 sudo rm -rf ./mic-output
27 sudo rm ./log/qcow.log
28 test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
29 echo "finish cleaning..."
30 ]]></teardown>
31 </testcase>