Drop raw image format test cases
authorjianzhong.fang <jz.fang@samsung.com>
Wed, 23 Sep 2015 06:53:42 +0000 (14:53 +0800)
committerjianzhong.fang <jz.fang@samsung.com>
Wed, 23 Sep 2015 06:53:42 +0000 (14:53 +0800)
Change-Id: I31368d6e3dfd4ecac30908fd063fd5cedcc692b8

24 files changed:
cases/create/func_cases/mic_cr_auto_raw.case [deleted file]
cases/create/func_cases/mic_cr_auto_raw_gpt.case [deleted file]
cases/create/func_cases/mic_cr_raw_generate-bmap_cp-knl_compress_runtime_local-pkgs_conf_armv7l.case [deleted file]
cases/create/func_cases/mic_cr_raw_gpt-part-type.case [deleted file]
cases/create/func_cases/mic_cr_raw_release_logfile_local-pkg-pth_record-pkg_gen-bmap_ia32.case [deleted file]
cases/create/mixed_cases/mic_cr_createrepo_issue.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_active_partition.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_broken_bootstrap.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_installerfw_extlinux.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_invliad_mic-bootstrap.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_ivi_partition_size_compute_ia32.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_locale.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_multi_partition_gpt.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_multi_partition_mbr.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_no_mountpoint.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_no_partition.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_unicode.case [deleted file]
cases/create/mixed_cases/mic_cr_raw_without_conf_bootstrap_ia32.case [deleted file]
cases/create/opt_cases/mic_cr_raw_compress-image-bz2_ia32.case [deleted file]
cases/create/opt_cases/mic_cr_raw_compress-image-gz_ia32.case [deleted file]
cases/create/opt_cases/mic_cr_raw_compress-image-invalid_ia32.case [deleted file]
cases/create/opt_cases/mic_cr_raw_fstab-entry-name.case [deleted file]
cases/create/opt_cases/mic_cr_raw_fstab-entry-uuid.case [deleted file]
cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32.case [deleted file]

diff --git a/cases/create/func_cases/mic_cr_auto_raw.case b/cases/create/func_cases/mic_cr_auto_raw.case
deleted file mode 100644 (file)
index f372370..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<testcase>
-  <summary>test 'mic cr auto ks' for raw  type
-if we run command with 'auto', mic will use the first line in ks file,
-which called magic line, and magic line in this ks file is:
- -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*-
-  </summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-    <content target="parse_manifest.py">
-import sys
-import json
-img_file = sys.argv[1]
-mic_version = sys.argv[2]
-bmap_file = sys.argv[3]
-manifest_file=open('mic-output/manifest.json')
-manifest=json.load(manifest_file)
-assert manifest['format'] == 'raw'
-assert manifest['version'] == mic_version
-assert manifest['raw']['compress'] == 'bz2'
-assert img_file in manifest['raw']['image_files']
-assert 'sdb' in manifest['raw']['disks']
-assert manifest['raw']['sdb']['bmap'] == bmap_file
-assert manifest['raw']['sdb']['image'] == img_file
-    </content>
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr auto ivi.ks --logfile=log.file -d -v 
-grep "Finished" log.file
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-ls mic-output/ | grep 'ivi-.*-sdb.bmap'
-ls mic-output/ | grep 'ivi-.*-sdb.raw.bz2'
-ls mic-output/ | grep 'ivi-.*-vmlinuz-*'
-bz2img=$(ls mic-output/ | grep 'ivi-.*-sdb.raw.bz2')
-bmap=$(ls mic-output/ | grep 'ivi-.*-sdb.bmap')
-sudo bunzip2 -d mic-output/$bz2img
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-sudo mkdir -p mic-output/ivi_dir/boot
-kpartx_path=$(sudo which kpartx)
-loop_device=$(sudo $losetup_path -f)
-sudo $losetup_path $loop_device $raw_image
-for i in {1..5}
-do
-    kpartx_output=$(sudo $kpartx_path -av $loop_device)
-    if [ -n "$kpartx_output" ]; then
-        first_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '1p')
-        second_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '2p')
-        if [ -n "$first_part" ] && [ -n "$second_part" ];then
-            for j in {1..5}
-            do
-                ls /dev/mapper/
-                if [ -e "/dev/mapper/$first_part" ] && [ -e "/dev/mapper/$second_part" ];then
-                    sudo mount /dev/mapper/$first_part  mic-output/ivi_dir/boot/ -t ext4
-                    sudo mount /dev/mapper/$second_part  mic-output/ivi_dir/ -t ext4
-                    (! sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep /dev/sdb)
-                    sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep -i 'uuid'
-                    mic_version=$(mic --version | awk '{print $2}')
-                    python parse_manifest.py $bz2img $mic_version $bmap
-                    exit 0
-                else
-                    sleep 2
-                fi
-            done
-        fi
-    fi
-    sleep 3
-done
-echo "can not get kpartx output: $kpartx_path -av $raw_image"
-exit 1
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo test -f log.file && sudo rm -f log.file
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-loop_devices=$(sudo $losetup_path -a | awk -F ":" '{print $1}')
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-for i in {1..5}
-do
-    for loop_device in $loop_devices
-    do
-        test -d mic-output/ivi_dir && sudo umount -l mic-output/ivi_dir
-        test -d mic-output/ivi_dir/boot && sudo umount -l mic-output/ivi_dir/boot
-        kpartx_path=$(sudo which kpartx)
-        sudo $kpartx_path -d $loop_device
-        sudo $losetup_path -d $loop_device
-    done
-    if sudo $losetup_path -a | grep 'ivi'; then
-        sleep 2
-    else
-        test -d mic-output && sudo rm -rf ./mic-output
-        break
-    fi
-done
-]]></teardown>
-</testcase>
diff --git a/cases/create/func_cases/mic_cr_auto_raw_gpt.case b/cases/create/func_cases/mic_cr_auto_raw_gpt.case
deleted file mode 100644 (file)
index 836753d..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-<testcase>
-    <summary>create raw image with  gpt table and --part-type for partition</summary>
-    <fixtures>
-        <copy src="ks_files/ivi_with_installerfw.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 cr auto ivi_with_installerfw.ks --logfile=log.file -d -v
-grep "Finished" log.file
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-ls mic-output/ | grep 'ivi_with_installerfw-.*-sdb.bmap'
-ls mic-output/ | grep 'ivi_with_installerfw-.*-sdb.raw.bz2'
-ls mic-output/ | grep 'ivi_with_installerfw-.*-vmlinuz-*'
-bz2img=$(ls mic-output/ | grep 'ivi_with_installerfw-.*-sdb.raw.bz2')
-sudo bunzip2 -d mic-output/$bz2img
-raw_image=$(ls mic-output/ivi_with_installerfw-*-sdb.raw)
-sudo mkdir -p mic-output/ivi_dir/boot
-kpartx_path=$(sudo which kpartx)
-loop_device=$(sudo $losetup_path -f)
-sudo $losetup_path $loop_device $raw_image
-for i in {1..5}
-do
-    kpartx_output=$(sudo $kpartx_path -av $loop_device)
-    if [ -n "$kpartx_output" ]; then
-        first_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '1p')
-        second_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '2p')
-        if [ -n "$first_part" ] && [ -n "$second_part" ];then
-            for j in {1..5}
-            do
-                ls /dev/mapper/
-                if [ -e "/dev/mapper/$first_part" ] && [ -e "/dev/mapper/$second_part" ];then
-                    sudo mount /dev/mapper/$first_part  mic-output/ivi_dir/boot/ -t ext3
-                    sudo mount /dev/mapper/$second_part  mic-output/ivi_dir/ -t ext4
-                    sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep /dev/sdb
-                    (! sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep -i 'uuid')
-                    exit 0
-                else
-                    sleep 2
-                fi
-            done
-        fi
-    fi
-    sleep 3
-done
-echo "can not get kpartx output: $kpartx_path -av $raw_image"
-exit 1
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -f log.file && sudo rm log.file
-raw_image=$(ls mic-output/ivi_with_installerfw-*-sdb.raw)
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-loop_devices=$(sudo $losetup_path -a | awk -F ":" '{print $1}')
-for i in {1..5}
-do
-    for loop_device in $loop_devices
-    do
-       test -d mic-output/ivi_dir && sudo umount -l mic-output/ivi_dir
-       test -d mic-output/ivi_dir/boot && sudo umount -l mic-output/ivi_dir/boot
-       kpartx_path=$(sudo which kpartx)
-       sudo $kpartx_path -d $loop_device
-       sudo $losetup_path -d $loop_device
-    done
-    if sudo $losetup_path -a | grep 'ivi_with_installerfw'; then
-       sleep 3
-    else
-       test -d mic-output && sudo rm -rf ./mic-output
-       break
-    fi
-done
-]]></teardown>
-</testcase>
diff --git a/cases/create/func_cases/mic_cr_raw_generate-bmap_cp-knl_compress_runtime_local-pkgs_conf_armv7l.case b/cases/create/func_cases/mic_cr_raw_generate-bmap_cp-knl_compress_runtime_local-pkgs_conf_armv7l.case
deleted file mode 100644 (file)
index 4627a4f..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<testcase>
-  <summary>create raw image with "--generate-bmap --compress-disk-image=bz2 --copy-kernel --runtime=zypp --local-pkgs-path=rpm -c conf/mic.conf"</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-    <copy src="conf/mic.conf" />
-    <copydir src="rpm" />
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr -d -v  raw ivi.ks \
-  --generate-bmap \
-  --compress-disk-image=bz2 \
-  --copy-kernel \
-  --runtime=bootstrap \
-  --local-pkgs-path=rpm \
-  -c mic.conf \
-  --logfile=log.file
-
-grep "Finished" log.file
-
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-grep 'Marking .*.rpm to be installed' log.file
-
-ls -l ./my_mic-output | grep 'ivi.*-vmlinuz-*'
-
-test -f ./my_mic-output/ivi*.raw.bz2
-
-ls -al ./my_mic-output | grep 'ivi-.*-sdb.bmap'
-
-cd my_mic-output
-
-sudo bunzip2 ivi-*-sdb.raw.bz2
-
-test -f ivi*.raw
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-
-sudo rm log.file
-
-sudo rm -rf ./my_mic-output
-
-echo "finish clean space...."
-]]></teardown>
-</testcase>
diff --git a/cases/create/func_cases/mic_cr_raw_gpt-part-type.case b/cases/create/func_cases/mic_cr_raw_gpt-part-type.case
deleted file mode 100644 (file)
index bf4f5a3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<testcase>
-  <summary>create raw image with  gpt table and --part-type for partition</summary>
-  <fixtures>
-    <copy src="ks_files/ivi_gpt_with_part-type.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 cr raw ivi_gpt_with_part-type.ks -d -v --logfile=mic1.log
-
-grep 'Finished' mic1.log
-
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-
-test -f ./mic-output/ivi_gpt_with_part-type-*.raw
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-
-test -d ./mic-output && sudo rm -rf ./mic-output/
-
-test -f mic1.log && sudo rm mic1.log
-
-echo 'finish cleaning'
-]]></teardown>
-</testcase>
diff --git a/cases/create/func_cases/mic_cr_raw_release_logfile_local-pkg-pth_record-pkg_gen-bmap_ia32.case b/cases/create/func_cases/mic_cr_raw_release_logfile_local-pkg-pth_record-pkg_gen-bmap_ia32.case
deleted file mode 100644 (file)
index 58dcef3..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<testcase>
-  <summary>This test case is used to test the option "--logfile",
-  if a file name is given to it, images should be created successfully.
-  There is no need to give an existed file name, mic will create a new
-  file with the given name if the file does not exist at present.
-  </summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-    <copydir src="rpm" />
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr -d -v  raw ivi.ks \
-  --local-pkgs-path=./rpm \
-  --record-pkgs=name,content,license \
-  --release=tizen_20121223.1 \
-  --generate-bmap \
-  --logfile=log.file
-
-grep "Finished" log.file && echo 'mic command execution finished'
-
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-grep 'Marking .*.rpm to be installed' log.file
-
-sudo test -e ./log.file
-sudo test -d ./mic-output/tizen_20121223.1/images
-sudo test -f ./mic-output/tizen_20121223.1/images/ivi/tizen_20121223.1_ivi.packages
-sudo test -f ./mic-output/tizen_20121223.1/images/ivi/tizen_20121223.1_ivi.license
-sudo test -f ./mic-output/tizen_20121223.1/images/ivi/tizen_20121223.1_ivi.files
-sudo test -f ./mic-output/tizen_20121223.1/images/ivi/tizen_20121223.1_ivi-sdb.raw
-sudo test -f ./mic-output/tizen_20121223.1/images/ivi/tizen_20121223.1_ivi-sdb.bmap
-sudo test -f ./mic-output/tizen_20121223.1/images/ivi/MD5SUMS
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-
-sudo rm log.file
-
-sudo rm -rf ./mic-output
-
-echo "finish clean space...."
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_createrepo_issue.case b/cases/create/mixed_cases/mic_cr_createrepo_issue.case
deleted file mode 100644 (file)
index 6054c0d..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-<testcase>
-  <summary>Test whether repo created by 'createrepo' locally can be used by mic</summary>
-  <tracking>
-    <ticket>2261</ticket>
-  </tracking>
-  <fixtures>
-    <copy src="ks_files/createrepo_issue.ks" />
-    <copy src="rpm/sed-4.2.1-1.3.i686.rpm" />
-  </fixtures>
-  <steps><![CDATA[
-createrepo --version || True
-distro=$(python -c 'import platform;print platform.linux_distribution()[0].lower().rstrip()')
-echo $distro
-if [ "$distro" = "opensuse" ]; then
- sudo zypper install -y --oldpackage createrepo-0.9.8
-fi
-
-
-if [ "$distro" = "fedora" ] || [ "$distro" = "centos" ]; then
- sudo yum clean all
- sudo yum install -y createrepo-0.9.8 --setopt=protected_multilib=false --nogpgcheck
- sudo yum clean all
- sudo rpm --rebuilddb
- sudo yum install -y wget --nogpgcheck
-fi
-
-if [ "$distro" = "ubuntu" ] || [ "$distro" = "debian" ]; then
-  sudo apt-get install -y --force-yes createrepo=0.9.8
-fi
-
-createrepo --version || True
-mkdir -p /var/tmp/temp_repo
-mkdir -p /var/tmp/temp_repo/repodata
-mv sed-4.2.1-1.3.i686.rpm /var/tmp/temp_repo/
-wget http://download.tizen.org/snapshots/tizen/common/latest/repos/ia32-wayland/packages/repodata/group.xml
-mv group.xml /var/tmp/temp_repo/repodata
-wget http://download.tizen.org/snapshots/tizen/common/latest/repos/ia32-wayland/packages/repodata/patterns.xml
-mv patterns.xml /var/tmp/temp_repo
-createrepo -g /var/tmp/temp_repo/repodata/group.xml --database --unique-md-filenames /var/tmp/temp_repo
-(! sudo mic cr -d -v  auto createrepo_issue.ks --logfile=mic1.log)
-grep -i "Failed to download" mic1.log
-
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -d ./mic-output && sudo rm -rf ./mic-output
-test -d /var/tmp/temp_repo && sudo rm -rf /var/tmp/temp_repo
-test -e mic1.log && sudo rm mic1.log
-echo "finish cleaning..."
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_active_partition.case b/cases/create/mixed_cases/mic_cr_raw_active_partition.case
deleted file mode 100644 (file)
index 1304792..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<testcase>
-  <summary>This case is used to test if mic can work well with '--active' configed to partition in ks config file, the command is as bellow:
-            mic cr raw ./ks_files/ivi_with_active_partition.ks</summary>
-  <tracking>
-    <ticket>639</ticket>
-  </tracking>
-  <fixtures>
-    <copy src="ks_files/ivi_with_active_partition.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 cr -d -v  raw ivi_with_active_partition.ks --logfile=log.file
-test -e ./log.file
-grep "Finished" log.file
-raw_name=$(ls mic-output/ivi_with_active_partition-*-sdb.raw)
-test -f $raw_name
-kpartx_path=$(sudo which kpartx)
-sudo $kpartx_path -av $raw_name
-sleep 2
-blkid_path=$(sudo which blkid)
-blkid_output=$(sudo $blkid_path -L boot | sed 's/.*loop\([0-9]*\)p\([0-9]\)/\2/')
-parted_path=$(sudo which parted)
-parted_boot_output=$(sudo $parted_path  $raw_name print| grep 'boot' | awk '{print $1}')
-test  $blkid_output -eq $parted_boot_output
-sudo $kpartx_path -d $raw_name
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-test -f log.file && sudo rm log.file
-test -d mic-output && sudo rm -rf ./mic-output
-echo 'clean space finished...'
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_broken_bootstrap.case b/cases/create/mixed_cases/mic_cr_raw_broken_bootstrap.case
deleted file mode 100644 (file)
index 8b5e971..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<testcase>
-  <summary>Testing broken mic-bootstrap</summary>
-  <fixtures>
-    <copy src="ks_files/ivi_broken_content_bootstrap.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 cr -d -v  raw ivi_broken_content_bootstrap.ks --logfile=mic.log)
-grep -i 'Failed to download/install bootstrap package or the package is in bad format' mic.log
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -e mic.log && sudo rm mic.log
-test -e mic-output && sudo rm -rf mic-output
-echo 'finish cleaning'
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_installerfw_extlinux.case b/cases/create/mixed_cases/mic_cr_raw_installerfw_extlinux.case
deleted file mode 100644 (file)
index ca2a4fc..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<testcase>
-  <summary>This case is used to test if 'installerfw' command in ks</summary>
-  <fixtures>
-    <copy src="ks_files/ivi_with_installerfw.ks" />
-    <copy src="ks_files/ivi_syslinux_problem.ks" />
-  </fixtures>
-  <steps><![CDATA[
-platform=$(uname -m)
-distro=$(python -c "import platform;print platform.linux_distribution()[0].lower().rstrip()")
-if [ "$platform" == "x86_64" ] || [ "$distro" == "centos" ]
-then
-    losetup_path=$(sudo which losetup)
-    sudo $losetup_path -a
-    sudo $losetup_path -a | wc -l | xargs test 0 -eq
-    sudo mic cr raw ivi_with_installerfw.ks -d -v --logfile=mic1.log
-    grep 'Finished' mic1.log
-    test -f ./mic-output/ivi_with_installerfw-*.raw
-    sudo $losetup_path -a
-    sudo $losetup_path -a | wc -l | xargs test 0 -eq
-else
-    losetup_path=$(sudo which losetup)
-    sudo $losetup_path -a
-    sudo $losetup_path -a | wc -l | xargs test 0 -eq
-    ! (sudo mic cr raw ivi_syslinux_problem.ks -d -v --logfile=log.file)
-    sudo test -e ./log.file
-    grep "Unable to install syslinux bootloader" log.file
-    sed -i '/password/ a installerfw_plugins "bootloader"' ivi_syslinux_problem.ks
-    sudo $losetup_path -a
-    sudo $losetup_path -a | wc -l | xargs test 0 -eq
-    sudo mic cr raw ivi_syslinux_problem.ks  -d -v --logfile=new_log.file
-    sudo test -e ./new_log.file
-    grep "Finished" new_log.file
-    test -f ./mic-output/ivi_syslinux_problem-*.raw
-    sudo $losetup_path -a
-    sudo $losetup_path -a | wc -l | xargs test 0 -eq
-
-fi
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-test -f log.file && sudo rm log.file
-test -f new_log.file && sudo rm new_log.file
-test -d mic-output && sudo rm -rf ./mic-output
-echo 'clean space finished...'
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_invliad_mic-bootstrap.case b/cases/create/mixed_cases/mic_cr_raw_invliad_mic-bootstrap.case
deleted file mode 100644 (file)
index 858fd62..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<testcase>
-  <summary>Testing invalid mic-bootstrap</summary>
-  <fixtures>
-    <copy src="ks_files/ivi_invalid_content_mic-bootstrap.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 cr -d -v  raw ivi_invalid_content_mic-bootstrap.ks --logfile=mic.log)
-grep -i 'Failed to download/install bootstrap package or the package is in bad format' mic.log
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -e mic.log && sudo rm mic.log
-test -e mic-output && sudo rm -rf mic-output
-echo 'finish cleaning'
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_ivi_partition_size_compute_ia32.case b/cases/create/mixed_cases/mic_cr_raw_ivi_partition_size_compute_ia32.case
deleted file mode 100644 (file)
index 1b500c8..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<testcase>
-  <summary></summary>
-  <tracking>
-    <ticket>624</ticket>
-  </tracking>
-  <fixtures>
-    <copy src="ks_files/ivi_624.ks" />
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-distro=`python -c "import platform;a=platform.linux_distribution();print a[0]"`
-sudo mic cr raw ivi_624.ks --logfile=./log/handset.log -d -v
-test -f ./log/handset.log
-grep 'Finished' ./log/handset.log
-test -e ./mic-output/ivi_624*.raw
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-if [ "$distro" == "CentOS" ]
-then
-    parted ./mic-output/ivi*.raw print | grep -o "Disk.*" >> tmp1.log
-    VAL1=$(awk '{print $NF}' tmp1.log | grep -o [0-9]*)
-    parted ./mic-output/ivi*.raw print >> tmp2.log
-    sed -i '/^$/d' tmp2.log
-    tail -1 tmp2.log >> tmp3.log
-    VAL2=$(awk '{print $3}' tmp3.log | grep -o [0-9]*)
-    test "$VAL1" -eq "$VAL2"
-else
-    fdisk_path=$(sudo which fdisk)
-    VAL1=`sudo $fdisk_path -l ./mic-output/ivi*.raw  | sed '/^$/d' |  sed -n '$p' | awk '{print $3}'`
-    sudo $fdisk_path -l ./mic-output/ivi*.raw | sed -n '/.*sectors$/p' >> tmp2.file
-    VAL2=`awk '{print $(NF-1)}' tmp2.file`
-    let VAL3=$VAL2-1
-    test "$VAL1" -eq "$VAL3"
-fi
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -e ./mic-output && sudo rm -rf ./mic-output
-test -e ./log/handset.log && sudo rm ./log/handset.log
-test -e tmp1.file && sudo rm tmp1.file
-test -e tmp2.file && sudo rm tmp2.file
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_locale.case b/cases/create/mixed_cases/mic_cr_raw_locale.case
deleted file mode 100644 (file)
index 6d07b15..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<testcase>
-  <summary>
-    test if '/etc/locale.conf' exists
-  </summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-  </fixtures>
-  <tracking>
-    <ticket>1745</ticket>
-  </tracking>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr raw ivi.ks --logfile=log.file -d -v
-grep "Finished" log.file
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-sudo mkdir -p mic-output/ivi_dir/boot
-kpartx_path=$(sudo which kpartx)
-for i in {1..5}
-do
-    kpartx_output=$(sudo $kpartx_path -av $raw_image)
-    if [ -n "$kpartx_output" ]; then
-        first_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '1p')
-        second_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '2p')
-        ls /dev/mapper/
-        if [ -n "$first_part" ] && [ -e "/dev/mapper/$first_part" ];then
-            sudo mount /dev/mapper/$first_part  mic-output/ivi_dir/boot/ -t ext4
-            sudo mount /dev/mapper/$second_part  mic-output/ivi_dir/ -t ext4
-            sudo chroot mic-output/ivi_dir/ test -f /etc/locale.conf
-            sudo chroot mic-output/ivi_dir/ cat  /etc/locale.conf | grep 'en_US.UTF-8'
-            exit 0
-        fi
-    fi
-    sleep 3
-done
-echo "can not get kpartx output: $kpartx_path -av $raw_image"
-exit 1
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo test -f log.file && sudo rm log.file
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-if [ -f $raw_image ]; then
-    for i in {1..5}; do
-      test -d mic-output/ivi_dir && sudo umount -l mic-output/ivi_dir
-      test -d mic-output/ivi_dir/boot && sudo umount -l mic-output/ivi_dir/boot
-      kpartx_path=$(sudo which kpartx)
-      sudo $kpartx_path -d $raw_image
-      if sudo losetup -a | grep "ivi"; then
-          sleep 2
-      else
-          test -d mic-output && sudo rm -rf ./mic-output
-          break
-      fi
-    done
-fi
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_multi_partition_gpt.case b/cases/create/mixed_cases/mic_cr_raw_multi_partition_gpt.case
deleted file mode 100644 (file)
index 49750e0..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<testcase>
-  <summary>This case is used to test if mic can work well with multi partitions for GPT partition table format, which are setted in ks config file, the command is : mic cr raw ./ks_files/ivi_four_partition_gpt.ks</summary>
-  <tracking>
-    <ticket>741</ticket>
-  </tracking>
-  <fixtures>
-    <copy src="ks_files/ivi_four_partition_gpt.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 cr raw ivi_four_partition_gpt.ks --logfile=log.file -d -v
-sudo test -e ./log.file
-grep "Finished" log.file
-sudo test -f ./mic-output/ivi_four_partition_gpt-*-sdb.raw
-raw_name=$(ls mic-output/ivi_four_partition_gpt-*-sdb.raw)
-parted_path=$(sudo which parted)
-sudo $parted_path  $raw_name print | grep "Partition Table: gpt"
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-test -e ./mic-output && sudo rm -rf ./mic-output
-test -e log.file && sudo rm log.file
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_multi_partition_mbr.case b/cases/create/mixed_cases/mic_cr_raw_multi_partition_mbr.case
deleted file mode 100644 (file)
index b5907da..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<testcase>
-  <summary>This case is used to test if mic can work well with multi partitions for 'msdos' partition table format which are setted in ks config file, the command is as bellow: mic cr raw ./ks_files/ivi_four_partition_mbr.ks</summary>
-  <tracking>
-    <ticket>742</ticket>
-  </tracking>
-  <fixtures>
-    <copy src="ks_files/ivi_four_partition_mbr.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 cr raw ivi_four_partition_mbr.ks --logfile=log.file -d -v
-test -e ./log.file
-grep "Finished" log.file
-test -f ./mic-output/ivi_four_partition_mbr-*-sdb.raw
-raw_name=$(ls ./mic-output/ivi_four_partition_mbr-*-sdb.raw)
-parted_path=$(sudo which parted)
-sudo $parted_path  $raw_name print | grep msdos
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-test -e ./mic-output && sudo rm -rf ./mic-output
-test -e log.file && sudo rm log.file
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_no_mountpoint.case b/cases/create/mixed_cases/mic_cr_raw_no_mountpoint.case
deleted file mode 100644 (file)
index 7106d11..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<testcase>
-  <summary>Test the condition that the ks file has no mountpoint.</summary>
-  <fixtures>
-    <copy src="ks_files/ivi_no_mountpoint.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 cr -d -v  raw ivi_no_mountpoint.ks --logfile=./log/ivi.log
-test -f ./log/ivi.log
-grep 'Finished' ./log/ivi.log
-test -f ./mic-output/ivi*.raw
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo test -e ./mic-output && sudo rm -rf ./mic-output
-sudo test -e ./log/ivi.log && sudo rm ./log/ivi.log
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_no_partition.case b/cases/create/mixed_cases/mic_cr_raw_no_partition.case
deleted file mode 100644 (file)
index 2252900..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<testcase>
-  <summary>This case is used to test if mic can work well with no partitions in ks config file,
-  the command is as bellow: mic cr raw ./ks_files/ivi_no_partition.ks</summary>
-  <fixtures>
-    <copy src="ks_files/ivi_no_partition.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 cr -d -v  raw ivi_no_partition.ks --logfile=log.file
-test -e ./log.file
-grep "Finished" log.file
-sudo test -f ./mic-output/ivi_no_partition-*-sda.raw
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "clean space...."
-test -d mic-output && sudo rm -rf ./mic-output
-test -f log.file && sudo rm log.file
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_unicode.case b/cases/create/mixed_cases/mic_cr_raw_unicode.case
deleted file mode 100644 (file)
index 9ebdcfc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<testcase>
-  <summary>create raw image when LANG is zh_CN.UTF-8</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-LANG=zh_CN.UTF-8
-sudo mic cr raw ivi.ks --logfile=mic1.log -d -v
-grep 'Finished' mic1.log
-test -f ./mic-output/ivi*.raw
-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/
-test -f mic1.log && sudo rm mic1.log
-echo 'finish cleaning...'
-]]></teardown>
-</testcase>
diff --git a/cases/create/mixed_cases/mic_cr_raw_without_conf_bootstrap_ia32.case b/cases/create/mixed_cases/mic_cr_raw_without_conf_bootstrap_ia32.case
deleted file mode 100644 (file)
index 59fd6ad..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-<testcase>
-  <summary>Without /etc/mic/mic.conf, raw image cannot be created in bootstrap mode</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-  </fixtures>
-  <steps><![CDATA[
-test -e /etc/mic/mic.conf
-sudo mv /etc/mic/mic.conf /etc/mic/mic.conf.bak
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-! (sudo mic cr loop ivi.ks --logfile=ivi.log --runtime=bootstrap -d -v) 2>&1 | tee mic.log
-grep -i "Failed to download/install bootstrap package" mic.log
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -e ./mic-output && sudo rm -rf ./mic-output
-test -e ivi.log && sudo rm ivi.log
-test -e mic.log && sudo rm mic.log
-test -e /etc/mic/mic.conf.bak && sudo mv /etc/mic/mic.conf.bak /etc/mic/mic.conf
-]]></teardown>
-</testcase>
diff --git a/cases/create/opt_cases/mic_cr_raw_compress-image-bz2_ia32.case b/cases/create/opt_cases/mic_cr_raw_compress-image-bz2_ia32.case
deleted file mode 100644 (file)
index 83866bb..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<testcase>
-  <summary>create raw image with ia32 arch and compress-image option with bz2</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-    <copy src="scripts/compute_volume.sh" />
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-enforce_path=$(sudo which setenforce || true)
-if [ ! -z $enforce_path ];then
-    sudo $enforce_path 0 || true
-fi
-sudo mic cr raw ivi.ks -o out1 -d -v --logfile=mic1.log
-grep 'Finished' mic1.log
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr raw ivi.ks --compress-image=bz2 -o out2 -d -v --logfile=mic2.log
-grep 'Finished' mic2.log
-test -f ./out2/ivi*.raw.bz2
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-source compute_volume.sh
-cd out1
-name1=`ls ivi*.raw`
-p1=`compute_volume $name1`
-cd ../out2
-name2=`ls ivi*.raw.bz2`
-p2=`compute_volume $name2`
-result=`awk -v before_volume=$p1 -v cpmpress_volume=$p2 'BEGIN {print(before_volume>cpmpress_volume)?"yes":"no"}'`
-test $result = 'yes'
-sudo bunzip2 $name2
-raw_name=`ls ivi*.raw`
-test -f $raw_name
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo rm -rf ./out1/ ./out2/
-sudo rm mic1.log mic2.log
-echo "finish cleaning..."
-]]></teardown>
-</testcase>
diff --git a/cases/create/opt_cases/mic_cr_raw_compress-image-gz_ia32.case b/cases/create/opt_cases/mic_cr_raw_compress-image-gz_ia32.case
deleted file mode 100644 (file)
index e1306f8..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<testcase>
-  <summary>create raw image with ia32 arch and compress-image option with gz</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.ks" />
-    <copy src="scripts/compute_volume.sh" />
-  </fixtures>
-  <steps><![CDATA[
-losetup_path=$(sudo which losetup)
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr raw ivi.ks -o out1 -d -v --logfile=mic1.log
-grep 'Finished' mic1.log
-test -f ./out1/ivi*.raw
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-sudo mic cr raw ivi.ks --compress-image=gz -o out2 -d -v --logfile=mic2.log
-grep 'Finished' mic2.log
-test -f ./out2/ivi*.raw.gz
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-source compute_volume.sh
-cd out1
-name1=`ls ivi*.raw`
-p1=`compute_volume $name1`
-cd ../out2
-name2=`ls ivi*.raw.gz`
-p2=`compute_volume $name2`
-result=`awk -v before_volume=$p1 -v cpmpress_volume=$p2 'BEGIN {print(before_volume>cpmpress_volume)?"yes":"no"}'`
-test $result = 'yes'
-sudo gunzip $name2
-raw_name=`ls ivi*.raw`
-test -f $name
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo rm -rf ./out1/ ./out2/
-sudo rm mic1.log mic2.log
-]]></teardown>
-</testcase>
diff --git a/cases/create/opt_cases/mic_cr_raw_compress-image-invalid_ia32.case b/cases/create/opt_cases/mic_cr_raw_compress-image-invalid_ia32.case
deleted file mode 100644 (file)
index 24893be..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<testcase>
-  <summary>create raw image with ia32 arch and compress-image option with invalid option, like zip</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.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 cr -d -v  raw ivi.ks --compress-image=zip 2>&1 | tee mic2.log )
-grep  "compress-image: invalid choice: 'zip'" mic2.log
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo rm -f mic2.log
-sudo rm -rf ./mic-output
-echo "finish cleaning..."
-]]></teardown>
-</testcase>
diff --git a/cases/create/opt_cases/mic_cr_raw_fstab-entry-name.case b/cases/create/opt_cases/mic_cr_raw_fstab-entry-name.case
deleted file mode 100644 (file)
index 1371bc8..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<testcase>
-  <summary>This test case is used to test the option "--fstab-entry=name",</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.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 cr raw  ivi.ks -d -v --fstab-entry=name --logfile=log.file
-grep "Finished" log.file
-ls mic-output/ | grep 'ivi-.*-sdb.raw'
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-sudo mkdir -p mic-output/ivi_dir/boot
-kpartx_path=$(sudo which kpartx)
-for i in {1..5}
-do
-    kpartx_output=$(sudo $kpartx_path -av $raw_image)
-    if [ -n "$kpartx_output" ]; then
-        first_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '1p')
-        second_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '2p')
-        ls /dev/mapper/
-        if [ -n "$first_part" ] && [ -e "/dev/mapper/$first_part" ];then
-            sudo mount /dev/mapper/$first_part  mic-output/ivi_dir/boot/ -t ext4
-            sudo mount /dev/mapper/$second_part  mic-output/ivi_dir/ -t ext4
-            sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep /dev/sdb
-            (! sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep -i 'uuid')
-            exit 0
-       fi
-   fi
-   sleep 3
-done
-echo "can not get kpartx output: $kpartx_path -av $raw_image"
-exit 1
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -f log.file && sudo rm log.file
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-losetup_path=$(sudo which losetup)
-if [ -f $raw_image ];then
-    for i in {1..5}
-    do
-    test -d mic-output/ivi_dir && sudo umount -l mic-output/ivi_dir
-    test -d mic-output/ivi_dir/boot && sudo umount -l mic-output/ivi_dir/boot
-    kpartx_path=$(sudo which kpartx)
-    sudo $kpartx_path -d $raw_image
-    if sudo $losetup_path -a | grep "ivi"; then
-        sleep 2
-    else
-        test -d mic-output && sudo rm -rf ./mic-output
-        break
-    fi
-    done
-fi
-]]></teardown>
-</testcase>
diff --git a/cases/create/opt_cases/mic_cr_raw_fstab-entry-uuid.case b/cases/create/opt_cases/mic_cr_raw_fstab-entry-uuid.case
deleted file mode 100644 (file)
index ea249f5..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-<testcase>
-  <summary>This test case is used to test the option "--fstab-entry=uuid",</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.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 cr raw ivi.ks --fstab-entry=uuid -d -v --logfile=log.file
-grep "Finished" log.file
-ls mic-output/ | grep 'ivi-.*-sdb.raw'
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-sudo mkdir -p mic-output/ivi_dir/boot
-kpartx_path=$(sudo which kpartx)
-for i in {1..5}
-do
-    kpartx_output=$(sudo $kpartx_path -av $raw_image)
-    if [ -n "$kpartx_output" ]; then
-        first_part=$(echo "$kpartx_output" | awk '{print $3}' | sed -n '1p')
-        second_part=$(echo "$kpartx_output"| awk '{print $3}' | sed -n '2p')
-        ls /dev/mapper/
-        if [ -n "$kpartx_output" ] && [ -e "/dev/mapper/$first_part" ];then
-            sudo mount /dev/mapper/$first_part  mic-output/ivi_dir/boot/ -t ext4
-            sudo mount /dev/mapper/$second_part  mic-output/ivi_dir/ -t ext4
-            (! sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep /dev/sdb)
-            sudo chroot mic-output/ivi_dir/ cat /etc/fstab | grep -i 'uuid'
-            exit 0
-        fi
-     fi
-     sleep 3
-done
-echo "can not get kpartx output: $kpartx_path -av $raw_image"
-exit 1
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-test -f log.file && sudo rm log.file
-raw_image=$(ls mic-output/ivi-*-sdb.raw)
-losetup_path=$(sudo which losetup)
-if [ -f $raw_image ];then
-    for i in {1..5}
-    do
-    test -d mic-output/ivi_dir && sudo umount -l mic-output/ivi_dir
-    test -d mic-output/ivi_dir/boot && sudo umount -l mic-output/ivi_dir/boot
-    kpartx_path=$(sudo which kpartx)
-    sudo $kpartx_path -d $raw_image
-    if sudo $losetup_path -a | grep 'ivi'; then
-        sleep 2
-    else
-        test -d mic-output && sudo rm -rf ./mic-output
-        break
-    fi
-    done
-fi
-echo 'finish cleaning'
-]]></teardown>
-</testcase>
diff --git a/cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32.case b/cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32.case
deleted file mode 100644 (file)
index 26770ce..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<testcase>
-  <summary>create loop image with ia32 arch and shrink option</summary>
-  <fixtures>
-    <copy src="ks_files/ivi.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 cr -d -v  raw ivi.ks --generate-bmap --logfile=mic1.log
-grep 'Finished' mic1.log
-test -f ./mic-output/ivi*.raw
-sudo $losetup_path -a
-sudo $losetup_path -a | wc -l | xargs test 0 -eq
-test -f ./mic-output/ivi*.bmap
-]]></steps>
-  <teardown><![CDATA[
-echo "cleaning..."
-sudo rm -rf ./mic-output/
-sudo rm mic1.log
-echo "finish cleaning..."
-]]></teardown>
-</testcase>