2 <summary>Test whether it is ok to chroot into the image</summary>
4 <copy src="ks_files/handset_blackbay.ks" />
7 losetup_path=$(sudo which losetup)
9 sudo $losetup_path -a | wc -l | xargs test 0 -eq
10 sudo mic cr -d -v loop handset_blackbay.ks --logfile=./log/handset.log --runtime=native
11 test -f ./log/handset.log
12 grep 'Finished' ./log/handset.log
13 test -f ./mic-output/platform.img
15 sudo $losetup_path -a | wc -l | xargs test 0 -eq
16 bash -c "sudo mic chroot ./mic-output/platform.img" << EOF
17 echo "Checking chroot"
20 echo "It's ok to chroot,jump out"
25 test -e ./mic-output && sudo rm -rf ./mic-output
26 test -e ./log/handset.log && sudo rm ./log/handset.log