Don't check the files by using mic chroot method
[tools/itest-cases-mic.git] / cases / create / opt_cases / mic_cr_loop_cache-root-dir_native_ia32.case
1 <testcase>
2   <summary>
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
10   </summary>
11   <fixtures>
12     <copy src="ks_files/handset_blackbay.ks" />
13   </fixtures>
14   <steps><![CDATA[
15 losetup_path=$(sudo which losetup)
16 sudo $losetup_path -a
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 \
19   --runtime=native \
20   --logfile=file.log
21 grep 'Finished' file.log
22 grep "43 Total, 0 Cached, 43 Missed" file.log
23 sudo $losetup_path -a
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
27 sudo rm -rf file.log
28 sudo rm -rf mic-output
29 sudo mic cr -d -v  loop handset_blackbay.ks \
30   -k /root/cache/mic_cache \
31   --runtime=native \
32   --pkgmgr=zypp \
33   --logfile=file.log
34 grep 'Finished' file.log
35 test -f ./mic-output/platform.img
36 sudo $losetup_path -a
37 sudo $losetup_path -a | wc -l | xargs test 0 -eq
38 grep "43 Total, 43 Cached, 0 Missed" file.log
39 ]]></steps>
40   <teardown><![CDATA[
41 echo "cleaning..."
42 sudo rm file.log
43 sudo rm -rf mic-output  /root/cache/mic_cache
44 ]]></teardown>
45 </testcase>