Don't check the files by using mic chroot method
[tools/itest-cases-mic.git] / cases / create / func_cases / mic_cr_qcow_config_runtime_ia32.case
1 <testcase>
2   <summary>This test case is used to test the option
3   "--config, --runtime"
4   </summary>
5   <fixtures>
6     <copy src="ks_files/qcow_image.ks" />
7     <copy src="conf/mic.conf" />
8   </fixtures>
9   <steps><![CDATA[
10
11 losetup_path=$(sudo which losetup)
12
13 sudo $losetup_path -a
14
15 sudo $losetup_path -a | wc -l | xargs test 0 -eq
16
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
20
21 sudo mic cr -d -v  qcow qcow_image.ks \
22   --config=mic.conf \
23   --runtime=bootstrap \
24   --logfile=mic.log \
25   -k /home/build/mic-tmp-cache
26
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
30
31 grep -i "Finished" mic.log
32
33 sudo $losetup_path -a
34
35 sudo $losetup_path -a | wc -l | xargs test 0 -eq
36
37 grep 'Start mic in bootstrap' mic.log
38
39 sudo rm mic.log
40
41 sudo test -f ./my_mic-output/emulimg-3.0.img
42
43 file ./my_mic-output/emulimg-3.0.img | grep -i "QCOW"
44
45 ]]></steps>
46   <teardown><![CDATA[
47
48 echo "cleaning...."
49
50 sudo rm -rf ./my_mic-output/
51
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
54
55 test -d /home/build/mic-tmp-cache && sudo rm -rf /home/build/mic-tmp-cache
56
57 echo "finish clean space...."
58
59 echo "finish cleaning...."
60
61 ]]></teardown>
62 </testcase>