Add case to test the option of exclude-from-image
authorjz.fang <jz.fang@samsung.com>
Thu, 18 Aug 2016 03:01:01 +0000 (11:01 +0800)
committerjz.fang <jz.fang@samsung.com>
Thu, 18 Aug 2016 03:01:01 +0000 (11:01 +0800)
Change-Id: I181aae7fa68b854f4f980d0a941935a9d371bddd

cases/create/mixed_cases/mic_cr_loop_exclude-from-image.case [new file with mode: 0644]
fixtures/ks_files/mobile_exclude.ks [new file with mode: 0644]

diff --git a/cases/create/mixed_cases/mic_cr_loop_exclude-from-image.case b/cases/create/mixed_cases/mic_cr_loop_exclude-from-image.case
new file mode 100644 (file)
index 0000000..ba27f08
--- /dev/null
@@ -0,0 +1,24 @@
+<testcase>
+  <summary>This test case is used to test the option '--exclude-from-image' in the ks file. When add the option, the img files will exclude.</summary>
+  <fixtures>
+    <copy src="ks_files/mobile_exclude.ks" />
+  </fixtures>
+  <steps><![CDATA[
+losetup_path=$(sudo which losetup)
+sudo $losetup_path -a
+sudo $losetup_path -a | wc -l | xargs test 0 -eq
+sudo mic -d -v --non-interactive cr loop  mobile_exclude.ks --logfile=log.file
+grep "Finished" log.file
+sudo test -e ./mic-output/u-boot-mmc.bin
+(! sudo test -e ./mic-output/boot.img)
+(! sudo test -e ./mic-output/modules.img)
+sudo $losetup_path -a
+sudo $losetup_path -a | wc -l | xargs test 0 -eq
+]]></steps>
+  <teardown><![CDATA[
+echo "cleaning..."
+test -f log.file && sudo rm log.file
+test -d mic-output && sudo rm -rf ./mic-output
+echo 'finished cleaning'
+]]></teardown>
+</testcase>
diff --git a/fixtures/ks_files/mobile_exclude.ks b/fixtures/ks_files/mobile_exclude.ks
new file mode 100644 (file)
index 0000000..fdd1cc3
--- /dev/null
@@ -0,0 +1,43 @@
+# -*-mic2-options-*- -f loop --pack-to=@NAME@.tar.gz -*-mic2-options-*-
+
+# 
+# Do not Edit! Generated by:
+# kickstarter.py
+# 
+
+lang en_US.UTF-8
+keyboard us
+timezone --utc Asia/Seoul
+part /boot --fstype="vfat" --size=32 --ondisk=mmcblk0 --active --label boot --fsoptions=defaults,noatime --exclude-from-image
+part /lib/modules --fstype="ext4" --size=20 --ondisk=mmcblk0 --active --label modules --fsoptions=defaults,noatime --exclude-from-image
+
+rootpw tizen 
+xconfig --startxonboot
+bootloader  --timeout=3  --append="rw vga=current splash rootwait rootfstype=ext4 plymouth.enable=0"   --ptable=gpt --menus="install:Wipe and Install:systemd.unit=system-installer.service:test"
+
+desktop --autologinuser=guest  
+user --name guest  --groups audio,video --password 'tizen'
+
+
+repo --name=mobile-wayland_armv7l --baseurl=http://109.123.123.185/repo/download.tizen.org/snapshots/tizen/mobile/tizen-mobile_20160810.1/repos/arm-wayland/packages/ --ssl_verify=no
+
+%packages
+
+@Mobile Boot Odroid U3
+
+
+%end
+
+
+%attachment
+/var/tmp/u-boot/u-boot-mmc.bin
+%end
+
+%post
+
+%end
+
+%post --nochroot
+
+%end
+