Don't check the files by using mic chroot method
[tools/itest-cases-mic.git] / cases / create / mixed_cases / mic_cr_strict_mode_image.case
1 <testcase>
2     <summary>Test option "--strict-mode", it this given, mic will abort creating image, if some rpm pagages fail to install</summary>
3     <fixtures>
4         <copy src="ks_files/strict_mode.ks" />
5         <copydir src="rpm/strict_mode_rpm" />
6     </fixtures>
7     <steps>
8         <![CDATA[
9 #create local repo
10 mkdir -p /home/build/strict_mode/
11 cp  ./strict_mode_rpm/*  /home/build/strict_mode/
12 createrepo /home/build/strict_mode
13 losetup_path=$(sudo which losetup)
14 sudo $losetup_path -a
15 sudo $losetup_path -a | wc -l | xargs test 0 -eq
16 #zypp pkg manager
17 sudo mic cr -d -v loop strict_mode.ks --logfile=./log/handset.log
18 grep 'Finished' ./log/handset.log
19 #zypp pkg manager strict mode
20 (! sudo mic cr -d -v loop strict_mode.ks --logfile=./log/handset.log --strict-mode)
21 grep 'mic failes to install some packages' ./log/handset.log
22 #yum pkg manager
23 sudo mic cr -d -v loop strict_mode.ks --logfile=./log/handset.log --pkgmgr=yum --runtime=native
24 grep 'Finished' ./log/handset.log
25 #yum pkg magager strict mode
26 (! sudo mic cr -d -v loop strict_mode.ks --logfile=./log/handset.log --strict-mode --pkgmgr=yum --runtime=native)
27 grep 'mic failes to install some packages' ./log/handset.log
28 sudo $losetup_path -a
29 sudo $losetup_path -a | wc -l | xargs test 0 -eq
30     ]]>
31  </steps>
32  <teardown>
33         <![CDATA[
34 echo "cleaning..."
35 sudo test -e ./mic-output && sudo rm -rf ./mic-output
36 test -e ./log/handset.log && sudo rm ./log/handset.log
37 test -e /home/build/strict_mode && sudo rm -rf /home/build/strict_mode
38         ]]>
39     </teardown>
40 </testcase>