Don't check the files by using mic chroot method
[tools/itest-cases-mic.git] / cases / create / mixed_cases / mic_cr_loop_conf_difference.case
1 <testcase>
2   <summary>This test case is used to test the option "--config",
3 the configue file is with different 'outdir', mic should create image in right directory.</summary>
4   <fixtures>
5     <copy src="ks_files/handset_blackbay.ks" />
6     <copy src="conf/mic.conf" />
7     <copy src="conf/mic_proxy.conf" />
8   </fixtures>
9   <steps><![CDATA[
10 sed -i 's/outdir= .\/mic-output/outdir=new_mic_output/' mic_proxy.conf
11 grep 'new_mic_output' mic_proxy.conf
12 if [ -f /etc/mic/mic.conf ]; then
13     sudo mv /etc/mic/mic.conf /etc/mic/mic.conf.bak
14     sudo cp mic.conf /etc/mic/
15 else
16     sudo cp mic.conf /etc/mic/
17 fi
18 # test bootstrap mode
19 losetup_path=$(sudo which losetup)
20 sudo $losetup_path -a
21 sudo $losetup_path -a | wc -l | xargs test 0 -eq
22 sudo mic cr -d -v  loop handset_blackbay.ks -c mic_proxy.conf  --logfile=log.file
23 grep "Finished" log.file
24 test -f ./new_mic_output/platform.img
25 sudo $losetup_path -a
26 sudo $losetup_path -a | wc -l | xargs test 0 -eq
27 # test native mode
28 sudo mic cr -d -v  loop handset_blackbay.ks \
29   --config=mic_proxy.conf \
30   --runtime=native \
31   --logfile=log.file
32 grep "Finished" log.file
33 test -f ./new_mic_output/platform.img
34 sudo $losetup_path -a
35 sudo $losetup_path -a | wc -l | xargs test 0 -eq
36 ]]></steps>
37   <teardown><![CDATA[
38 echo "cleaning..."
39 if [ -f /etc/mic/mic.conf.bak ];then
40     sudo mv /etc/mic/mic.conf.bak /etc/mic/mic.conf
41 else
42     sudo rm -f /etc/mic/mic.conf
43 fi
44 test -f log.file && sudo rm log.file
45 test -d new_mic_output && sudo rm -rf ./new_mic_output
46 echo 'finish cleaning...'
47 ]]></teardown>
48 </testcase>