2 <summary>test 'mic cr auto ks' for liveusb type
3 if we run command with 'auto', mic will use the first line in ks file, which called magic line, and
4 magic line in this ks file is:
5 -*-mic2-options-*- -f liveusb --copy-kernel --pack-to=@NAME@-rs.zip -*-mic2-options-*-</summary>
7 <copy src="ks_files/gnome-live.ks" />
8 <content target="parse_manifest.py">
11 img_file = sys.argv[1]
12 mic_version = sys.argv[2]
13 manifest_file=open('mic-output/manifest.json')
14 manifest=json.load(manifest_file)
15 assert manifest['format'] == 'liveusb'
16 assert manifest['version'] == mic_version
17 assert manifest['liveusb']['pack'] == '.zip'
18 assert img_file in manifest['liveusb']['image_files']
23 <platform>ubuntu14.10</platform>
27 losetup_path=$(sudo which losetup)
29 sudo $losetup_path -a | wc -l | xargs test 0 -eq
30 sudo mic cr -d -v auto gnome-live.ks --logfile=log.file --runtime=native
31 grep "Finished" log.file
33 sudo $losetup_path -a | wc -l | xargs test 0 -eq
34 liveusb_img=$(ls mic-output/ | grep 'gnome-live-.*-rs.zip')
35 ls mic-output/ | grep 'gnome-live-.*-vmlinuz-.*'
36 mic_version=$(mic --version | awk '{print $2}')
37 python parse_manifest.py $liveusb_img $mic_version
41 test -d ./mic-output && sudo rm -rf mic-output