2 <summary>Test option "--strict-mode", it this given, mic will abort creating image, if some rpm pagages fail to install</summary>
4 <copy src="ks_files/strict_mode.ks" />
5 <copydir src="rpm/strict_mode_rpm" />
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)
15 sudo $losetup_path -a | wc -l | xargs test 0 -eq
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
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
29 sudo $losetup_path -a | wc -l | xargs test 0 -eq
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