Add test case of partition expand
authoryuhuan.yang <yuhuan.yang@samsung.com>
Mon, 15 Jan 2018 02:31:22 +0000 (10:31 +0800)
committeryuhuan.yang <yuhuan.yang@samsung.com>
Fri, 26 Jan 2018 06:23:15 +0000 (14:23 +0800)
cases/create/func_cases/mic_cr_auto_loop_partition_expand.case [new file with mode: 0644]
fixtures/ks_files/handset_blackbay_partition_expand.ks [new file with mode: 0755]

diff --git a/cases/create/func_cases/mic_cr_auto_loop_partition_expand.case b/cases/create/func_cases/mic_cr_auto_loop_partition_expand.case
new file mode 100644 (file)
index 0000000..99a52a7
--- /dev/null
@@ -0,0 +1,21 @@
+<testcase>
+  <summary>test 'mic cr auto ks' for loop type,and if --init_expand set to part in ks file,part will expanded
+  </summary>
+  <fixtures>
+    <copy src="ks_files/handset_blackbay_partition_expand.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 cr auto handset_blackbay_partition_expand.ks --logfile=log.file
+grep "Initial partition size expanded" log.file
+grep "Finished" log.file
+sudo $losetup_path -a
+sudo $losetup_path -a | wc -l | xargs test 0 -eq
+]]></steps>
+  <teardown><![CDATA[
+echo "cleaning..."
+test -d ./mic-output && sudo rm -rf mic-output
+]]></teardown>
+</testcase>
diff --git a/fixtures/ks_files/handset_blackbay_partition_expand.ks b/fixtures/ks_files/handset_blackbay_partition_expand.ks
new file mode 100755 (executable)
index 0000000..e6a380b
--- /dev/null
@@ -0,0 +1,43 @@
+# -*-mic2-options-*- -f loop --pack-to=@NAME@-rs.zip -*-mic2-options-*-
+
+lang en_US.UTF-8
+keyboard us
+timezone --utc America/Los_Angeles
+
+part / --size 848 --ondisk sda --fstype=ext3 --label platform --init-expand
+
+rootpw tizen 
+bootloader  --timeout=0  --append="rootdelay=5 security=none"
+
+desktop --autologinuser=tizen  
+user --name tizen  --groups audio,video --password 'tizen'
+
+repo --name=Tizen-base --baseurl=http://10.113.136.109/repo/download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-base/ia32/packages/  --save --gpgkey=0 --ssl_verify=no
+repo --name=Tizen-main --baseurl=http://10.113.136.109/repo/download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/ia32/packages/  --save --gpgkey=0 --ssl_verify=no
+repo --name=Tizen-base-source --baseurl=http://10.113.136.109/repo/download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-base/source/ --save --source --gpgkey=0 --ssl_verify=no
+repo --name=Tizen-main-source --baseurl=http://10.113.136.109/repo/download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/source/ --save --source --gpgkey=0 --ssl_verify=no
+
+%packages
+coreutils
+bash
+kernel*
+rpm
+%end
+
+%attachment
+preos-runtime
+bootstub-bb
+/boot/cmdline
+/boot/vmlinuz-*
+%end
+
+%post
+# Set environment for launchpad daemon. Fix TDIST-264
+cat > /etc/sysconfig/launchpad <<EOF
+DISPLAY=:0
+EOF
+%end
+
+%post --nochroot
+
+%end