2 <summary>create raw image with ia32 arch and compress-image option with lzo</summary>
4 <copy src="ks_files/ivi.ks" />
5 <copy src="scripts/compute_volume.sh" />
8 losetup_path=$(sudo which losetup)
10 sudo $losetup_path -a | wc -l | xargs test 0 -eq
14 sudo mic cr raw ivi.ks -o out1 -d -v --logfile=mic1.log --runtime=native
15 grep 'Finished' mic1.log
16 test -f ./out1/ivi*.raw
18 sudo $losetup_path -a | wc -l | xargs test 0 -eq
19 sudo mic cr raw ivi.ks --compress-image=lzo -o out2 -d -v --logfile=mic2.log --runtime=native
20 grep 'Finished' mic2.log
21 test -e ./out2/ivi*.raw.lzo
23 sudo $losetup_path -a | wc -l | xargs test 0 -eq
24 source compute_volume.sh
27 p1=`compute_volume $name1`
29 name2=`ls ivi*.raw.lzo`
30 p2=`compute_volume $name2`
31 result=`awk -v before_volume=$p1 -v compress_volume=$p2 'BEGIN {print(before_volume>compress_volume)?"yes":"no"}'`
34 raw_name=`ls ivi*.raw`
39 sudo rm -rf ./out1/ ./out2/
40 sudo rm mic1.log mic2.log