3 This test case is used to test the option "-k", which should be set to a
4 directory, and when run the same command more then one times, it should
5 use the cached download packages instead of downloading again unless you
6 specified '--nocache' for repos in kickstart files. In this case we tested
7 the case when cache directory is specified to root direcroty(because mic
8 forgot to mount cache directory in bootstrap mode before), 'zypp' as
9 backend, and native mode
12 <copy src="ks_files/handset_blackbay.ks" />
15 losetup_path=$(sudo which losetup)
17 sudo $losetup_path -a | wc -l | xargs test 0 -eq
18 sudo mic cr -d -v loop handset_blackbay.ks -k /root/cache/mic_cache \
21 grep 'Finished' file.log
22 grep "43 Total, 0 Cached, 43 Missed" file.log
24 sudo $losetup_path -a | wc -l | xargs test 0 -eq
25 sudo test -d /root/cache/mic_cache
26 test -f ./mic-output/platform.img
28 sudo rm -rf mic-output
29 sudo mic cr -d -v loop handset_blackbay.ks \
30 -k /root/cache/mic_cache \
34 grep 'Finished' file.log
35 test -f ./mic-output/platform.img
37 sudo $losetup_path -a | wc -l | xargs test 0 -eq
38 grep "43 Total, 43 Cached, 0 Missed" file.log
43 sudo rm -rf mic-output /root/cache/mic_cache