Don't check the files by using mic chroot method
[tools/itest-cases-mic.git] / cases / create / mixed_cases / mic_cr_auto_arm64.case
1 <testcase>
2     <summary>test 'mic cr auto ks' for arm64 arch
3       if we run command with 'auto', mic will use the first line in ks file, which is called magic line
4     </summary>
5     <fixtures>
6         <copy src="ks_files/arm64.ks" />
7     </fixtures>
8     <steps>
9         <![CDATA[
10 distro=$(python -c "import platform;print platform.linux_distribution()[0].lower().rstrip()")
11 version=$(python -c "import platform;print platform.linux_distribution()[1].lower().rstrip()")
12 if ([ $distro == 'opensuse' ] && [ $version == '13.1' ]) || [ $distro != 'opensuse' ]; then
13     losetup_path=$(sudo which losetup)
14     sudo $losetup_path -a
15     sudo $losetup_path -a | wc -l | xargs test 0 -eq
16     sudo mic cr -d -v  auto arm64.ks --logfile=log.file --runtime=native
17     grep "Finished" log.file
18     sudo $losetup_path -a
19     sudo $losetup_path -a | wc -l | xargs test 0 -eq
20     ls mic-output | grep 'arm64.*.tar.gz'
21 fi
22     ]]>
23     </steps>
24     <teardown>
25         <![CDATA[
26 echo "cleaning..."
27 test -f log.file && sudo rm log.file
28 test -d ./mic-output && sudo rm -rf ./mic-output
29 echo "finish cleaning..."
30         ]]>
31     </teardown>
32 </testcase>