From: JunWang Date: Fri, 12 Jun 2015 01:19:53 +0000 (+0800) Subject: initialization X-Git-Tag: submit/devel/20190730.074558~71 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dbda0361f114cf23182c96caa41faba77c26b468;p=tools%2Fitest-cases-mic.git initialization --- dbda0361f114cf23182c96caa41faba77c26b468 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f4897cd --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +TARGET_PATH=$(PREFIX)/srv/itest/cases/mic +SOURCES="cases fixtures settings.py coveragerc report.html" + +build: + @echo done + +install: + install -d $(TARGET_PATH) + for src in $(SOURCES); do \ + cp -avr $$src $(TARGET_PATH); \ + done + install -d $(PREFIX)/etc/sudoers.d + install -m 0440 sudoers.itest_cases_mic $(PREFIX)/etc/sudoers.d/itest_cases_mic diff --git a/README.md b/README.md new file mode 100644 index 0000000..e294c6c --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +This project contains functional test cases for mic. + +And all these test cases are written in format of itest tools. diff --git a/cases/create/func_cases/mic_cr_auto_fs.case b/cases/create/func_cases/mic_cr_auto_fs.case new file mode 100644 index 0000000..a96195e --- /dev/null +++ b/cases/create/func_cases/mic_cr_auto_fs.case @@ -0,0 +1,41 @@ + + test 'mic cr auto ks' for fs 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 fs --pack-to=@NAME@-rs.tar.gz -*-mic2-options-*- + + + + +import sys +import json +img_file = sys.argv[1] +mic_version = sys.argv[2] +manifest_file=open('mic-output/manifest.json') +manifest=json.load(manifest_file) +assert manifest['format'] == 'fs' +assert manifest['version'] == mic_version +assert manifest['fs']['pack'] == '.tar.gz' +assert img_file in manifest['fs']['image_files'] + + + + + + + diff --git a/cases/create/func_cases/mic_cr_auto_loop.case b/cases/create/func_cases/mic_cr_auto_loop.case new file mode 100644 index 0000000..ef9255a --- /dev/null +++ b/cases/create/func_cases/mic_cr_auto_loop.case @@ -0,0 +1,24 @@ + + test 'mic cr auto ks' for loop 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 loop --pack-to=@NAME@-rs.zip -*-mic2-options-*- + + + + + + + diff --git a/cases/create/func_cases/mic_cr_auto_qcow.case b/cases/create/func_cases/mic_cr_auto_qcow.case new file mode 100644 index 0000000..051658d --- /dev/null +++ b/cases/create/func_cases/mic_cr_auto_qcow.case @@ -0,0 +1,46 @@ + + test 'mic cr auto ks' for qcow 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 qcow -*-mic2-options-*- + + + + + + + diff --git a/cases/create/func_cases/mic_cr_auto_raw.case b/cases/create/func_cases/mic_cr_auto_raw.case new file mode 100644 index 0000000..f372370 --- /dev/null +++ b/cases/create/func_cases/mic_cr_auto_raw.case @@ -0,0 +1,99 @@ + + 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-*- + + + + +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 + + + + + diff --git a/cases/create/func_cases/mic_cr_auto_raw_gpt.case b/cases/create/func_cases/mic_cr_auto_raw_gpt.case new file mode 100644 index 0000000..836753d --- /dev/null +++ b/cases/create/func_cases/mic_cr_auto_raw_gpt.case @@ -0,0 +1,76 @@ + + create raw image with gpt table and --part-type for partition + + + + + + diff --git a/cases/create/func_cases/mic_cr_fs_inc-src_cache-dir_arch_logfile_armv7l.case b/cases/create/func_cases/mic_cr_fs_inc-src_cache-dir_arch_logfile_armv7l.case new file mode 100644 index 0000000..9758e45 --- /dev/null +++ b/cases/create/func_cases/mic_cr_fs_inc-src_cache-dir_arch_logfile_armv7l.case @@ -0,0 +1,36 @@ + + This test case is used to test the options "--include-src --logfile=fs_src.log -k fs_cache -A armv7l". All these options are used to test whether the image will be generated according to the given values. + + + + + + + + + + + diff --git a/cases/create/func_cases/mic_cr_fs_inc-src_cp-knl_cache-dir_ia32.case b/cases/create/func_cases/mic_cr_fs_inc-src_cp-knl_cache-dir_ia32.case new file mode 100644 index 0000000..a692b61 --- /dev/null +++ b/cases/create/func_cases/mic_cr_fs_inc-src_cp-knl_cache-dir_ia32.case @@ -0,0 +1,34 @@ + + This test case is used to test the option "--include-src --copy-kernel --cachedir", + --include-src will put all rpm packages to /usr/src/SRPMS/, --copy-kernel will copy kernel file named as 'XXX-vmlinuz-XXX' to mic-output directory, + --cachedir will store all download packages to the specified directory, default is /var/tmp/mic/cache + + + + + + + + + + + diff --git a/cases/create/func_cases/mic_cr_fs_install-pkgs_ia32.case b/cases/create/func_cases/mic_cr_fs_install-pkgs_ia32.case new file mode 100644 index 0000000..8785457 --- /dev/null +++ b/cases/create/func_cases/mic_cr_fs_install-pkgs_ia32.case @@ -0,0 +1,26 @@ + + create fs image with ia32 arch and "--install-pkgs" option + + + + + + + + + + diff --git a/cases/create/func_cases/mic_cr_loop_check-pkgs_tmpfs_ia32.case b/cases/create/func_cases/mic_cr_loop_check-pkgs_tmpfs_ia32.case new file mode 100644 index 0000000..97d08f8 --- /dev/null +++ b/cases/create/func_cases/mic_cr_loop_check-pkgs_tmpfs_ia32.case @@ -0,0 +1,34 @@ + + Test option "check-pkgs". + + + + &1 | tee handset2.log || true +grep "Packages absent in image: bashrr" handset2.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/func_cases/mic_cr_loop_compress_local-pkgs_record-pkgs_pack-to_armv7l.case b/cases/create/func_cases/mic_cr_loop_compress_local-pkgs_record-pkgs_pack-to_armv7l.case new file mode 100644 index 0000000..7ea4c59 --- /dev/null +++ b/cases/create/func_cases/mic_cr_loop_compress_local-pkgs_record-pkgs_pack-to_armv7l.case @@ -0,0 +1,49 @@ + + create loop image with armv7l arch, and options is + "--local-pkgs-path=./rpm --record-pkgs=name,content,license --taring-to=@NAME@ --compress-image=bz2" + + + + + + + diff --git a/cases/create/func_cases/mic_cr_loop_config_cmpress_runtime_ia32.case b/cases/create/func_cases/mic_cr_loop_config_cmpress_runtime_ia32.case new file mode 100644 index 0000000..818c713 --- /dev/null +++ b/cases/create/func_cases/mic_cr_loop_config_cmpress_runtime_ia32.case @@ -0,0 +1,56 @@ + + This test case is used to test the option + "--config, --compress-image, --runtime" + + + + + + + cpmpress_volume)?"yes":"no"}'` + +test $result = 'yes' + +cd my_mic-output + +sudo bunzip2 platform.img.bz2 + +test -f platform.img +]]> + + diff --git a/cases/create/func_cases/mic_cr_loop_logfile_conf_shrink_release_pkgmgr_armv7l.case b/cases/create/func_cases/mic_cr_loop_logfile_conf_shrink_release_pkgmgr_armv7l.case new file mode 100644 index 0000000..d433800 --- /dev/null +++ b/cases/create/func_cases/mic_cr_loop_logfile_conf_shrink_release_pkgmgr_armv7l.case @@ -0,0 +1,41 @@ + + create loop image with armv7l arh, the option is +"--logfile=/custome/arm.log -c conf/mic.conf --shrink --release=tizen-2.2_20130719.3 --pkgmgr=zypp" + + + + + + + diff --git a/cases/create/func_cases/mic_cr_loop_shrink_outdir_logfile_pkgmgr_ia32.case b/cases/create/func_cases/mic_cr_loop_shrink_outdir_logfile_pkgmgr_ia32.case new file mode 100644 index 0000000..86569e7 --- /dev/null +++ b/cases/create/func_cases/mic_cr_loop_shrink_outdir_logfile_pkgmgr_ia32.case @@ -0,0 +1,46 @@ + + create loop image with ia32 arch and shrink option + + + + + cpmpress_volume)?"yes":"no"}'` + +test $result = 'yes' +]]> + + diff --git a/cases/create/func_cases/mic_cr_qcow_check-pkgs_tmpfs_ia32.case b/cases/create/func_cases/mic_cr_qcow_check-pkgs_tmpfs_ia32.case new file mode 100644 index 0000000..92f55e1 --- /dev/null +++ b/cases/create/func_cases/mic_cr_qcow_check-pkgs_tmpfs_ia32.case @@ -0,0 +1,54 @@ + + Test option "check-pkgs". + + + + &1 | tee qcow2.log || true + +grep "Packages absent in image: bashrr" qcow2.log + +sudo $losetup_path -a + +sudo $losetup_path -a | wc -l | xargs test 0 -eq + +]]> + + diff --git a/cases/create/func_cases/mic_cr_qcow_config_runtime_ia32.case b/cases/create/func_cases/mic_cr_qcow_config_runtime_ia32.case new file mode 100644 index 0000000..9311e1e --- /dev/null +++ b/cases/create/func_cases/mic_cr_qcow_config_runtime_ia32.case @@ -0,0 +1,62 @@ + + This test case is used to test the option + "--config, --runtime" + + + + + + + + diff --git a/cases/create/func_cases/mic_cr_qcow_local-pkgs_record-pkgs.case b/cases/create/func_cases/mic_cr_qcow_local-pkgs_record-pkgs.case new file mode 100644 index 0000000..ded38ae --- /dev/null +++ b/cases/create/func_cases/mic_cr_qcow_local-pkgs_record-pkgs.case @@ -0,0 +1,65 @@ + + create qcow image with armv7l arch, and options is + "--local-pkgs-path=./rpm --record-pkgs=name,content,license --taring-to=@NAME@" + + + + + + + diff --git a/cases/create/func_cases/mic_cr_qcow_logfile_conf_release_pkgmgr.case b/cases/create/func_cases/mic_cr_qcow_logfile_conf_release_pkgmgr.case new file mode 100644 index 0000000..6615073 --- /dev/null +++ b/cases/create/func_cases/mic_cr_qcow_logfile_conf_release_pkgmgr.case @@ -0,0 +1,69 @@ + + create qcow image with option +"--logfile=/custome/arm.log -c conf/mic.conf --release=tizen-2.2_20130719.3 --pkgmgr=zypp" + + + + + + + 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 new file mode 100644 index 0000000..4627a4f --- /dev/null +++ b/cases/create/func_cases/mic_cr_raw_generate-bmap_cp-knl_compress_runtime_local-pkgs_conf_armv7l.case @@ -0,0 +1,48 @@ + + create raw image with "--generate-bmap --compress-disk-image=bz2 --copy-kernel --runtime=zypp --local-pkgs-path=rpm -c conf/mic.conf" + + + + + + + + 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 new file mode 100644 index 0000000..bf4f5a3 --- /dev/null +++ b/cases/create/func_cases/mic_cr_raw_gpt-part-type.case @@ -0,0 +1,29 @@ + + create raw image with gpt table and --part-type for partition + + + + + + diff --git a/cases/create/func_cases/mic_cr_raw_install_more_pakcates.case b/cases/create/func_cases/mic_cr_raw_install_more_pakcates.case new file mode 100644 index 0000000..d0797e8 --- /dev/null +++ b/cases/create/func_cases/mic_cr_raw_install_more_pakcates.case @@ -0,0 +1,77 @@ + + + test all kinds of packages can be installed + + + + + + + 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 new file mode 100644 index 0000000..58dcef3 --- /dev/null +++ b/cases/create/func_cases/mic_cr_raw_release_logfile_local-pkg-pth_record-pkg_gen-bmap_ia32.case @@ -0,0 +1,46 @@ + + 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. + + + + + + + + diff --git a/cases/create/mixed_cases/check_install_packages_number_display.case b/cases/create/mixed_cases/check_install_packages_number_display.case new file mode 100644 index 0000000..4c6537f --- /dev/null +++ b/cases/create/mixed_cases/check_install_packages_number_display.case @@ -0,0 +1,56 @@ + + +This test case is used to test mic output about +installing package, before it shows error log 'install ....[15/14]' + + + 534 + + + + + temp + +package_number=$(tail temp -n 1| awk -F '/' '{print $2}') + +len=$(cat temp | wc -l) + +test $package_number -eq $(($len-1)) + +i=1 +for line in $(cat temp);do + num1=$(echo $line | awk -F '/' '{print $1}') + + num2=$(echo $line | awk -F '/' '{print $2}') + + if [ $i -eq 1 ] || [ $i -eq $len ];then + test $num1 -eq $num2 + else + test $num1 -lt $num2 + fi + + i=$((i+1)) +done +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_auto_arm64.case b/cases/create/mixed_cases/mic_cr_auto_arm64.case new file mode 100644 index 0000000..f85d09c --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_auto_arm64.case @@ -0,0 +1,32 @@ + + test 'mic cr auto ks' for arm64 arch + if we run command with 'auto', mic will use the first line in ks file, which is called magic line + + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_auto_with_encoded_password.case b/cases/create/mixed_cases/mic_cr_auto_with_encoded_password.case new file mode 100644 index 0000000..20f27df --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_auto_with_encoded_password.case @@ -0,0 +1,27 @@ + + test repo with encoded password + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_auto_with_separate_password.case b/cases/create/mixed_cases/mic_cr_auto_with_separate_password.case new file mode 100644 index 0000000..9719ec9 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_auto_with_separate_password.case @@ -0,0 +1,25 @@ + + test repo with seperate password + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_auto_with_un-encoded_password.case b/cases/create/mixed_cases/mic_cr_auto_with_un-encoded_password.case new file mode 100644 index 0000000..7ab41ba --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_auto_with_un-encoded_password.case @@ -0,0 +1,25 @@ + + test repo with raw password + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_createrepo_issue.case b/cases/create/mixed_cases/mic_cr_createrepo_issue.case new file mode 100644 index 0000000..6054c0d --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_createrepo_issue.case @@ -0,0 +1,51 @@ + + Test whether repo created by 'createrepo' locally can be used by mic + + 2261 + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_bootstrap_check_chroot.case b/cases/create/mixed_cases/mic_cr_fs_bootstrap_check_chroot.case new file mode 100644 index 0000000..04742c5 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_bootstrap_check_chroot.case @@ -0,0 +1,32 @@ + + Test whether it is ok to chroot into the image + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_check_high_version_rpm_installed.case b/cases/create/mixed_cases/mic_cr_fs_check_high_version_rpm_installed.case new file mode 100644 index 0000000..6439a7a --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_check_high_version_rpm_installed.case @@ -0,0 +1,28 @@ + + there are two bash rpms in the repo, one is bash4.1, the other one is bash4.3, bash 4.3 should be installed + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_duplicate_log_native.case b/cases/create/mixed_cases/mic_cr_fs_duplicate_log_native.case new file mode 100644 index 0000000..02b9282 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_duplicate_log_native.case @@ -0,0 +1,50 @@ + + check whether the log generated by "--logfile" + have duplicated package number + + + + + tmp1.log +awk -F ' ' '{print $NF}' tmp1.log > tmp2.log +grep -ao "\[.*\]" tmp2.log > tmp3.log +#check whether it has duplicated adjacent lines +if $(uniq -d tmp3.log | grep '.*'); then + echo "Have duplicated adjacent lines" + exit 1 +fi + +Total_Pac=$(grep -ao "Packages: [0-9]* Total" fs.log | grep -ao "[0-9]*") + +#check whether it starts from [ 1/*] +head -1 tmp3.log | grep "\[[[:space:]]*1\/$Total_Pac\]" + +#check whether it ends with "eg. [46/46]" +tail -1 tmp3.log | grep "\[[[:space:]]*\($Total_Pac\)\/\1\]" + +#check whether the package number is sequential +grep -ao "[0-9]*\/" tmp3.log > tmp4.log + +sed -i 's/\///' tmp4.log + +awk 'BEGIN{a=0} {if($1-a==1){a=$1}else{print"Not sequential";exit 1}}END{print "last number is:",a}' tmp4.log +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_fs_native_check_chroot.case b/cases/create/mixed_cases/mic_cr_fs_native_check_chroot.case new file mode 100644 index 0000000..32df7a2 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_native_check_chroot.case @@ -0,0 +1,29 @@ + + Test whether it is ok to chroot into the image + + + +echo "Checking chroot" +ls +pwd +echo "It's ok to chroot,jump out" + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_obsolete_pkg_test.case b/cases/create/mixed_cases/mic_cr_fs_obsolete_pkg_test.case new file mode 100644 index 0000000..80ed46b --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_obsolete_pkg_test.case @@ -0,0 +1,45 @@ + + + test if pkg AA obsoletes when pkg A is lower than certain version, mic should only install AA + A.spec: version 2.0 + AA.spec: obsoletes A less than 1.0 + AAA.spec: obsoletes A less than 3.0 + + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_prefix-conf_ia32.case b/cases/create/mixed_cases/mic_cr_fs_prefix-conf_ia32.case new file mode 100644 index 0000000..0b8cf4a --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_prefix-conf_ia32.case @@ -0,0 +1,24 @@ + + Test "name_prefix = prefix" in mic.conf + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_priority.case b/cases/create/mixed_cases/mic_cr_fs_priority.case new file mode 100644 index 0000000..42f0fb1 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_priority.case @@ -0,0 +1,37 @@ + + Test option "--priority", the smaller the value, the higher the priority. + + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_fs_without_conf_bootstrap_ia32.case b/cases/create/mixed_cases/mic_cr_fs_without_conf_bootstrap_ia32.case new file mode 100644 index 0000000..23a525e --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_without_conf_bootstrap_ia32.case @@ -0,0 +1,26 @@ + + Without /etc/mic/mic.conf, + fs image cannot be created in bootstrap mode + + + + + &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 +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_fs_without_conf_native_ia32.case b/cases/create/mixed_cases/mic_cr_fs_without_conf_native_ia32.case new file mode 100644 index 0000000..ef46763 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_fs_without_conf_native_ia32.case @@ -0,0 +1,25 @@ + + Without /etc/mic/mic.conf, fs image can be created in native mode + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_livecd_bootstrap_check_chroot.case b/cases/create/mixed_cases/mic_cr_livecd_bootstrap_check_chroot.case new file mode 100644 index 0000000..af020fb --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_livecd_bootstrap_check_chroot.case @@ -0,0 +1,22 @@ + + Test whether it is ok to chroot into the image + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_livecd_duplicate_log_native.case b/cases/create/mixed_cases/mic_cr_livecd_duplicate_log_native.case new file mode 100644 index 0000000..45d2033 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_livecd_duplicate_log_native.case @@ -0,0 +1,47 @@ + + check whether the log generated by "--logfile" have duplicated package number + + + + + + ubuntu14.10 + + + tmp1.log +awk -F ' ' '{print $NF}' tmp1.log > tmp2.log +grep -ao "\[.*\]" tmp2.log > tmp3.log +#check whether it has duplicated adjacent lines +if $(uniq -d tmp3.log | grep '.*') +then + echo "Have duplicated adjacent lines" + exit 1 +fi +Total_Pac=$(grep -ao "Packages: [0-9]* Total" livecd.log | grep -o "[0-9]*") +#check whether it starts from "[ 1/*]" +head -1 tmp3.log | grep "\[[[:space:]]*1\/$Total_Pac\]" +#check whether it ends with "eg. [46/46]" +tail -1 tmp3.log | grep "\[[[:space:]]*\($Total_Pac\)\/\1\]" +#check whether the package number is sequential +grep -ao "[0-9]*\/" tmp3.log > tmp4.log +sed -i 's/\///' tmp4.log +awk 'BEGIN{a=0} {if($1-a==1){a=$1}else{print"Not sequential";exit 1}}END{print "last number is:",a}' tmp4.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_livecd_prefix-conf_ia32.case b/cases/create/mixed_cases/mic_cr_livecd_prefix-conf_ia32.case new file mode 100644 index 0000000..07833eb --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_livecd_prefix-conf_ia32.case @@ -0,0 +1,29 @@ + + Test "name_prefix = prefix" in mic.conf + + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_livecd_with_partition_label.case b/cases/create/mixed_cases/mic_cr_livecd_with_partition_label.case new file mode 100644 index 0000000..9da5c8b --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_livecd_with_partition_label.case @@ -0,0 +1,29 @@ + + test 'mic cr livecd ks' for livecd type, and '--label platform' added for partition in ks + + 221 + + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_livecd_without_conf_bootstrap_ia32.case b/cases/create/mixed_cases/mic_cr_livecd_without_conf_bootstrap_ia32.case new file mode 100644 index 0000000..2a3cfb3 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_livecd_without_conf_bootstrap_ia32.case @@ -0,0 +1,29 @@ + + Without /etc/mic/mic.conf, livecd image cannot be created in bootstrap mode + + + + + + ubuntu14.10 + + + &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 +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_livecd_without_conf_native_ia32.case b/cases/create/mixed_cases/mic_cr_livecd_without_conf_native_ia32.case new file mode 100644 index 0000000..8a5ded8 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_livecd_without_conf_native_ia32.case @@ -0,0 +1,30 @@ + + Without /etc/mic/mic.conf, livecd image can be created in native mode + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_bootstrap_check_chroot.case b/cases/create/mixed_cases/mic_cr_liveusb_bootstrap_check_chroot.case new file mode 100644 index 0000000..a973bcf --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_bootstrap_check_chroot.case @@ -0,0 +1,27 @@ + + Test whether it is ok to chroot into the image + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_duplicate_log_native.case b/cases/create/mixed_cases/mic_cr_liveusb_duplicate_log_native.case new file mode 100644 index 0000000..8bd1f91 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_duplicate_log_native.case @@ -0,0 +1,47 @@ + + check whether the log generated by "--logfile" have duplicated package number + + + + + + ubuntu14.10 + + + tmp1.log +awk -F ' ' '{print $NF}' tmp1.log > tmp2.log +grep -ao "\[.*\]" tmp2.log > tmp3.log +#check whether it has duplicated adjacent lines +if $(uniq -d tmp3.log | grep '.*') +then + echo "Have duplicated adjacent lines" + exit 1 +fi +Total_Pac=$(grep -ao "Packages: [0-9]* Total" liveusb.log | grep -o "[0-9]*") +#check whether it starts from "[ 1/*]" +head -1 tmp3.log | grep "\[[[:space:]]*1\/$Total_Pac\]" +#check whether it ends with "eg. [46/46]" +tail -1 tmp3.log | grep "\[[[:space:]]*\($Total_Pac\)\/\1\]" +#check whether the package number is sequential +grep -ao "[0-9]*\/" tmp3.log > tmp4.log +sed -i 's/\///' tmp4.log +awk 'BEGIN{a=0} {if($1-a==1){a=$1}else{print"Not sequential";exit 1}}END{print "last number is:",a}' tmp4.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_excludepkgs_issue_1066.case b/cases/create/mixed_cases/mic_cr_liveusb_excludepkgs_issue_1066.case new file mode 100644 index 0000000..603b788 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_excludepkgs_issue_1066.case @@ -0,0 +1,35 @@ + + test '--excludepkgs' option in repo for liveusb type + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_includepkgs.case b/cases/create/mixed_cases/mic_cr_liveusb_includepkgs.case new file mode 100644 index 0000000..578c02b --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_includepkgs.case @@ -0,0 +1,29 @@ + + test '--includepkgs' option in repo for liveusb type + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_prefix-conf_ia32.case b/cases/create/mixed_cases/mic_cr_liveusb_prefix-conf_ia32.case new file mode 100644 index 0000000..413ce78 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_prefix-conf_ia32.case @@ -0,0 +1,29 @@ + + Test "name_prefix = prefix" in mic.conf + + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_release_record-pkgs_.case b/cases/create/mixed_cases/mic_cr_liveusb_release_record-pkgs_.case new file mode 100644 index 0000000..596c199 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_release_record-pkgs_.case @@ -0,0 +1,28 @@ + + test 'mic cr liveusb ks --release=xx --record-pkgs=xx' for liveusb type + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_with_partition_label.case b/cases/create/mixed_cases/mic_cr_liveusb_with_partition_label.case new file mode 100644 index 0000000..d18ba4b --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_with_partition_label.case @@ -0,0 +1,29 @@ + + test 'mic cr liveusb ks' for liveusb type, and '--label platform' added for partition in ks + + 221 + + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_without_conf_bootstrap_ia32.case b/cases/create/mixed_cases/mic_cr_liveusb_without_conf_bootstrap_ia32.case new file mode 100644 index 0000000..f699213 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_without_conf_bootstrap_ia32.case @@ -0,0 +1,29 @@ + + Without /etc/mic/mic.conf, liveusb image cannot be created in bootstrap mode + + + + + + ubuntu14.10 + + + &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 +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_liveusb_without_conf_native_ia32.case b/cases/create/mixed_cases/mic_cr_liveusb_without_conf_native_ia32.case new file mode 100644 index 0000000..ae29ed8 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_liveusb_without_conf_native_ia32.case @@ -0,0 +1,30 @@ + + Without /etc/mic/mic.conf, liveusb image can be created in native mode + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_bootstrap_check_chroot.case b/cases/create/mixed_cases/mic_cr_loop_bootstrap_check_chroot.case new file mode 100644 index 0000000..4fd5218 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_bootstrap_check_chroot.case @@ -0,0 +1,28 @@ + + Test whether it is ok to chroot into the image + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_bootstrap_issue_1093.case b/cases/create/mixed_cases/mic_cr_loop_bootstrap_issue_1093.case new file mode 100644 index 0000000..da90ebb --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_bootstrap_issue_1093.case @@ -0,0 +1,42 @@ + + + + 1093 + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_check_arch.case b/cases/create/mixed_cases/mic_cr_loop_check_arch.case new file mode 100644 index 0000000..db3d69b --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_check_arch.case @@ -0,0 +1,23 @@ + + check if arch is right + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_check_md5sum.case b/cases/create/mixed_cases/mic_cr_loop_check_md5sum.case new file mode 100644 index 0000000..0dc28f5 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_check_md5sum.case @@ -0,0 +1,31 @@ + + Test 'md5sum -c ' + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_check_user_and_group_info.case b/cases/create/mixed_cases/mic_cr_loop_check_user_and_group_info.case new file mode 100644 index 0000000..45c07b0 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_check_user_and_group_info.case @@ -0,0 +1,27 @@ + + This test case is used to check the user/group info +for output and cache directory, it's should be the current user + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_conf_difference.case b/cases/create/mixed_cases/mic_cr_loop_conf_difference.case new file mode 100644 index 0000000..1cb046f --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_conf_difference.case @@ -0,0 +1,48 @@ + + This test case is used to test the option "--config", +the configue file is with different 'outdir', mic should create image in right directory. + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_conf_etc_ia32.case b/cases/create/mixed_cases/mic_cr_loop_conf_etc_ia32.case new file mode 100644 index 0000000..798703f --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_conf_etc_ia32.case @@ -0,0 +1,20 @@ + + Test whether mic find the conf which is not under current dir or 'ks' dir when running in bootstrap mode. + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_duplicate_log_native.case b/cases/create/mixed_cases/mic_cr_loop_duplicate_log_native.case new file mode 100644 index 0000000..26b320f --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_duplicate_log_native.case @@ -0,0 +1,42 @@ + + check whether the log generated by "--logfile" have duplicated package number + + + + tmp1.log +awk -F ' ' '{print $NF}' tmp1.log > tmp2.log +grep -ao "\[.*\]" tmp2.log > tmp3.log +#check whether it has duplicated adjacent lines +if $(uniq -d tmp3.log | grep '.*') +then + echo "Have duplicated adjacent lines" + exit 1 +fi +Total_Pac=$(grep -ao "Packages: [0-9]* Total" loop.log | grep -ao "[0-9]*") +#check whether it starts from [ 1/*] +head -1 tmp3.log | grep "\[[[:space:]]*1\/$Total_Pac\]" +#check whether it ends with "eg. [46/46]" +tail -1 tmp3.log | grep "\[[[:space:]]*\($Total_Pac\)\/\1\]" +#check whether the package number is sequential +grep -ao "[0-9]*\/" tmp3.log > tmp4.log +sed -i 's/\///' tmp4.log +awk 'BEGIN{a=0} {if($1-a==1){a=$1}else{print"Not sequential";exit 1}}END{print "last number is:",a}' tmp4.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_loop_full_ks.case b/cases/create/mixed_cases/mic_cr_loop_full_ks.case new file mode 100644 index 0000000..606329a --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_full_ks.case @@ -0,0 +1,52 @@ + + This test case is used to test full part ks + + + +import sys +import json +img_file = sys.argv[1] +mic_version = sys.argv[2] +manifest_file=open('mic-output/manifest.json') +manifest=json.load(manifest_file) +assert manifest['format'] == 'loop' +assert manifest['version'] == mic_version +assert manifest['loop']['pack'] == '.tar.gz' +assert img_file in manifest['loop']['image_files'] +assert manifest['loop']['partitions']['/'] == 'platform' +assert manifest['loop']['partitions']['/opt'] == 'data' +assert manifest['loop']['partitions']['/opt/usr'] == 'ums' + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_issue_794.case b/cases/create/mixed_cases/mic_cr_loop_issue_794.case new file mode 100644 index 0000000..0737866 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_issue_794.case @@ -0,0 +1,30 @@ + + when modify /etc/mic/mic.conf, change "plugin_dir" to a different existing one, mic failed to find the specified plugin dir. + + 794 + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_ks-under-root-directory_ia32.case b/cases/create/mixed_cases/mic_cr_loop_ks-under-root-directory_ia32.case new file mode 100644 index 0000000..5802596 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_ks-under-root-directory_ia32.case @@ -0,0 +1,26 @@ + + create loop image with ia32 arch while ks file is located in /. + + 672 + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_multi_partition.case b/cases/create/mixed_cases/mic_cr_loop_multi_partition.case new file mode 100644 index 0000000..55034af --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_multi_partition.case @@ -0,0 +1,28 @@ + + This test case is used to test loop type with multiple partitions, in which there is a swap parition + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_native_check_chroot.case b/cases/create/mixed_cases/mic_cr_loop_native_check_chroot.case new file mode 100644 index 0000000..c579375 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_native_check_chroot.case @@ -0,0 +1,28 @@ + + Test whether it is ok to chroot into the image + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_native_issue_1093.case b/cases/create/mixed_cases/mic_cr_loop_native_issue_1093.case new file mode 100644 index 0000000..325647b --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_native_issue_1093.case @@ -0,0 +1,42 @@ + + + + 1093 + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_no-cache.case b/cases/create/mixed_cases/mic_cr_loop_no-cache.case new file mode 100644 index 0000000..f404348 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_no-cache.case @@ -0,0 +1,42 @@ + + Test option "--nocache", which is used in the "repo" line of ks file. when this option is added, mic will download the related rpms again instead of using the existing rpms that are already stored in the local cache. + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_only_local_repo.case b/cases/create/mixed_cases/mic_cr_loop_only_local_repo.case new file mode 100644 index 0000000..ff13dff --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_only_local_repo.case @@ -0,0 +1,44 @@ + + test if mic can create image sucessfully if only local repo supplied + + 512 + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_overridden.case b/cases/create/mixed_cases/mic_cr_loop_overridden.case new file mode 100644 index 0000000..0194943 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_overridden.case @@ -0,0 +1,33 @@ + + mic create auto + + Target image/dir.*already exists.*clean up and continue?(Y/n) + Y + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_pack-to-tar-gz_multi_times.case b/cases/create/mixed_cases/mic_cr_loop_pack-to-tar-gz_multi_times.case new file mode 100644 index 0000000..59a02ae --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_pack-to-tar-gz_multi_times.case @@ -0,0 +1,28 @@ + + run ten times to testing 'pack to' option + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_prefix-conf_ia32.case b/cases/create/mixed_cases/mic_cr_loop_prefix-conf_ia32.case new file mode 100644 index 0000000..a3f514f --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_prefix-conf_ia32.case @@ -0,0 +1,25 @@ + + Test "name_prefix = prefix" in mic.conf + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_release_ia32_bug.case b/cases/create/mixed_cases/mic_cr_loop_release_ia32_bug.case new file mode 100644 index 0000000..855fc0d --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_release_ia32_bug.case @@ -0,0 +1,27 @@ + + track bug 813 about raceback shows if i add a slash to release by accident + + 803 + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_repo_local_repo.case b/cases/create/mixed_cases/mic_cr_loop_repo_local_repo.case new file mode 100644 index 0000000..f68695f --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_repo_local_repo.case @@ -0,0 +1,43 @@ + + 1.0 + test if mic can create image sucessfully if only local repo supplied + + + + + + 512 + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_without_conf_bootstrap_ia32.case b/cases/create/mixed_cases/mic_cr_loop_without_conf_bootstrap_ia32.case new file mode 100644 index 0000000..369c848 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_without_conf_bootstrap_ia32.case @@ -0,0 +1,24 @@ + + Without /etc/mic/mic.conf, loop image cannot be created in bootstrap mode + + + + &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 +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_loop_without_conf_native_ia32.case b/cases/create/mixed_cases/mic_cr_loop_without_conf_native_ia32.case new file mode 100644 index 0000000..a0e2d75 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_without_conf_native_ia32.case @@ -0,0 +1,25 @@ + + Without /etc/mic/mic.conf, loop image can be created in native mode + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_loop_without_var_lock.case b/cases/create/mixed_cases/mic_cr_loop_without_var_lock.case new file mode 100644 index 0000000..9dfa85a --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_loop_without_var_lock.case @@ -0,0 +1,29 @@ + + Reproduce bug 782, when /var/lock does not exist, Traceback shows when creating images. + + 782 + + + + + &1 | tee all.log +grep 'Finished' all.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_raw_active_partition.case b/cases/create/mixed_cases/mic_cr_raw_active_partition.case new file mode 100644 index 0000000..1304792 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_active_partition.case @@ -0,0 +1,37 @@ + + 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 + + 639 + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_broken_bootstrap.case b/cases/create/mixed_cases/mic_cr_raw_broken_bootstrap.case new file mode 100644 index 0000000..8b5e971 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_broken_bootstrap.case @@ -0,0 +1,21 @@ + + Testing broken mic-bootstrap + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_check-bootflag_gpt.case b/cases/create/mixed_cases/mic_cr_raw_check-bootflag_gpt.case new file mode 100644 index 0000000..bab6752 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_check-bootflag_gpt.case @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_check-bootflag_mbr.case b/cases/create/mixed_cases/mic_cr_raw_check-bootflag_mbr.case new file mode 100644 index 0000000..8a510ea --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_check-bootflag_mbr.case @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_duplicate_log_native.case b/cases/create/mixed_cases/mic_cr_raw_duplicate_log_native.case new file mode 100644 index 0000000..9dbf939 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_duplicate_log_native.case @@ -0,0 +1,42 @@ + + check whether the log generated by "--logfile" have duplicated package number + + + + tmp1.log +awk -F ' ' '{print $NF}' tmp1.log > tmp2.log +grep -ao "\[.*\]" tmp2.log > tmp3.log +#check whether it has duplicated adjacent lines +if $(uniq -d tmp3.log | grep '.*') +then + echo "Have duplicated adjacent lines" + exit 1 +fi +Total_Pac=$(grep -ao "Packages: [0-9]* Total" raw.log | grep -ao "[0-9]*") +#check whether it starts from "[1/*]" +head -1 tmp3.log | grep "\[[[:space:]]*1\/$Total_Pac\]" +#check whether it ends with "eg. [46/46]" +tail -1 tmp3.log | grep "\[[[:space:]]*\($Total_Pac\)\/\1\]" +#check whether the package number is sequential +grep -ao "[0-9]*\/" tmp3.log > tmp4.log +sed -i 's/\///' tmp4.log +awk 'BEGIN{a=0} {if($1-a==1){a=$1}else{print"Not sequential";exit 1}}END{print "last number is:",a}' tmp4.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_raw_installerfw_extlinux.case b/cases/create/mixed_cases/mic_cr_raw_installerfw_extlinux.case new file mode 100644 index 0000000..ca2a4fc --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_installerfw_extlinux.case @@ -0,0 +1,46 @@ + + This case is used to test if 'installerfw' command in ks + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_installerfw_fstab.case b/cases/create/mixed_cases/mic_cr_raw_installerfw_fstab.case new file mode 100644 index 0000000..f02abd2 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_installerfw_fstab.case @@ -0,0 +1,61 @@ + + This case is used to test if 'installerfw "fatab"' command in ks + + + + + + 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 new file mode 100644 index 0000000..858fd62 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_invliad_mic-bootstrap.case @@ -0,0 +1,21 @@ + + Testing invalid mic-bootstrap + + + + + + 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 new file mode 100644 index 0000000..1b500c8 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_ivi_partition_size_compute_ia32.case @@ -0,0 +1,45 @@ + + + + 624 + + + + + > 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 +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_raw_locale.case b/cases/create/mixed_cases/mic_cr_raw_locale.case new file mode 100644 index 0000000..6d07b15 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_locale.case @@ -0,0 +1,61 @@ + + + test if '/etc/locale.conf' exists + + + + + + 1745 + + + + 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 new file mode 100644 index 0000000..49750e0 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_multi_partition_gpt.case @@ -0,0 +1,28 @@ + + 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 + + 741 + + + + + + + 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 new file mode 100644 index 0000000..b5907da --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_multi_partition_mbr.case @@ -0,0 +1,28 @@ + + 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 + + 742 + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_no_mountpoint.case b/cases/create/mixed_cases/mic_cr_raw_no_mountpoint.case new file mode 100644 index 0000000..7106d11 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_no_mountpoint.case @@ -0,0 +1,22 @@ + + Test the condition that the ks file has no mountpoint. + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_no_partition.case b/cases/create/mixed_cases/mic_cr_raw_no_partition.case new file mode 100644 index 0000000..2252900 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_no_partition.case @@ -0,0 +1,23 @@ + + 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 + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_prefix-conf_ia32.case b/cases/create/mixed_cases/mic_cr_raw_prefix-conf_ia32.case new file mode 100644 index 0000000..7637b50 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_prefix-conf_ia32.case @@ -0,0 +1,25 @@ + + Test "name_prefix = prefix" in mic.conf + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_proxy_in_ks_native.case b/cases/create/mixed_cases/mic_cr_raw_proxy_in_ks_native.case new file mode 100644 index 0000000..d26894d --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_proxy_in_ks_native.case @@ -0,0 +1,28 @@ + + 1.0 + This case is used to test if mic can create image successfully with no proxy set in current shell, howerver it is set in ks file with '--proxy' for repo. + + + + + 66 + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_release_record-pkgs_yum.case b/cases/create/mixed_cases/mic_cr_raw_release_record-pkgs_yum.case new file mode 100644 index 0000000..5296465 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_release_record-pkgs_yum.case @@ -0,0 +1,25 @@ + + test 'mic cr liveusb ks --release=xx --record-pkgs=xx' for liveusb type + + 2081 + + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_raw_unicode.case b/cases/create/mixed_cases/mic_cr_raw_unicode.case new file mode 100644 index 0000000..9ebdcfc --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_unicode.case @@ -0,0 +1,23 @@ + + create raw image when LANG is zh_CN.UTF-8 + + + + + + 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 new file mode 100644 index 0000000..59fd6ad --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_without_conf_bootstrap_ia32.case @@ -0,0 +1,24 @@ + + Without /etc/mic/mic.conf, raw image cannot be created in bootstrap mode + + + + &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 +]]> + + diff --git a/cases/create/mixed_cases/mic_cr_raw_without_conf_native_ia32.case b/cases/create/mixed_cases/mic_cr_raw_without_conf_native_ia32.case new file mode 100644 index 0000000..fe235cc --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_raw_without_conf_native_ia32.case @@ -0,0 +1,25 @@ + + Without /etc/mic/mic.conf, raw image can be created in native mode + + + + + + diff --git a/cases/create/mixed_cases/mic_cr_strict_mode_image.case b/cases/create/mixed_cases/mic_cr_strict_mode_image.case new file mode 100644 index 0000000..b68a760 --- /dev/null +++ b/cases/create/mixed_cases/mic_cr_strict_mode_image.case @@ -0,0 +1,40 @@ + + Test option "--strict-mode", it this given, mic will abort creating image, if some rpm pagages fail to install + + + + + + + + + + + diff --git a/cases/create/mixed_cases/mic_duplicate_log.case b/cases/create/mixed_cases/mic_duplicate_log.case new file mode 100644 index 0000000..fbb9f30 --- /dev/null +++ b/cases/create/mixed_cases/mic_duplicate_log.case @@ -0,0 +1,17 @@ + + + testing if repeated log shows + + + + + + + diff --git a/cases/create/mixed_cases/mic_man_page.case b/cases/create/mixed_cases/mic_man_page.case new file mode 100644 index 0000000..e0541bf --- /dev/null +++ b/cases/create/mixed_cases/mic_man_page.case @@ -0,0 +1,6 @@ + + check if man page exist for mic + /dev/null +]]> + diff --git a/cases/create/neg_cases/mic_cr_failed_release_log.case b/cases/create/neg_cases/mic_cr_failed_release_log.case new file mode 100644 index 0000000..3e642aa --- /dev/null +++ b/cases/create/neg_cases/mic_cr_failed_release_log.case @@ -0,0 +1,37 @@ + + When image creation failed, the log generated by '--release' should also be located at release dir + + + + >error_no_package.ks< + + diff --git a/cases/create/neg_cases/mic_cr_fs_no_mountpoint.case b/cases/create/neg_cases/mic_cr_fs_no_mountpoint.case new file mode 100644 index 0000000..d3584e1 --- /dev/null +++ b/cases/create/neg_cases/mic_cr_fs_no_mountpoint.case @@ -0,0 +1,25 @@ + + Test the condition that the ks file has no mountpoint. + + + + + + + + + diff --git a/cases/create/neg_cases/mic_cr_loop_compress-image_wrong-format.case b/cases/create/neg_cases/mic_cr_loop_compress-image_wrong-format.case new file mode 100644 index 0000000..c96e1ae --- /dev/null +++ b/cases/create/neg_cases/mic_cr_loop_compress-image_wrong-format.case @@ -0,0 +1,21 @@ + + create loop image with ia32 arch and compress-image option with bz2 + + + + &1 | tee mic.log || true +grep -i "invalid choice.*az4.*" mic.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/neg_cases/negative_command_without_ks_file.case b/cases/create/neg_cases/negative_command_without_ks_file.case new file mode 100644 index 0000000..1341f4a --- /dev/null +++ b/cases/create/neg_cases/negative_command_without_ks_file.case @@ -0,0 +1,17 @@ + + create fs image without ks file + > mic1.log +grep -i 'mic create(cr).*[OPTS]' mic1.log +]]> + + diff --git a/cases/create/neg_cases/negative_error-ks-with-chinese.case b/cases/create/neg_cases/negative_error-ks-with-chinese.case new file mode 100644 index 0000000..ae47f89 --- /dev/null +++ b/cases/create/neg_cases/negative_error-ks-with-chinese.case @@ -0,0 +1,22 @@ + + + create loop image with a ks with Chinese character in it + + + + + + diff --git a/cases/create/neg_cases/negative_error-package-ks.case b/cases/create/neg_cases/negative_error-package-ks.case new file mode 100644 index 0000000..b1b459a --- /dev/null +++ b/cases/create/neg_cases/negative_error-package-ks.case @@ -0,0 +1,20 @@ + + create image with ks file use error package like named 'svn' + + + + + + diff --git a/cases/create/neg_cases/negative_error-repo-ks.case b/cases/create/neg_cases/negative_error-repo-ks.case new file mode 100644 index 0000000..634506e --- /dev/null +++ b/cases/create/neg_cases/negative_error-repo-ks.case @@ -0,0 +1,23 @@ + + create image with error repo or no exsit repo + + + + + + diff --git a/cases/create/neg_cases/negative_error_proxy_conf.case b/cases/create/neg_cases/negative_error_proxy_conf.case new file mode 100644 index 0000000..189a1ed --- /dev/null +++ b/cases/create/neg_cases/negative_error_proxy_conf.case @@ -0,0 +1,21 @@ + + create loop image with custom mic conf, in which the proxy is wrong + + + + + &1 | tee mic1.log) +grep -i "[URLGrabber error|PYCURL ERROR|HTTP Error|couldn't connect]" mic1.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/neg_cases/negative_error_proxy_conf_logfile.case b/cases/create/neg_cases/negative_error_proxy_conf_logfile.case new file mode 100644 index 0000000..696b2f5 --- /dev/null +++ b/cases/create/neg_cases/negative_error_proxy_conf_logfile.case @@ -0,0 +1,24 @@ + + + create loop image with custom mic conf and log file, + in which the proxy is wrong + + + + + + + + diff --git a/cases/create/neg_cases/negative_mic_cr_auto_without_autoline.case b/cases/create/neg_cases/negative_mic_cr_auto_without_autoline.case new file mode 100644 index 0000000..a389f98 --- /dev/null +++ b/cases/create/neg_cases/negative_mic_cr_auto_without_autoline.case @@ -0,0 +1,20 @@ + + create auto image with a ks without the fist auto line + + + + + + diff --git a/cases/create/neg_cases/negative_no-package-ks.case b/cases/create/neg_cases/negative_no-package-ks.case new file mode 100644 index 0000000..7303a89 --- /dev/null +++ b/cases/create/neg_cases/negative_no-package-ks.case @@ -0,0 +1,20 @@ + + create loop image with a ks with no package in it + + + + + + diff --git a/cases/create/neg_cases/negative_no-repo-ks.case b/cases/create/neg_cases/negative_no-repo-ks.case new file mode 100644 index 0000000..53c1c5a --- /dev/null +++ b/cases/create/neg_cases/negative_no-repo-ks.case @@ -0,0 +1,20 @@ + + create loop image with a ks with no repo in it + + + + + + diff --git a/cases/create/neg_cases/negative_non-existed-package.case b/cases/create/neg_cases/negative_non-existed-package.case new file mode 100644 index 0000000..50de88d --- /dev/null +++ b/cases/create/neg_cases/negative_non-existed-package.case @@ -0,0 +1,21 @@ + + when the ks includes a non-existed package,mic exit. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_auto_liveusb.case b/cases/create/opt_cases/mic_cr_auto_liveusb.case new file mode 100644 index 0000000..8f404ed --- /dev/null +++ b/cases/create/opt_cases/mic_cr_auto_liveusb.case @@ -0,0 +1,43 @@ + + test 'mic cr auto ks' for liveusb 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 liveusb --copy-kernel --pack-to=@NAME@-rs.zip -*-mic2-options-*- + + + +import sys +import json +img_file = sys.argv[1] +mic_version = sys.argv[2] +manifest_file=open('mic-output/manifest.json') +manifest=json.load(manifest_file) +assert manifest['format'] == 'liveusb' +assert manifest['version'] == mic_version +assert manifest['liveusb']['pack'] == '.zip' +assert img_file in manifest['liveusb']['image_files'] + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_include-src_ia32.case b/cases/create/opt_cases/mic_cr_fs_include-src_ia32.case new file mode 100644 index 0000000..5a9df02 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_include-src_ia32.case @@ -0,0 +1,26 @@ + + create fs image with ia32 arch and --include-src option + + + + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_include-src_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_include-src_native_ia32.case new file mode 100644 index 0000000..3593ad1 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_include-src_native_ia32.case @@ -0,0 +1,22 @@ + + create fs image with ia32 arch and --include-src option + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_pack-to-tar-bz2_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_pack-to-tar-bz2_native_ia32.case new file mode 100644 index 0000000..1988585 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_pack-to-tar-bz2_native_ia32.case @@ -0,0 +1,26 @@ + + create fs image with arch ia32 and --pack-to is .tar.bz2 in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_pack-to-tar-gz_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_pack-to-tar-gz_native_ia32.case new file mode 100644 index 0000000..9678b69 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_pack-to-tar-gz_native_ia32.case @@ -0,0 +1,26 @@ + + create fs image with arch ia32 and --pack-to is .tar.gz in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_pack-to-tar_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_pack-to-tar_native_ia32.case new file mode 100644 index 0000000..d4f5045 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_pack-to-tar_native_ia32.case @@ -0,0 +1,26 @@ + + create fs image with arch ia32 and --pack-to is .tar in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_pack-to-tbz_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_pack-to-tbz_native_ia32.case new file mode 100644 index 0000000..2696ff0 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_pack-to-tbz_native_ia32.case @@ -0,0 +1,26 @@ + + create fs image with arch ia32 and --pack-to is .tbz in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_pack-to-tgz_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_pack-to-tgz_native_ia32.case new file mode 100644 index 0000000..27eefe9 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_pack-to-tgz_native_ia32.case @@ -0,0 +1,26 @@ + + create fs image with arch ia32 and --pack-to is .tgz in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_record-pkgs-name-content-license-vcs_ia32.case b/cases/create/opt_cases/mic_cr_fs_record-pkgs-name-content-license-vcs_ia32.case new file mode 100644 index 0000000..2ad3b7f --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_record-pkgs-name-content-license-vcs_ia32.case @@ -0,0 +1,29 @@ + + create loop image with ia32 arch and --record-pkgs is name, content, license, vcs + + + + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_record-pkgs-name-content-license-vcs_native_ia32.case b/cases/create/opt_cases/mic_cr_fs_record-pkgs-name-content-license-vcs_native_ia32.case new file mode 100644 index 0000000..034b503 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_record-pkgs-name-content-license-vcs_native_ia32.case @@ -0,0 +1,28 @@ + + create loop image with ia32 arch and --record-pkgs is name, content, license, vcs + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_runtime-bootstrap_ia32.case b/cases/create/opt_cases/mic_cr_fs_runtime-bootstrap_ia32.case new file mode 100644 index 0000000..ff65077 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_runtime-bootstrap_ia32.case @@ -0,0 +1,28 @@ + + create fs image with ia32 arch and --runtime is bootstrap + + + + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_fs_runtime-native_ia32.case b/cases/create/opt_cases/mic_cr_fs_runtime-native_ia32.case new file mode 100644 index 0000000..9f0755f --- /dev/null +++ b/cases/create/opt_cases/mic_cr_fs_runtime-native_ia32.case @@ -0,0 +1,24 @@ + + create fs image with ia32 arch and --runtime is native + + + + + + diff --git a/cases/create/opt_cases/mic_cr_livecd.case b/cases/create/opt_cases/mic_cr_livecd.case new file mode 100644 index 0000000..5e703e6 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_livecd.case @@ -0,0 +1,41 @@ + + create livecd image with ia32 arch + + + +import sys +import json +img_file = sys.argv[1] +mic_version = sys.argv[2] +manifest_file=open('mic-output/manifest.json') +manifest=json.load(manifest_file) +assert manifest['format'] == 'livecd' +assert manifest['version'] == mic_version +assert img_file in manifest['livecd']['image_files'] + + + + + ubuntu14.10 + + + &1 | tee mic1.log +grep 'Finished' mic1.log +test -f ./mic-output/gnome-live-*.iso +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +img_file=$(ls mic-output | grep gnome-live-.*.iso) +mic_version=$(mic --version | awk '{print $2}') +python parse_manifest.py $img_file $mic_version +]]> + + diff --git a/cases/create/opt_cases/mic_cr_liveusb.case b/cases/create/opt_cases/mic_cr_liveusb.case new file mode 100644 index 0000000..f4f7a06 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_liveusb.case @@ -0,0 +1,27 @@ + + create liveusb image with ia32 arch + + + + + + ubuntu14.10 + + + &1 | tee mic1.log +grep 'Finished' mic1.log +test -f ./mic-output/gnome-live-*.usbimg +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_liveusb_copy-kernel_native_ia32.case b/cases/create/opt_cases/mic_cr_liveusb_copy-kernel_native_ia32.case new file mode 100644 index 0000000..a22448a --- /dev/null +++ b/cases/create/opt_cases/mic_cr_liveusb_copy-kernel_native_ia32.case @@ -0,0 +1,28 @@ + + mic create liveusb image with ia32 arch and --copy-kernel in native mode + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/opt_cases/mic_cr_liveusb_pack-to-tar-gz_native.case b/cases/create/opt_cases/mic_cr_liveusb_pack-to-tar-gz_native.case new file mode 100644 index 0000000..d644ba4 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_liveusb_pack-to-tar-gz_native.case @@ -0,0 +1,31 @@ + + create live image and --pack-to is .tar.gz in native mode + + + + + + ubuntu14.10 + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_arc-invalid_ia32.case b/cases/create/opt_cases/mic_cr_loop_arc-invalid_ia32.case new file mode 100644 index 0000000..1a1fbe3 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_arc-invalid_ia32.case @@ -0,0 +1,20 @@ + + This test case is used to test the option "-A",in this case,it is set to i268 which is wrong, the result should fail. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_arc_ia32.case b/cases/create/opt_cases/mic_cr_loop_arc_ia32.case new file mode 100644 index 0000000..b90f600 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_arc_ia32.case @@ -0,0 +1,22 @@ + + This test case is used to test the option "-A",in this case,it is set to i686 as for handset_blackbay.ks. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_arch-vague_ia32.case b/cases/create/opt_cases/mic_cr_loop_arch-vague_ia32.case new file mode 100644 index 0000000..598f696 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_arch-vague_ia32.case @@ -0,0 +1,26 @@ + + create loop image with @ARCH@ is ks file, and run command with -A armv7l + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_cache-current-dir_ia32.case b/cases/create/opt_cases/mic_cr_loop_cache-current-dir_ia32.case new file mode 100644 index 0000000..e542fa0 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_cache-current-dir_ia32.case @@ -0,0 +1,24 @@ + + This test case is used to test the option "-k", which should be set to a directory. + In this test case, the given value of this option is correct,so the result should be correspondently right. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_cache-current-dir_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_cache-current-dir_native_ia32.case new file mode 100644 index 0000000..d5759e1 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_cache-current-dir_native_ia32.case @@ -0,0 +1,41 @@ + + This test case is used to test the option "-k", which should be set to a directory, and when run the same command more then one times, it should use the cached download packages instead of downloading again unless you specified '--nocache' for repos in kickstart files. In this case we tested the case when cache directory is in the current direcroty, 'yum' as backend, and native mode. + +And if run the same ks with the same cache, it shouldn't download packages again + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_cache-root-dir_ia32.case b/cases/create/opt_cases/mic_cr_loop_cache-root-dir_ia32.case new file mode 100644 index 0000000..4a00b5b --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_cache-root-dir_ia32.case @@ -0,0 +1,40 @@ + + + This test case is used to test the option "-k", which should be set to a + directory, and when run the same command more then one times, it should + use the cached download packages instead of downloading again unless you + specified '--nocache' for repos in kickstart files. In this case we tested + the case when cache directory is specified to root direcroty(because mic + forgot to mount cache directory in bootstrap mode before), 'zypp' as + backend, and bootstrap mode + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_cache-root-dir_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_cache-root-dir_native_ia32.case new file mode 100644 index 0000000..2b09f63 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_cache-root-dir_native_ia32.case @@ -0,0 +1,45 @@ + + + This test case is used to test the option "-k", which should be set to a + directory, and when run the same command more then one times, it should + use the cached download packages instead of downloading again unless you + specified '--nocache' for repos in kickstart files. In this case we tested + the case when cache directory is specified to root direcroty(because mic + forgot to mount cache directory in bootstrap mode before), 'zypp' as + backend, and native mode + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_compress-image-bz2_ia32.case b/cases/create/opt_cases/mic_cr_loop_compress-image-bz2_ia32.case new file mode 100644 index 0000000..0898809 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_compress-image-bz2_ia32.case @@ -0,0 +1,36 @@ + + create loop image with ia32 arch and compress-image option with bz2 + + + + + cpmpress_volume)?"yes":"no"}'` +test $result = 'yes' +cd out2 +sudo bunzip2 platform.img.bz2 +test -f platform.img +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_compress-image-gz_ia32.case b/cases/create/opt_cases/mic_cr_loop_compress-image-gz_ia32.case new file mode 100644 index 0000000..e016021 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_compress-image-gz_ia32.case @@ -0,0 +1,36 @@ + + create loop image with ia32 arch and compress-image option with gz + + + + + cpmpress_volume)?"yes":"no"}'` +test $result = 'yes' +cd out2 +sudo gunzip platform.img.gz +test -f platform.img +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_compress-image-invalid_ia32.case b/cases/create/opt_cases/mic_cr_loop_compress-image-invalid_ia32.case new file mode 100644 index 0000000..3dbe3ab --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_compress-image-invalid_ia32.case @@ -0,0 +1,20 @@ + + create loop image with ia32 arch and compress-image option with invalid option, like zip + + + + &1 | tee mic2.log) +grep -E "compress-image: invalid choice: 'zip'" mic2.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_compress-image-lzo_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_compress-image-lzo_native_ia32.case new file mode 100644 index 0000000..eb3b5d5 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_compress-image-lzo_native_ia32.case @@ -0,0 +1,36 @@ + + create loop image with ia32 arch and compress-image option with lzo + + + + + compress_volume)?"yes":"no"}'` +test $result = 'yes' +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_conf_ia32.case b/cases/create/opt_cases/mic_cr_loop_conf_ia32.case new file mode 100644 index 0000000..a006fa3 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_conf_ia32.case @@ -0,0 +1,24 @@ + + This test case is used to test the option "--config", + a mic config file name is given to this option,the image will created according to the configurations that is set in the file mic.conf. + In this test case, the 'mic.conf' is copied from the default mic.conf which locates at "/etc/mic/" with modifying the "--outdir". + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_conf_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_conf_native_ia32.case new file mode 100644 index 0000000..6a47e30 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_conf_native_ia32.case @@ -0,0 +1,25 @@ + + This test case is used to test the option "--config", + a mic config file name is given to this option,the image will created according to the configurations that is set in the file mic.conf. + In this test case, the 'mic.conf' is copied from the default mic.conf which locates at "/etc/mic/" with modifying the "runtime=native". + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_copy-kernel_ia32.case b/cases/create/opt_cases/mic_cr_loop_copy-kernel_ia32.case new file mode 100644 index 0000000..32ff428 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_copy-kernel_ia32.case @@ -0,0 +1,23 @@ + + mic create loop image with ia32 arch and --copy-kernel + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_debug_ia32.case b/cases/create/opt_cases/mic_cr_loop_debug_ia32.case new file mode 100644 index 0000000..1951c52 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_debug_ia32.case @@ -0,0 +1,27 @@ + + create loop image with armv7l arch and -d -v option + + + + &1 | tee mic1.log +grep -i 'Finished' mic1.log +grep -i 'Debug' mic1.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +grep -i 'Verbose' mic1.log +test -f ./out1/platform.img +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_interactive_ia32.case b/cases/create/opt_cases/mic_cr_loop_interactive_ia32.case new file mode 100644 index 0000000..0893498 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_interactive_ia32.case @@ -0,0 +1,30 @@ + + Test option "--interactive" ,"--non-interactive" + + + + &1 >> tmp.log" << EOF +n +EOF +grep ".* \[y/n](y): INFO" tmp.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq + +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_local-pkg-path_ia32.case b/cases/create/opt_cases/mic_cr_loop_local-pkg-path_ia32.case new file mode 100644 index 0000000..2f01a1c --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_local-pkg-path_ia32.case @@ -0,0 +1,29 @@ + + Test "--local-pkg-path". + + + + + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_local-pkg-path_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_local-pkg-path_native_ia32.case new file mode 100644 index 0000000..0c0e80a --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_local-pkg-path_native_ia32.case @@ -0,0 +1,25 @@ + + Test "--local-pkg-path". + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_logfile-current-dir_ia32.case b/cases/create/opt_cases/mic_cr_loop_logfile-current-dir_ia32.case new file mode 100644 index 0000000..3684e50 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_logfile-current-dir_ia32.case @@ -0,0 +1,29 @@ + + + This is a negative test, which is used to test the option "--logfile", this + option should be set to a file name, in this test case, we set it to a + directory name , so error info "Error usage:logfile.* path ./log_dir should + be file,please use .* for more info" should turn up. + + + + + &1 | tee mic.log ) +grep -i "./log_dir should be file" mic.log +grep "$hostname" mic.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_logfile-current-file_ia32.case b/cases/create/opt_cases/mic_cr_loop_logfile-current-file_ia32.case new file mode 100644 index 0000000..b390a84 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_logfile-current-file_ia32.case @@ -0,0 +1,28 @@ + + 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 currently. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_logfile-current-file_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_logfile-current-file_native_ia32.case new file mode 100644 index 0000000..3f43127 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_logfile-current-file_native_ia32.case @@ -0,0 +1,28 @@ + + 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. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_logfile-root-file_ia32.case b/cases/create/opt_cases/mic_cr_loop_logfile-root-file_ia32.case new file mode 100644 index 0000000..9589c5f --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_logfile-root-file_ia32.case @@ -0,0 +1,26 @@ + + Test "--logfile" option. + + + + > mic.log +grep "Finished" mic.log +sudo test -e /root/log_file +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +sudo egrep "$hostname" /root/log_file +sudo egrep 'mic [0-9]{1,2}\.[0-9]+' /root/log_file +sudo test -e ./mic-output/platform.img +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_outdir-current-dir_ia32.case b/cases/create/opt_cases/mic_cr_loop_outdir-current-dir_ia32.case new file mode 100644 index 0000000..53e902e --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_outdir-current-dir_ia32.case @@ -0,0 +1,23 @@ + + This test case is used to test the option "--outdir", +it can be set to an existed directory and also can be set to an unexisted directory which will be generated in the command execution process. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_outdir-current-dir_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_outdir-current-dir_native_ia32.case new file mode 100644 index 0000000..79da8b2 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_outdir-current-dir_native_ia32.case @@ -0,0 +1,23 @@ + + This test case is used to test the option "--outdir", +it can be set to an existed directory and also can be set to an unexisted directory which will be generated in the command execution process. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_outdir-root-dir_ia32.case b/cases/create/opt_cases/mic_cr_loop_outdir-root-dir_ia32.case new file mode 100644 index 0000000..95e35e3 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_outdir-root-dir_ia32.case @@ -0,0 +1,22 @@ + + This test case is used to test the option "--outdir",in this case, +a subdirectory under /root is given to it, related images should can be found under the given directory. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_outdir-root-dir_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_outdir-root-dir_native_ia32.case new file mode 100644 index 0000000..b127fe2 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_outdir-root-dir_native_ia32.case @@ -0,0 +1,25 @@ + + This test case is used to test the option "--outdir",in this case, +a subdirectory under /root is given to it, related images should can be found under the given directory. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-Invalid_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-Invalid_ia32.case new file mode 100644 index 0000000..c273856 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-Invalid_ia32.case @@ -0,0 +1,24 @@ + + create loop image with arch ia32 and --pack-to is .bz2 + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz2_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz2_ia32.case new file mode 100644 index 0000000..dcd6c07 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz2_ia32.case @@ -0,0 +1,25 @@ + + create loop image with arch ia32 and --pack-to is .tar.bz2 + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz2_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz2_native_ia32.case new file mode 100644 index 0000000..b762894 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz2_native_ia32.case @@ -0,0 +1,29 @@ + + create loop image with arch ia32 and --pack-to is .tar.bz2 in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz_ia32.case new file mode 100644 index 0000000..e5a1d1f --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-bz_ia32.case @@ -0,0 +1,25 @@ + + create loop image with arch ia32 and --pack-to is .tar.bz2 + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar-gz_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-gz_ia32.case new file mode 100644 index 0000000..3234c9f --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-gz_ia32.case @@ -0,0 +1,25 @@ + + create loop image with arch ia32 and --pack-to is .tar.gz + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar-gz_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-gz_native_ia32.case new file mode 100644 index 0000000..e650624 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-gz_native_ia32.case @@ -0,0 +1,29 @@ + + create loop image with arch ia32 and --pack-to is .tar.gz in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar-lzo_native.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-lzo_native.case new file mode 100644 index 0000000..b5287fe --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar-lzo_native.case @@ -0,0 +1,32 @@ + + create loop image with arch ia32 and --pack-to is .tar.lzo, + for now, only support lzop format in native mode + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar_ia32.case new file mode 100644 index 0000000..b3a4822 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar_ia32.case @@ -0,0 +1,24 @@ + + create loop image with arch ia32 and --pack-to is @NAME@ + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tar_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tar_native_ia32.case new file mode 100644 index 0000000..6377871 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tar_native_ia32.case @@ -0,0 +1,28 @@ + + create loop image with arch ia32 and --pack-to is @NAME@ in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-taz.case b/cases/create/opt_cases/mic_cr_loop_pack-to-taz.case new file mode 100644 index 0000000..c5a574a --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-taz.case @@ -0,0 +1,27 @@ + + create loop image with arch ia32 and --pack-to is .taz + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tbz2_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tbz2_ia32.case new file mode 100644 index 0000000..102864c --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tbz2_ia32.case @@ -0,0 +1,25 @@ + + create loop image with arch ia32 and --pack-to is .tbz2 + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tbz_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tbz_ia32.case new file mode 100644 index 0000000..8553fa4 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tbz_ia32.case @@ -0,0 +1,25 @@ + + create loop image with arch ia32 and --pack-to is .tbz + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tgz.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tgz.case new file mode 100644 index 0000000..8cbb01e --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tgz.case @@ -0,0 +1,27 @@ + + create loop image with arch ia32 and --pack-to is .tgz + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-tzo_native.case b/cases/create/opt_cases/mic_cr_loop_pack-to-tzo_native.case new file mode 100644 index 0000000..181dbd5 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-tzo_native.case @@ -0,0 +1,30 @@ + + create loop image with arch ia32 and --pack-to is .tzo + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-zip_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-zip_ia32.case new file mode 100644 index 0000000..0cad277 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-zip_ia32.case @@ -0,0 +1,27 @@ + + create loop image with arch ia32 and --pack-to is .zip + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pack-to-zip_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_pack-to-zip_native_ia32.case new file mode 100644 index 0000000..d3b3bff --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pack-to-zip_native_ia32.case @@ -0,0 +1,29 @@ + + create loop image with arch ia32 and --pack-to is .zip in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pkgmgr-Invalid_ia32.case b/cases/create/opt_cases/mic_cr_loop_pkgmgr-Invalid_ia32.case new file mode 100644 index 0000000..b6b76d4 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pkgmgr-Invalid_ia32.case @@ -0,0 +1,21 @@ + + create loop image with invalid pkgmgr option + + + + &1 | tee mic.log) +grep -i "Can't find backend: None" mic.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_pkgmgr-yum_ia32.case b/cases/create/opt_cases/mic_cr_loop_pkgmgr-yum_ia32.case new file mode 100644 index 0000000..3d0f69d --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pkgmgr-yum_ia32.case @@ -0,0 +1,21 @@ + + create loop image with pkgmgr is yum + + + + &1 | tee mic.log) +grep -i "Can't find backend: yum" mic.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_pkgmgr-zypp_ia32.case b/cases/create/opt_cases/mic_cr_loop_pkgmgr-zypp_ia32.case new file mode 100644 index 0000000..7791d36 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pkgmgr-zypp_ia32.case @@ -0,0 +1,22 @@ + + create loop image with ia32 arch and zypp pkgmgr + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_pkgmgr-zypp_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_pkgmgr-zypp_native_ia32.case new file mode 100644 index 0000000..79148b9 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_pkgmgr-zypp_native_ia32.case @@ -0,0 +1,25 @@ + + create loop image with ia32 arch and zypp pkgmgr + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_record-pkgs-Invalid_ia32.case b/cases/create/opt_cases/mic_cr_loop_record-pkgs-Invalid_ia32.case new file mode 100644 index 0000000..17410be --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_record-pkgs-Invalid_ia32.case @@ -0,0 +1,21 @@ + + create loop image with invalid --record-pkgs option + + + + &1 | tee mic.log) +grep -i 'Invalid pkg recording: propery' mic.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_record-pkgs-name-content-license-vcs_ia32.case b/cases/create/opt_cases/mic_cr_loop_record-pkgs-name-content-license-vcs_ia32.case new file mode 100644 index 0000000..bd9bc35 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_record-pkgs-name-content-license-vcs_ia32.case @@ -0,0 +1,27 @@ + + create loop image with ia32 arch and --record-pkgs is name, content, license, vcs + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_record-pkgs-name-content-license-vcs_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_record-pkgs-name-content-license-vcs_native_ia32.case new file mode 100644 index 0000000..0ba103a --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_record-pkgs-name-content-license-vcs_native_ia32.case @@ -0,0 +1,28 @@ + + create loop image with ia32 arch and --record-pkgs is name, content, license, vcs + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_release_check_log_completeness.case b/cases/create/opt_cases/mic_cr_loop_release_check_log_completeness.case new file mode 100644 index 0000000..dc69ca5 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_release_check_log_completeness.case @@ -0,0 +1,32 @@ + + This test case is used to test the option "--release", +find a version number which contains existed images in the repo specified in handset_blackbay.ks, +then test whether image will generate correspondently. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_release_ia32.case b/cases/create/opt_cases/mic_cr_loop_release_ia32.case new file mode 100644 index 0000000..0ed454e --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_release_ia32.case @@ -0,0 +1,27 @@ + + This test case is used to test the option "--release", +find a version number which contains existed images in the repo specified in handset_blackbay.ks, +then test whether image will generate correspondently. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_release_latest_ia32.case b/cases/create/opt_cases/mic_cr_loop_release_latest_ia32.case new file mode 100644 index 0000000..6253192 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_release_latest_ia32.case @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_release_native_ia32.case b/cases/create/opt_cases/mic_cr_loop_release_native_ia32.case new file mode 100644 index 0000000..6e90315 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_release_native_ia32.case @@ -0,0 +1,29 @@ + + This test case is used to test the option "--release", +find a version number which contains existed images in the repo specified in handset_blackbay.ks, +then test whether image will generate correspondently. + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_repo_ia32.case b/cases/create/opt_cases/mic_cr_loop_repo_ia32.case new file mode 100644 index 0000000..767430b --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_repo_ia32.case @@ -0,0 +1,35 @@ + + 1.0 + Test option "--repo" and "--ignore-ksrepo" + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_runtime-Invalid_ia32.case b/cases/create/opt_cases/mic_cr_loop_runtime-Invalid_ia32.case new file mode 100644 index 0000000..bb525ea --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_runtime-Invalid_ia32.case @@ -0,0 +1,21 @@ + + create mic with invalid runtime option + + + + &1 | tee mic.log) +grep -i "Invalid runtime mode: invalid" mic.log +sudo $losetup_path -a +sudo $losetup_path -a | wc -l | xargs test 0 -eq +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_runtime-bootstrap_ia32.case b/cases/create/opt_cases/mic_cr_loop_runtime-bootstrap_ia32.case new file mode 100644 index 0000000..4f7dbb9 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_runtime-bootstrap_ia32.case @@ -0,0 +1,25 @@ + + create loop image with ia32 arch and --runtime is bootstrap + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_runtime-native_ia32.case b/cases/create/opt_cases/mic_cr_loop_runtime-native_ia32.case new file mode 100644 index 0000000..3bed58b --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_runtime-native_ia32.case @@ -0,0 +1,23 @@ + + create loop image with ia32 arch and native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_loop_shrink_ia32.case b/cases/create/opt_cases/mic_cr_loop_shrink_ia32.case new file mode 100644 index 0000000..c9f968e --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_shrink_ia32.case @@ -0,0 +1,33 @@ + + create loop image with ia32 arch and shrink option + + + + + cpmpress_volume)?"yes":"no"}'` +test $result = 'yes' +]]> + + diff --git a/cases/create/opt_cases/mic_cr_loop_tmpfs.case b/cases/create/opt_cases/mic_cr_loop_tmpfs.case new file mode 100644 index 0000000..a254e58 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_loop_tmpfs.case @@ -0,0 +1,22 @@ + + Test option "--tmpfs", + + + + + + diff --git a/cases/create/opt_cases/mic_cr_proxy_in_custom_conf.case b/cases/create/opt_cases/mic_cr_proxy_in_custom_conf.case new file mode 100644 index 0000000..0e43782 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_proxy_in_custom_conf.case @@ -0,0 +1,43 @@ + + 1.0 + test proxy in custom config file + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_proxy_in_terminal.case b/cases/create/opt_cases/mic_cr_proxy_in_terminal.case new file mode 100644 index 0000000..1d69d1d --- /dev/null +++ b/cases/create/opt_cases/mic_cr_proxy_in_terminal.case @@ -0,0 +1,43 @@ + + 1.0 + test proxy in terminal + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_qcow_logfile-current-file_ia32.case b/cases/create/opt_cases/mic_cr_qcow_logfile-current-file_ia32.case new file mode 100644 index 0000000..3d13ff4 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_qcow_logfile-current-file_ia32.case @@ -0,0 +1,31 @@ + + Test '--logfile' option of 'qcow' format image + + + + + + 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 new file mode 100644 index 0000000..83866bb --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_compress-image-bz2_ia32.case @@ -0,0 +1,43 @@ + + create raw image with ia32 arch and compress-image option with bz2 + + + + + cpmpress_volume)?"yes":"no"}'` +test $result = 'yes' +sudo bunzip2 $name2 +raw_name=`ls ivi*.raw` +test -f $raw_name +]]> + + 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 new file mode 100644 index 0000000..e1306f8 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_compress-image-gz_ia32.case @@ -0,0 +1,39 @@ + + create raw image with ia32 arch and compress-image option with gz + + + + + cpmpress_volume)?"yes":"no"}'` +test $result = 'yes' +sudo gunzip $name2 +raw_name=`ls ivi*.raw` +test -f $name +]]> + + 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 new file mode 100644 index 0000000..24893be --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_compress-image-invalid_ia32.case @@ -0,0 +1,21 @@ + + create raw image with ia32 arch and compress-image option with invalid option, like zip + + + + &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 +]]> + + diff --git a/cases/create/opt_cases/mic_cr_raw_compress-image-lzo_native_ia32.case b/cases/create/opt_cases/mic_cr_raw_compress-image-lzo_native_ia32.case new file mode 100644 index 0000000..294d439 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_compress-image-lzo_native_ia32.case @@ -0,0 +1,42 @@ + + create raw image with ia32 arch and compress-image option with lzo + + + + + compress_volume)?"yes":"no"}'` +test $result = 'yes' +sudo lzop -x $name2 +raw_name=`ls ivi*.raw` +test -e $name +]]> + + 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 new file mode 100644 index 0000000..1371bc8 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_fstab-entry-name.case @@ -0,0 +1,59 @@ + + This test case is used to test the option "--fstab-entry=name", + + + + + + 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 new file mode 100644 index 0000000..ea249f5 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_fstab-entry-uuid.case @@ -0,0 +1,60 @@ + + This test case is used to test the option "--fstab-entry=uuid", + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_fstab-name_gpt_native_ia32.case b/cases/create/opt_cases/mic_cr_raw_fstab-name_gpt_native_ia32.case new file mode 100644 index 0000000..f6ee435 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_fstab-name_gpt_native_ia32.case @@ -0,0 +1,25 @@ + + create raw image with ia32 arch and --fstab-entry=name option in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_fstab-name_native.case b/cases/create/opt_cases/mic_cr_raw_fstab-name_native.case new file mode 100644 index 0000000..e9b065d --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_fstab-name_native.case @@ -0,0 +1,25 @@ + + create raw image with x86_64 arch and --fstab-entry=name option in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_fstab-uuid_gpt_native_ia32.case b/cases/create/opt_cases/mic_cr_raw_fstab-uuid_gpt_native_ia32.case new file mode 100644 index 0000000..c5fc22a --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_fstab-uuid_gpt_native_ia32.case @@ -0,0 +1,25 @@ + + create raw image with ia32 arch and --fstab=uuid option in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_fstab-uuid_native.case b/cases/create/opt_cases/mic_cr_raw_fstab-uuid_native.case new file mode 100644 index 0000000..3fd911e --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_fstab-uuid_native.case @@ -0,0 +1,25 @@ + + create raw image with x86_64 arch and --fstab=uuid option in native mode + + + + + + 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 new file mode 100644 index 0000000..26770ce --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32.case @@ -0,0 +1,23 @@ + + create loop image with ia32 arch and shrink option + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32_native.case b/cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32_native.case new file mode 100644 index 0000000..4a53cd3 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_generate-bmap_ia32_native.case @@ -0,0 +1,23 @@ + + create raw image with ia32 arch and '--generate-bmap' option in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_install-pkgs_native_ia32.case b/cases/create/opt_cases/mic_cr_raw_install-pkgs_native_ia32.case new file mode 100644 index 0000000..e588dcd --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_install-pkgs_native_ia32.case @@ -0,0 +1,74 @@ + + create raw image with ia32 arch and "--install-pkgs" '--runtime=native' option + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_native_conf_proxy.case b/cases/create/opt_cases/mic_cr_raw_native_conf_proxy.case new file mode 100644 index 0000000..55036cc --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_native_conf_proxy.case @@ -0,0 +1,26 @@ + + 1.0 + This test case is used to test the option "--config",a mic config file name is given to this option,the image will created according to the configurations that is set in the file mic.conf.In this test case, the 'mic.conf' is copied from the default mic.conf which locates at "/etc/mic/" with modifying the "proxy". + + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_pack-to-tar-gz_native_ia32.case b/cases/create/opt_cases/mic_cr_raw_pack-to-tar-gz_native_ia32.case new file mode 100644 index 0000000..1dfbb5e --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_pack-to-tar-gz_native_ia32.case @@ -0,0 +1,29 @@ + + create raw image with arch ia32 and --pack-to is .tar.gz in native mode + + + + + + diff --git a/cases/create/opt_cases/mic_cr_raw_proxy_with_authentication.case b/cases/create/opt_cases/mic_cr_raw_proxy_with_authentication.case new file mode 100644 index 0000000..8a49722 --- /dev/null +++ b/cases/create/opt_cases/mic_cr_raw_proxy_with_authentication.case @@ -0,0 +1,43 @@ + + 1.0 + test proxy in custom config file + + + + + + + diff --git a/coveragerc b/coveragerc new file mode 100644 index 0000000..55151b2 --- /dev/null +++ b/coveragerc @@ -0,0 +1,3 @@ +[run] +source = mic + /usr/lib/mic/plugins diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..1433cb9 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +itest-cases-mic (0.1) unstable; urgency=high + * Release to 0.1, which contains the following features: + * add one case to itest-cases-mic + + -- Huang Hao Wed, 26 Sep 2013 11:45:08 +0800 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7f8f011 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +7 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..d30d964 --- /dev/null +++ b/debian/control @@ -0,0 +1,12 @@ +Source: itest-cases-mic +Section: devel +Priority: extra +Maintainer: Huanhuan Li +Standards-Version: 1.0 +Homepage: http://www.tizen.org +Build-Depends: debhelper (>= 4.0.0) + +Package: itest-cases-mic +Architecture: all +Depends: zip, createrepo, tar, man-db +Description: Cases for mic functional testing diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..1c2c739 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,7 @@ +Upstream Authors: + + Intel Inc. + +Copyright: + + Copyright (C) 2012 Intel Inc. diff --git a/debian/rules b/debian/rules new file mode 100644 index 0000000..708f0e2 --- /dev/null +++ b/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +%: + dh $@ + +override_dh_auto_install: + make PREFIX=debian/itest-cases-mic install diff --git a/fixtures/conf/mic.conf b/fixtures/conf/mic.conf new file mode 100644 index 0000000..a0d75b1 --- /dev/null +++ b/fixtures/conf/mic.conf @@ -0,0 +1,35 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./my_mic-output +runtime=bootstrap + +pkgmgr = auto + +# to set global proxy for repos +#proxy = http://proxy.yourcompany.com:8080/ +#no_proxy = localhost,127.0.0.0/8,.yourcompany.com + +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +rootdir=/var/tmp/mic-bootstrap +packages=mic-bootstrap-x86-arm + diff --git a/fixtures/conf/mic_error.conf b/fixtures/conf/mic_error.conf new file mode 100644 index 0000000..6a4a8b1 --- /dev/null +++ b/fixtures/conf/mic_error.conf @@ -0,0 +1,35 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output +runtime=bootstrap + +pkgmgr = auto + +# to set global proxy for repos +proxy = http://proxy.yourcompany.com:8080/ +no_proxy = localhost,127.0.0.0/8,.yourcompany.com + +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +rootdir=/var/tmp/mic-bootstrap +packages=mic-bootstrap-x86-arm + diff --git a/fixtures/conf/mic_native.conf b/fixtures/conf/mic_native.conf new file mode 100644 index 0000000..b6ecb23 --- /dev/null +++ b/fixtures/conf/mic_native.conf @@ -0,0 +1,35 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output +runtime=native + +pkgmgr = auto + +# to set global proxy for repos +#proxy = http://proxy.yourcompany.com:8080/ +#no_proxy = localhost,127.0.0.0/8,.yourcompany.com + +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +#rootdir=/var/tmp/mic-bootstrap +rootdir = /mount/tmp/mic/bootstrap +packages=mic-bootstrap-x86-arm diff --git a/fixtures/conf/mic_prefix.conf b/fixtures/conf/mic_prefix.conf new file mode 100644 index 0000000..d32691d --- /dev/null +++ b/fixtures/conf/mic_prefix.conf @@ -0,0 +1,35 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output + +pkgmgr = auto + +# to set global proxy for repos +#proxy = http://proxy01.cd.intel.com:911 +#no_proxy = localhost,127.0.0.0/8,.intel.com + +# prefix will be added in front of generated files +name_prefix = prefix + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +#rootdir=/var/tmp/mic-bootstrap +rootdir = /mount/tmp/mic/bootstrap +packages=mic-bootstrap-x86-arm + diff --git a/fixtures/conf/mic_proxy.conf b/fixtures/conf/mic_proxy.conf new file mode 100644 index 0000000..e656def --- /dev/null +++ b/fixtures/conf/mic_proxy.conf @@ -0,0 +1,35 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output + +pkgmgr = auto + +# to set global proxy for repos +proxy = http://proxy-mu.intel.com:911 +no_proxy = .intel.com + +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +#rootdir=/var/tmp/mic-bootstrap +rootdir = /mount/tmp/mic/bootstrap +packages=mic-bootstrap-x86-arm + diff --git a/fixtures/conf/mic_proxy_with_authentication.conf b/fixtures/conf/mic_proxy_with_authentication.conf new file mode 100644 index 0000000..cb5f92a --- /dev/null +++ b/fixtures/conf/mic_proxy_with_authentication.conf @@ -0,0 +1,34 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output + +pkgmgr = auto + +# to set global proxy for repos +proxy = http://inteluser:somepasswd@proxy-mu.intel.com:911 +no_proxy = localhost,127.0.0.0/8,.intel.com + +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +#rootdir=/var/tmp/mic-bootstrap +rootdir = /mount/tmp/mic/bootstrap +packages=mic-bootstrap-x86-arm diff --git a/fixtures/conf/no_proxy_on.conf b/fixtures/conf/no_proxy_on.conf new file mode 100644 index 0000000..2f9a5b0 --- /dev/null +++ b/fixtures/conf/no_proxy_on.conf @@ -0,0 +1,34 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output +runtime=bootstrap + +pkgmgr = auto + +# to set global proxy for repos +#proxy = http://proxy.yourcompany.com:8080/ +#no_proxy = localhost,127.0.0.0/8,.yourcompany.com +no_proxy = localhost,127.0.0.1,.intel.com +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +rootdir=/var/tmp/mic-bootstrap +packages=mic-bootstrap-x86-arm diff --git a/fixtures/conf/proxy_on.conf b/fixtures/conf/proxy_on.conf new file mode 100644 index 0000000..c316153 --- /dev/null +++ b/fixtures/conf/proxy_on.conf @@ -0,0 +1,34 @@ +[common] +; general settings +distro_name = Tizen + +plugin_dir = /usr/lib/mic/plugins + +[create] +; settings for create subcommand +tmpdir= /var/tmp/mic +cachedir= /var/tmp/mic/cache +outdir= ./mic-output + +pkgmgr = auto + +# to set global proxy for repos +proxy = http://proxy01.cd.intel.com:911 +#no_proxy = localhost,127.0.0.0/8,.intel.com + +# prefix will be added in front of generated files +#name_prefix = output + +# to skip all ssl verification for repos +#ssl_verify = no + +[convert] +; settings for convert subcommand + +[chroot] +; settings for chroot subcommand + +[bootstrap] +#rootdir=/var/tmp/mic-bootstrap +rootdir = /mount/tmp/mic/bootstrap +packages=mic-bootstrap-x86-arm diff --git a/fixtures/conf/sysconfig_proxy b/fixtures/conf/sysconfig_proxy new file mode 100644 index 0000000..93d7a0d --- /dev/null +++ b/fixtures/conf/sysconfig_proxy @@ -0,0 +1,51 @@ +## Path: Network/Proxy +## Description: +## Type: yesno +## Default: no +## Config: kde,profiles +# +# Enable a generation of the proxy settings to the profile. +# This setting allows to turn the proxy on and off while +# preserving the particular proxy setup. +# +PROXY_ENABLED="yes" + +## Type: string +## Default: "" +# +# Some programs (e.g. lynx, arena and wget) support proxies, if set in +# the environment. SuSEconfig can add these environment variables to +# /etc/SuSEconfig/* (sourced by /etc/profile etc.) - +# See http://portal.suse.com/sdb/en/1998/01/lynx_proxy.html for more details. +# Example: HTTP_PROXY="http://proxy.provider.de:3128/" +HTTP_PROXY="http://proxy01.cd.intel.com:911" + +## Type: string +## Default: "" +# +# Some programs (e.g. lynx, arena and wget) support proxies, if set in +# the environment. SuSEconfig can add these environment variables to +# /etc/SuSEconfig/* (sourced by /etc/profile etc.) - +# this setting is for https connections +HTTPS_PROXY="" + +## Type: string +## Default: "" +# +# Example: FTP_PROXY="http://proxy.provider.de:3128/" +# +FTP_PROXY="" + +## Type: string +## Default: "" +# +# Example: GOPHER_PROXY="http://proxy.provider.de:3128/" +# +GOPHER_PROXY="" + +## Type: string(localhost) +## Default: localhost +# +# Example: NO_PROXY="www.me.de, do.main, localhost" +# +NO_PROXY="localhost, 127.0.0.1" diff --git a/fixtures/ks_files/RD-PQ.ks b/fixtures/ks_files/RD-PQ.ks new file mode 100644 index 0000000..7b754ca --- /dev/null +++ b/fixtures/ks_files/RD-PQ.ks @@ -0,0 +1,51 @@ +# -*-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 America/Los_Angeles +# ROOT fs partition +part / --size=3000 --ondisk mmcblk0p --fstype=ext4 --label=platform +# DATA partition +part /opt/ --size=3000 --ondisk mmcblk0p --fstype=ext4 --label=data +# UMS partition +part /opt/usr/ --size=3000 --ondisk mmcblk0p --fstype=ext4 --label=ums + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=root +user --name root --groups audio,video --password '' + + +repo --name=mobile --baseurl=http://linux-ftp.fi.intel.com/repo/tizen/snapshots/tizen/rd-pq/tizen_20131219.9/repos/mobile/armv7l/packages/ --save --ssl_verify=no + +%packages + +coreutils +bash +tzdata + + +%end + +%post +# Bug: https://bugs.tizen.org/jira/browse/TDIST-266 +pkg_initdb + +# Bug: https://bugs.tizen.org/jira/browse/TDIST-260 +INITDB=1 ail_initdb + +# Bug: https://bugs.tizen.org/jira/browse/PTREL-137 +echo "DISPLAY=:0" >> /etc/sysconfig/preload + + +%end + +%post --nochroot + +%end diff --git a/fixtures/ks_files/arm64.ks b/fixtures/ks_files/arm64.ks new file mode 100644 index 0000000..07ed7b3 --- /dev/null +++ b/fixtures/ks_files/arm64.ks @@ -0,0 +1,21 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@.tar.gz -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +# Partitions: size unit is MB +part /boot --size=64 --ondisk mmcblk0p --fstype=ext4 --label=boot +part / --size=256 --ondisk mmcblk0p --fstype=ext4 --label=platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=root +user --name root --groups audio,video --password '' + +repo --name=Tizen-main --baseurl=http://linux-ftp.fi.intel.com/repo/aarch64/ --save --gpgkey=0 --ssl_verify=no + +%packages +filesystem +%end diff --git a/fixtures/ks_files/armv7l.ks b/fixtures/ks_files/armv7l.ks new file mode 100644 index 0000000..2ae4f50 --- /dev/null +++ b/fixtures/ks_files/armv7l.ks @@ -0,0 +1,45 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@.tar.gz -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +# Partitions: size unit is MB +part /boot --size=64 --ondisk mmcblk0p --fstype=ext4 --label=boot +part / --size=256 --ondisk mmcblk0p --fstype=ext4 --label=platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=root +user --name root --groups audio,video --password '' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-base/armv7l/packages/ --save --gpgkey=0 --ssl_verify=no +repo --name=Tizen-main --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/armv7l/packages/ --save --gpgkey=0 --ssl_verify=no +repo --name=Tizen-base-source --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/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://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/source/ --save --source --gpgkey=0 --ssl_verify=no + +%packages +shadow-utils +kernel* +coreutils +bash +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +# Set environment for launchpad daemon. Fix TDIST-264 +cat > /etc/sysconfig/launchpad < /etc/sysconfig/launchpad <>/lib/systemd/user/default.target +[Unit] +Description=User session default target +EOF +mkdir -p /lib/systemd/user/default.target.wants + +# start dbus session +ln -s ../dbus.service /lib/systemd/user/default.target.wants/ + +# Run prelink to speed up dynamic binary/library loading +/usr/sbin/prelink --all + +ln -sf /proc/self/mounts /etc/mtab + +# sdx: fix smack labels on /var/log +chsmack -a '*' /var/log + +# workaround for bug PTREL-763 +patch -b -p1 -d/ <<'EOF' +--- bad/etc/pam.d/systemd-user 2014-03-20 10:01:36.657843073 +0100 ++++ good/etc/pam.d/systemd-user 2014-03-20 10:06:51.586121696 +0100 +@@ -4,5 +4,6 @@ + + account include system-auth + session include system-auth ++session required pam_systemd.so + auth required pam_deny.so + password required pam_deny.so +EOF + +# create appfw dirs inside homes +function generic_base_user_exists() { + user=$1 + getent passwd | grep -q ^${user}: +} + +function generic_base_user_home() { + user=$1 + getent passwd | grep ^${user}: | cut -f6 -d':' +} + +function generic_base_fix_user_homedir() { + user=$1 + generic_base_user_exists $user || return 1 + + homedir=$(generic_base_user_home $user) + mkdir -p $homedir/apps_rw + for appdir in desktop manifest dbspace; do + mkdir -p $homedir/.applications/$appdir + done + find $homedir -type d -exec chsmack -a User {} \; + chown -R $user:users $homedir + return 0 +} + +# fix TC-320 for SDK +. /etc/tizen-build.conf +[ "${TZ_BUILD_WITH_EMULATOR}" == "1" ] && generic_base_fix_user_homedir developer + +#!/bin/sh +echo "############### common-base.post ################" + +######### multiuser mode: create additional users and fix their homedirs +tizen_crypted_pass=$(perl -e 'print crypt("tizen", "aa")') +uid=5001 + +for user in alice bob carol guest; do + if ! generic_base_user_exists $user; then + useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user + uid=$(( $uid + 1 )) + fi + + generic_base_fix_user_homedir $user +done + + + + +#!/bin/sh +echo "#################### generic-console-tools.post ####################" + +# customize bash prompt +cat >/etc/profile.d/bash_prompt_custom.sh <<'EOF' +if [ "$PS1" ]; then + + function proml { + # set a fancy prompt (overwrite the one in /etc/profile) + local default="\[\e[0m\]" + local usercol='\[\e[1;34m\]' # blue + local hostcol='\[\e[1;32m\]' # green + local pathcol='\[\e[1;33m\]' # yellow + local gitcol='\[\e[1;31m\]' # light red + local termcmd='' + local _p="$"; + + if [ "`id -u`" -eq 0 ]; then + usercol='\[\e[1;31m\]' + _p="#" + fi + + PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}${default}${_p} ${termcmd}" + } + + proml + + function rcd () { + [ "${1:0:1}" == "/" ] && { cd $1; } || { cd $(pwd -P)/$1; } + } + + alias ll="ls -lZ" + alias lr="ls -ltrZ" + alias la="ls -alZ" + + function get_manifest () { + rpm -qa --queryformat="%{name} %{Version} %{Release} %{VCS}\n" | sort + } +fi +EOF + + +#!/bin/sh +echo "#################### generic-packaging.post ####################" + +rm -rf /root/.zypp + +# was: rpm.post +rm -f /var/lib/rpm/__db* +rpmdb --rebuilddb + + +#!/bin/sh +echo "############### common-packaging.post ################" + +# generate repo files for zypper +function genrepo() { + local url=$1 + local reponame=$2 + local filename=${3:-$2} + local enabled=${4:-0} + + local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO} + + # remove double slashes if any + url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url) + + cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF +[$prefix-${reponame}] +name=$prefix-${reponame} +enabled=$enabled +autorefresh=0 +baseurl=${url}?ssl_verify=no +type=rpm-md +gpgcheck=0 + +EOF +} + +# source /etc/tizen-build.conf to get more infos about project, repos etc. +. /etc/tizen-build.conf + +# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf +TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|tizen-common_20141010.2|') + +# snapshot repo +genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1 +genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1 + +# latest repo +genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0 +genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0 + +# daily repo +genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0 +genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0 + +# weekly repo +genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0 +genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0 + + +#!/bin/sh +echo "#################### generic-adaptation.post ####################" + +# fix TIVI-2291 +sed -ri "s/(^blacklist i8042.*$)/#fix from base-general.post \1/" /etc/modprobe.d/blacklist.conf + + +#!/bin/sh +echo "############### common-adaptation.post ################" + + +#!/bin/sh +echo "#################### generic-wayland.post ####################" + + +#!/bin/sh +echo "#################### common-wayland.post ##################" + +# add users to display group +for user in alice bob carol guest; do + if generic_base_user_exists $user; then + /usr/sbin/groupmod -A $user display + fi +done + +# Enable a logind session for users on seat0 (the default seat for +# graphical sessions) +unitdir=/usr/lib/systemd/system +mkdir -p $unitdir/graphical.target.wants +for user in alice bob carol guest; do + generic_base_user_exists $user || continue + uid=$(getent passwd $user|cut -f3 -d':') + ln -s ../user-session-launch@.service $unitdir/graphical.target.wants/user-session-launch@seat0-$uid.service +done + +# user sessions must start after graphical target +patch -b -p1 -d/ <<'EOF' +--- /lib/systemd/system/user-session-launch@.service.orig 2014-03-17 17:50:18.000000000 -0700 ++++ /lib/systemd/system/user-session-launch@.service 2014-04-15 06:03:45.555682575 -0700 +@@ -1,7 +1,7 @@ + [Unit] + Description=User Session Launcher +-After=systemd-user-sessions.service systemd-logind.service +-Requires=systemd-logind.service ++After=systemd-user-sessions.service systemd-logind.service display-manager.path ++Requires=systemd-logind.service display-manager.path + + [Service] + ExecStart=/usr/bin/user-session-launch %i +EOF + +# clean weston target inside user session (installed by weston) +rm -f /usr/lib/systemd/user/weston.target + + +#{ Add installed apps for tizen to launcher if not present +dst="/usr/share/applications/tizen/launcher.conf" + +if [ -w "$dst" ] ; then + ls /usr/share/applications/tizen/*.desktop \ + | while read src; do + grep "$src" "$dst" \ + || { [ ! -r "$src" ] || echo "$src" >> "$dst" ; } + + done +fi + +#} + +# tag the background image with the current snapshot id +arch=$(rpm -qa | grep kernel-common | awk -F- '{printf("%s %s",$3,$4);}') +/usr/bin/mark_image.py /usr/share/backgrounds/tizen/current "Tizen Common: tizen-common_20141010.2 $arch" ffffff 50 90 95 95 + + +#!/bin/sh +echo "#################### generic-middleware.post ####################" + + +#!/bin/sh +echo "############### common-middleware.post ################" + + +#!/bin/sh +echo "#################### generic-applications.post ####################" + + +#!/bin/sh +echo "#################### generic-bluetooth.post ####################" + + +#!/bin/sh +echo "#################### generic-multimedia.post ####################" + + +#!/bin/sh +echo "#################### generic-desktop-applications.post ####################" + +# temp workaround to fill each user app_info database with global db infos +. /etc/tizen-platform.conf +ail_initdb +pkg_initdb + +# depends on generic-base functions +function generic_desktop_applications_fix_userhome() { + user=$1 + + generic_base_user_exists $user || return 1 + homedir=$(generic_base_user_home $user) + + echo "Fix app_info.db of $user" + chown -R $user:users $homedir/.applications/dbspace/ +} + +# fix TC-320 for SDK +. /etc/tizen-build.conf +[ "${TZ_BUILD_WITH_EMULATOR}" == "1" ] && generic_desktop_applications_fix_userhome developer + + +#!/bin/sh +echo "############### common-desktop-applications.post ################" + +# call function defined in meta-generic +for user in alice bob carol guest; do + generic_desktop_applications_fix_userhome $user +done + + + +#!/bin/sh +echo "#################### generic-crosswalk.post ####################" + +# make crosswak start in user session (default target) +mkdir -p /lib/systemd/user/default.target.wants/ +ln -s ../xwalk.service /lib/systemd/user/default.target.wants/ + + + +#!/bin/sh +echo "############### common-crosswalk.post ################" + +# start wrt widgets preinstall +prepare_widgets.sh + + +#!/bin/sh +echo "#################### generic-qt5.post ####################" + + +#!/bin/sh +echo "############### common-qt5.post ################" + +list=' +qt5-qtdeclarative-examples +qt5-cinematic-experience +' + +dst="/usr/share/applications/tizen/launcher.conf" + +if [ -w "$dst" ] ; then + for app in $list ; do + src="/usr/share/applications/$app.desktop" + + grep "$src" "$dst" \ + || { [ ! -r "$src" ] || echo "$src" >> "$dst" ; } + + done +fi + +#!/bin/sh +echo "#################### generic-multimedia-intel.post ####################" + + + +%end + +%post --nochroot +####################### buildname.nochroot ####################### +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release + echo "$IMG_NAME tizen-common_20141010.2" >>$INSTALL_ROOT/etc/tizen-snapshot + + sed -ri \ + -e 's|@BUILD_ID[@]|tizen-common_20141010.2|g' \ + -e "s|@BUILD_DATE[@]|$(date +%Y%m%d_%H%M%S)|g" \ + $INSTALL_ROOT/etc/tizen-build.conf +fi + + +%end diff --git a/fixtures/ks_files/error_auto.ks b/fixtures/ks_files/error_auto.ks new file mode 100644 index 0000000..2345615 --- /dev/null +++ b/fixtures/ks_files/error_auto.ks @@ -0,0 +1,164 @@ + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 1624 --ondisk sda --fstype=ext3 --label platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/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://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/ia32/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages + +@Medfield Support +@common +@appscommon +@appstargetsdk +@appsref +@osp +@trats-blackbay + + +pvr-bin-mdfld +-charging-animation +%end + +%prepackages +eglibc +systemd +busybox +libacl +libcap +dbus-libs +libgcc +libudev +libattr +default-files-slp +openssl +libprivilege-control +libprivilege-control-conf +security-server +libdlog +libsecurity-server-client +sqlite +tzdata-slp +vconf +tizen-coreutils +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d + +rm -rf /etc/localtime +ln -sf /opt/etc/localtime /etc/localtime +#rm -rf /usr/share/zoneinfo +#ln -sf /opt/share/zoneinfo /usr/share/zoneinfo + +# Without this line the rpm don't get the architecture right. +echo -n 'armv7l-tizen-linux' > /etc/rpm/platform + +ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" + +pkg_initdb + +INITDB=1 ail_initdb +/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb + +# ims-service domain setting +RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts` +if [ -z "$RESULT" ]; then + echo "Set domain for auto configuration" + echo "192.168.0.163 config.45001.rcse" >> /etc/hosts +else + echo "Already setted domain for test auto configuration" +fi +# ims-service domain setting + +cat > /usr/bin/press << EOF +#!/bin/sh + +JUNK="SLP" + +[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1" + +echo "Press return key to stop scripts" +read -t \$TIMEOUT JUNK +exit \$? +EOF +chmod +x /usr/bin/press + +# [systemd] we need suid-root X for it to work from user-session +# Xorg will move to system, so this is temporary +chmod 4755 /usr/bin/Xorg + +ln -s /opt/etc/X11/xkb /usr/share/X11 + +echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev + +rm -rf /usr/include +rm -rf /usr/share/man +rm -rf /usr/share/doc + +ldconfig + +mkdir -p /opt/var/lib/dbus + + +# read-writeable /var will be bind-mounted to /opt/var leaving rootfs read-only +# below script more generic + +rm -f /var/lib/rpm/__db* +rpm --rebuilddb +cp -a /var /opt/ +rm -rf /var +mkdir /var + + +# [systemd] some firstboot script like kbd could be done to image-creatation stage +# this patch is for it. +for i in /etc/preconf.d/*; do + $i +done + +if [ -e /usr/bin/build-backup-data.sh ]; then + /usr/bin/build-backup-data.sh +fi + +/etc/make_info_file.sh Ref.Device-210 Tizen_Ref.Device-210_`date +%Y%m%d.%H%M` + +ln -sf /etc/info.ini /opt/etc/info.ini +ln -sf /etc/info.ini /usr/etc/info.ini + +echo "s1:12345:respawn:/sbin/agetty -L 115200 ttyMFD3 vt100" >> /etc/inittab + + +%end + +%post --nochroot + +%end + diff --git a/fixtures/ks_files/error_ks_with_chinese.ks b/fixtures/ks_files/error_ks_with_chinese.ks new file mode 100644 index 0000000..65b2865 --- /dev/null +++ b/fixtures/ks_files/error_ks_with_chinese.ks @@ -0,0 +1,165 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 1624 --ondisk sda --fstype=ext3 --label platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/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://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/ia32/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages + +@Medfield Support +@common +@appscommon +@appstargetsdk +@appsref +@osp +@trats-blackbay +你好 + +pvr-bin-mdfld +-charging-animation +%end + +%prepackages +eglibc +systemd +busybox +libacl +libcap +dbus-libs +libgcc +libudev +libattr +default-files-slp +openssl +libprivilege-control +libprivilege-control-conf +security-server +libdlog +libsecurity-server-client +sqlite +tzdata-slp +vconf +tizen-coreutils +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d + +rm -rf /etc/localtime +ln -sf /opt/etc/localtime /etc/localtime +#rm -rf /usr/share/zoneinfo +#ln -sf /opt/share/zoneinfo /usr/share/zoneinfo + +# Without this line the rpm don't get the architecture right. +echo -n 'armv7l-tizen-linux' > /etc/rpm/platform + +ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" + +pkg_initdb + +INITDB=1 ail_initdb +/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb + +# ims-service domain setting +RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts` +if [ -z "$RESULT" ]; then + echo "Set domain for auto configuration" + echo "192.168.0.163 config.45001.rcse" >> /etc/hosts +else + echo "Already setted domain for test auto configuration" +fi +# ims-service domain setting + +cat > /usr/bin/press << EOF +#!/bin/sh + +JUNK="SLP" + +[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1" + +echo "Press return key to stop scripts" +read -t \$TIMEOUT JUNK +exit \$? +EOF +chmod +x /usr/bin/press + +# [systemd] we need suid-root X for it to work from user-session +# Xorg will move to system, so this is temporary +chmod 4755 /usr/bin/Xorg + +ln -s /opt/etc/X11/xkb /usr/share/X11 + +echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev + +rm -rf /usr/include +rm -rf /usr/share/man +rm -rf /usr/share/doc + +ldconfig + +mkdir -p /opt/var/lib/dbus + + +# read-writeable /var will be bind-mounted to /opt/var leaving rootfs read-only +# below script more generic + +rm -f /var/lib/rpm/__db* +rpm --rebuilddb +cp -a /var /opt/ +rm -rf /var +mkdir /var + + +# [systemd] some firstboot script like kbd could be done to image-creatation stage +# this patch is for it. +for i in /etc/preconf.d/*; do + $i +done + +if [ -e /usr/bin/build-backup-data.sh ]; then + /usr/bin/build-backup-data.sh +fi + +/etc/make_info_file.sh Ref.Device-210 Tizen_Ref.Device-210_`date +%Y%m%d.%H%M` + +ln -sf /etc/info.ini /opt/etc/info.ini +ln -sf /etc/info.ini /usr/etc/info.ini + +echo "s1:12345:respawn:/sbin/agetty -L 115200 ttyMFD3 vt100" >> /etc/inittab + + +%end + +%post --nochroot + +%end + diff --git a/fixtures/ks_files/error_no_package.ks b/fixtures/ks_files/error_no_package.ks new file mode 100644 index 0000000..2fa73b6 --- /dev/null +++ b/fixtures/ks_files/error_no_package.ks @@ -0,0 +1,120 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 1624 --ondisk sda --fstype=ext3 --label platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/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://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/ia32/packages/ --save --gpgkey=0 --ssl_verify=no + +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d + +rm -rf /etc/localtime +ln -sf /opt/etc/localtime /etc/localtime +#rm -rf /usr/share/zoneinfo +#ln -sf /opt/share/zoneinfo /usr/share/zoneinfo + +# Without this line the rpm don't get the architecture right. +echo -n 'armv7l-tizen-linux' > /etc/rpm/platform + +ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" + +pkg_initdb + +INITDB=1 ail_initdb +/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb + +# ims-service domain setting +RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts` +if [ -z "$RESULT" ]; then + echo "Set domain for auto configuration" + echo "192.168.0.163 config.45001.rcse" >> /etc/hosts +else + echo "Already setted domain for test auto configuration" +fi +# ims-service domain setting + +cat > /usr/bin/press << EOF +#!/bin/sh + +JUNK="SLP" + +[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1" + +echo "Press return key to stop scripts" +read -t \$TIMEOUT JUNK +exit \$? +EOF +chmod +x /usr/bin/press + +# [systemd] we need suid-root X for it to work from user-session +# Xorg will move to system, so this is temporary +chmod 4755 /usr/bin/Xorg + +ln -s /opt/etc/X11/xkb /usr/share/X11 + +echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev + +rm -rf /usr/include +rm -rf /usr/share/man +rm -rf /usr/share/doc + +ldconfig + +mkdir -p /opt/var/lib/dbus + + +# read-writeable /var will be bind-mounted to /opt/var leaving rootfs read-only +# below script more generic + +rm -f /var/lib/rpm/__db* +rpm --rebuilddb +cp -a /var /opt/ +rm -rf /var +mkdir /var + + +# [systemd] some firstboot script like kbd could be done to image-creatation stage +# this patch is for it. +for i in /etc/preconf.d/*; do + $i +done + +if [ -e /usr/bin/build-backup-data.sh ]; then + /usr/bin/build-backup-data.sh +fi + +/etc/make_info_file.sh Ref.Device-210 Tizen_Ref.Device-210_`date +%Y%m%d.%H%M` + +ln -sf /etc/info.ini /opt/etc/info.ini +ln -sf /etc/info.ini /usr/etc/info.ini + +echo "s1:12345:respawn:/sbin/agetty -L 115200 ttyMFD3 vt100" >> /etc/inittab + + +%end + +%post --nochroot + +%end + diff --git a/fixtures/ks_files/error_no_repo.ks b/fixtures/ks_files/error_no_repo.ks new file mode 100644 index 0000000..5fb9f16 --- /dev/null +++ b/fixtures/ks_files/error_no_repo.ks @@ -0,0 +1,162 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 1624 --ondisk sda --fstype=ext3 --label platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +%packages + +@Medfield Support +@common +@appscommon +@appstargetsdk +@appsref +@osp +@trats-blackbay + + +pvr-bin-mdfld +-charging-animation +%end + +%prepackages +eglibc +systemd +busybox +libacl +libcap +dbus-libs +libgcc +libudev +libattr +default-files-slp +openssl +libprivilege-control +libprivilege-control-conf +security-server +libdlog +libsecurity-server-client +sqlite +tzdata-slp +vconf +tizen-coreutils +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d + +rm -rf /etc/localtime +ln -sf /opt/etc/localtime /etc/localtime +#rm -rf /usr/share/zoneinfo +#ln -sf /opt/share/zoneinfo /usr/share/zoneinfo + +# Without this line the rpm don't get the architecture right. +echo -n 'armv7l-tizen-linux' > /etc/rpm/platform + +ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" + +pkg_initdb + +INITDB=1 ail_initdb +/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb + +# ims-service domain setting +RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts` +if [ -z "$RESULT" ]; then + echo "Set domain for auto configuration" + echo "192.168.0.163 config.45001.rcse" >> /etc/hosts +else + echo "Already setted domain for test auto configuration" +fi +# ims-service domain setting + +cat > /usr/bin/press << EOF +#!/bin/sh + +JUNK="SLP" + +[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1" + +echo "Press return key to stop scripts" +read -t \$TIMEOUT JUNK +exit \$? +EOF +chmod +x /usr/bin/press + +# [systemd] we need suid-root X for it to work from user-session +# Xorg will move to system, so this is temporary +chmod 4755 /usr/bin/Xorg + +ln -s /opt/etc/X11/xkb /usr/share/X11 + +echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev + +rm -rf /usr/include +rm -rf /usr/share/man +rm -rf /usr/share/doc + +ldconfig + +mkdir -p /opt/var/lib/dbus + + +# read-writeable /var will be bind-mounted to /opt/var leaving rootfs read-only +# below script more generic + +rm -f /var/lib/rpm/__db* +rpm --rebuilddb +cp -a /var /opt/ +rm -rf /var +mkdir /var + + +# [systemd] some firstboot script like kbd could be done to image-creatation stage +# this patch is for it. +for i in /etc/preconf.d/*; do + $i +done + +if [ -e /usr/bin/build-backup-data.sh ]; then + /usr/bin/build-backup-data.sh +fi + +/etc/make_info_file.sh Ref.Device-210 Tizen_Ref.Device-210_`date +%Y%m%d.%H%M` + +ln -sf /etc/info.ini /opt/etc/info.ini +ln -sf /etc/info.ini /usr/etc/info.ini + +echo "s1:12345:respawn:/sbin/agetty -L 115200 ttyMFD3 vt100" >> /etc/inittab + + +%end + +%post --nochroot + +%end + diff --git a/fixtures/ks_files/error_package.ks b/fixtures/ks_files/error_package.ks new file mode 100644 index 0000000..520d2b2 --- /dev/null +++ b/fixtures/ks_files/error_package.ks @@ -0,0 +1,166 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 1624 --ondisk sda --fstype=ext3 --label platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/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://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/ia32/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages + +@Medfield Support +@common +@appscommon +@appstargetsdk +@appsref +@osp +@trats-blackbay + +hg +svn +pvr-bin-mdfld +-charging-animation +%end + +%prepackages +eglibc +systemd +busybox +libacl +libcap +dbus-libs +libgcc +libudev +libattr +default-files-slp +openssl +libprivilege-control +libprivilege-control-conf +security-server +libdlog +libsecurity-server-client +sqlite +tzdata-slp +vconf +tizen-coreutils +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d + +rm -rf /etc/localtime +ln -sf /opt/etc/localtime /etc/localtime +#rm -rf /usr/share/zoneinfo +#ln -sf /opt/share/zoneinfo /usr/share/zoneinfo + +# Without this line the rpm don't get the architecture right. +echo -n 'armv7l-tizen-linux' > /etc/rpm/platform + +ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" + +pkg_initdb + +INITDB=1 ail_initdb +/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb + +# ims-service domain setting +RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts` +if [ -z "$RESULT" ]; then + echo "Set domain for auto configuration" + echo "192.168.0.163 config.45001.rcse" >> /etc/hosts +else + echo "Already setted domain for test auto configuration" +fi +# ims-service domain setting + +cat > /usr/bin/press << EOF +#!/bin/sh + +JUNK="SLP" + +[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1" + +echo "Press return key to stop scripts" +read -t \$TIMEOUT JUNK +exit \$? +EOF +chmod +x /usr/bin/press + +# [systemd] we need suid-root X for it to work from user-session +# Xorg will move to system, so this is temporary +chmod 4755 /usr/bin/Xorg + +ln -s /opt/etc/X11/xkb /usr/share/X11 + +echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev + +rm -rf /usr/include +rm -rf /usr/share/man +rm -rf /usr/share/doc + +ldconfig + +mkdir -p /opt/var/lib/dbus + + +# read-writeable /var will be bind-mounted to /opt/var leaving rootfs read-only +# below script more generic + +rm -f /var/lib/rpm/__db* +rpm --rebuilddb +cp -a /var /opt/ +rm -rf /var +mkdir /var + + +# [systemd] some firstboot script like kbd could be done to image-creatation stage +# this patch is for it. +for i in /etc/preconf.d/*; do + $i +done + +if [ -e /usr/bin/build-backup-data.sh ]; then + /usr/bin/build-backup-data.sh +fi + +/etc/make_info_file.sh Ref.Device-210 Tizen_Ref.Device-210_`date +%Y%m%d.%H%M` + +ln -sf /etc/info.ini /opt/etc/info.ini +ln -sf /etc/info.ini /usr/etc/info.ini + +echo "s1:12345:respawn:/sbin/agetty -L 115200 ttyMFD3 vt100" >> /etc/inittab + + +%end + +%post --nochroot + +%end + diff --git a/fixtures/ks_files/error_repo.ks b/fixtures/ks_files/error_repo.ks new file mode 100644 index 0000000..cb156a8 --- /dev/null +++ b/fixtures/ks_files/error_repo.ks @@ -0,0 +1,165 @@ +# -*-mic2-options-*- -f loop --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 1624 --ondisk sda --fstype=ext3 --label platform + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/download.tizendev.org/not-exists/ --save --gpgkey=0 --ssl_verify=no +repo --name=Tizen-main --baseurl=http://linux-ftp.fi.intel.com/download.tizendev.org/not-exist/ --save --gpgkey=0 --ssl_verify=no + +%packages + +@Medfield Support +@common +@appscommon +@appstargetsdk +@appsref +@osp +@trats-blackbay + + +pvr-bin-mdfld +-charging-animation +%end + +%prepackages +eglibc +systemd +busybox +libacl +libcap +dbus-libs +libgcc +libudev +libattr +default-files-slp +openssl +libprivilege-control +libprivilege-control-conf +security-server +libdlog +libsecurity-server-client +sqlite +tzdata-slp +vconf +tizen-coreutils +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d + +rm -rf /etc/localtime +ln -sf /opt/etc/localtime /etc/localtime +#rm -rf /usr/share/zoneinfo +#ln -sf /opt/share/zoneinfo /usr/share/zoneinfo + +# Without this line the rpm don't get the architecture right. +echo -n 'armv7l-tizen-linux' > /etc/rpm/platform + +ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N "" +ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N "" +ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N "" + +pkg_initdb + +INITDB=1 ail_initdb +/opt/apps/com.samsung.menu-screen/bin/menuscreen_initdb + +# ims-service domain setting +RESULT=`grep "192.168.0.163 config.45001.rcse" /etc/hosts` +if [ -z "$RESULT" ]; then + echo "Set domain for auto configuration" + echo "192.168.0.163 config.45001.rcse" >> /etc/hosts +else + echo "Already setted domain for test auto configuration" +fi +# ims-service domain setting + +cat > /usr/bin/press << EOF +#!/bin/sh + +JUNK="SLP" + +[ "\$1" ] && TIMEOUT="\$1" || TIMEOUT="1" + +echo "Press return key to stop scripts" +read -t \$TIMEOUT JUNK +exit \$? +EOF +chmod +x /usr/bin/press + +# [systemd] we need suid-root X for it to work from user-session +# Xorg will move to system, so this is temporary +chmod 4755 /usr/bin/Xorg + +ln -s /opt/etc/X11/xkb /usr/share/X11 + +echo "UDEV_PERSISTENT_STORAGE=no" >> /etc/sysconfig/udev + +rm -rf /usr/include +rm -rf /usr/share/man +rm -rf /usr/share/doc + +ldconfig + +mkdir -p /opt/var/lib/dbus + + +# read-writeable /var will be bind-mounted to /opt/var leaving rootfs read-only +# below script more generic + +rm -f /var/lib/rpm/__db* +rpm --rebuilddb +cp -a /var /opt/ +rm -rf /var +mkdir /var + + +# [systemd] some firstboot script like kbd could be done to image-creatation stage +# this patch is for it. +for i in /etc/preconf.d/*; do + $i +done + +if [ -e /usr/bin/build-backup-data.sh ]; then + /usr/bin/build-backup-data.sh +fi + +/etc/make_info_file.sh Ref.Device-210 Tizen_Ref.Device-210_`date +%Y%m%d.%H%M` + +ln -sf /etc/info.ini /opt/etc/info.ini +ln -sf /etc/info.ini /usr/etc/info.ini + +echo "s1:12345:respawn:/sbin/agetty -L 115200 ttyMFD3 vt100" >> /etc/inittab + + +%end + +%post --nochroot + +%end + diff --git a/fixtures/ks_files/gnome-live-gpt.ks b/fixtures/ks_files/gnome-live-gpt.ks new file mode 100644 index 0000000..254b24f --- /dev/null +++ b/fixtures/ks_files/gnome-live-gpt.ks @@ -0,0 +1,24 @@ +# -*-mic2-options-*- -f liveusb --copy-kernel --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +part / --size 512 --ondisk sda --fstype=ext3 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=1 --append="vga=current quiet splash" --ptable=gpt + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=pc --baseurl=http://repo-vm.bj.intel.com/download.tz.otcshare.org/pc/tizen-pc_20121221.9/repos/pc/ia32/packages/ --gpgkey=0 --ssl_verify=no + +%packages + +coreutils +bash +kernel-adaptation-pc + +%end diff --git a/fixtures/ks_files/gnome-live-label.ks b/fixtures/ks_files/gnome-live-label.ks new file mode 100644 index 0000000..b87c276 --- /dev/null +++ b/fixtures/ks_files/gnome-live-label.ks @@ -0,0 +1,25 @@ +# -*-mic2-options-*- -f liveusb --copy-kernel --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +part / --size 512 --ondisk sda --fstype=ext3 --label=platform + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=1 --append="vga=current quiet splash" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=pc --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc/ia32/packages --gpgkey=0 --ssl_verify=no + + +%packages + +coreutils +bash +kernel-adaptation-pc + +%end diff --git a/fixtures/ks_files/gnome-live.ks b/fixtures/ks_files/gnome-live.ks new file mode 100644 index 0000000..3e0dcb1 --- /dev/null +++ b/fixtures/ks_files/gnome-live.ks @@ -0,0 +1,25 @@ +# -*-mic2-options-*- -f liveusb --copy-kernel --pack-to=@NAME@-rs.zip -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +part / --size 512 --ondisk sda --fstype=ext3 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=1 --append="vga=current quiet splash" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=pc --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc/ia32/packages --gpgkey=0 --ssl_verify=no + + +%packages + +coreutils +bash +kernel-adaptation-pc + +%end diff --git a/fixtures/ks_files/gnome_exclude.ks b/fixtures/ks_files/gnome_exclude.ks new file mode 100644 index 0000000..4f81b7e --- /dev/null +++ b/fixtures/ks_files/gnome_exclude.ks @@ -0,0 +1,125 @@ +# -*-mic2-options-*- -f liveusb --copy-kernel --runtime=native -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 3200 --ondisk sda --fstype=ext3 --active + +bootloader --timeout=10 --append="vga=current quiet splash" --menus="install:Wipe and Install:systemd.unit=pc-installer.service:test" + +repo --name=pc --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc/ia32/packages/ --ssl_verify=no --excludepkgs=wrt-devel,wrt-installer,wrt-plugins-tizen,xhost +repo --name=pc-wrt --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc-wrt/ia32/packages/ --ssl_verify=no +repo --name=pc-internal --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc-internal/ia32/packages/ --ssl_verify=no + +%packages +wrt +kernel-adaptation-pc +wrt-installer +wrt-plugins-tizen +wrt-devel +@Base Desktop +-xhost +%end + +%post + +# Migrate /etc/sysconfig/i18n until MIC is fixed to handle locale.conf +# +if [ -e /etc/sysconfig/i18n -a ! -e /etc/locale.conf ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_PAPER + unset LC_NAME + unset LC_ADDRESS + unset LC_TELEPHONE + unset LC_MEASUREMENT + unset LC_IDENTIFICATION + . /etc/sysconfig/i18n >/dev/null 2>&1 || : + [ -n "$LANG" ] && echo LANG=$LANG > /etc/locale.conf 2>&1 || : + [ -n "$LC_CTYPE" ] && echo LC_CTYPE=$LC_CTYPE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_NUMERIC" ] && echo LC_NUMERIC=$LC_NUMERIC >> /etc/locale.conf 2>&1 || : + [ -n "$LC_TIME" ] && echo LC_TIME=$LC_TIME >> /etc/locale.conf 2>&1 || : + [ -n "$LC_COLLATE" ] && echo LC_COLLATE=$LC_COLLATE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MONETARY" ] && echo LC_MONETARY=$LC_MONETARY >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MESSAGES" ] && echo LC_MESSAGES=$LC_MESSAGES >> /etc/locale.conf 2>&1 || : + [ -n "$LC_PAPER" ] && echo LC_PAPER=$LC_PAPER >> /etc/locale.conf 2>&1 || : + [ -n "$LC_NAME" ] && echo LC_NAME=$LC_NAME >> /etc/locale.conf 2>&1 || : + [ -n "$LC_ADDRESS" ] && echo LC_ADDRESS=$LC_ADDRESS >> /etc/locale.conf 2>&1 || : + [ -n "$LC_TELEPHONE" ] && echo LC_TELEPHONE=$LC_TELEPHONE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MEASUREMENT" ] && echo LC_MEASUREMENT=$LC_MEASUREMENT >> /etc/locale.conf 2>&1 || : + [ -n "$LC_IDENTIFICATION" ] && echo LC_IDENTIFICATION=$LC_IDENTIFICATION >> /etc/locale.conf 2>&1 || : +fi +rm -f /etc/sysconfig/i18n >/dev/null 2>&1 || : + + + + +cat >> /etc/zypp/repos.d/tizen-pc-daily.repo << EOF +[pc] +name=pc +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/releases/daily/trunk/pc/latest/repos/pc/x86_64/packages/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +cat >> /etc/zypp/repos.d/tizen-pc-daily-internal.repo << EOF +[pc-internal] +name=pc-internal +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/releases/daily/trunk/pc/latest/repos/pc-internal/x86_64/packages/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +cat >> /etc/zypp/repos.d/tizen-pc-daily-wrt.repo << EOF +[pc-wrt] +name=pc-wrt +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/releases/daily/trunk/pc/latest/repos/pc-wrt/x86_64/packages/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +cat >> /etc/zypp/repos.d/google.repo << EOF +[google] +name=google +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/3rdparty/repos/pc/google/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +ln -sf /proc/self/mounts /etc/mtab + + +rm -rf /root/.zypp + +cat >> /etc/os-release << EOF +BUILD_ID=@BUILD_ID@ +EOF + +ln -sf /usr/share/plymouth/themes/tizen/tizen-installer.script /usr/share/plymouth/themes/tizen/tizen.script + +passwd -l root + + +%end + +%post --nochroot + +%end diff --git a/fixtures/ks_files/gnome_include.ks b/fixtures/ks_files/gnome_include.ks new file mode 100644 index 0000000..36ceeb1 --- /dev/null +++ b/fixtures/ks_files/gnome_include.ks @@ -0,0 +1,123 @@ +# -*-mic2-options-*- -f liveusb --copy-kernel --runtime=native -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --size 3200 --ondisk sda --fstype=ext3 --active + +bootloader --timeout=10 --append="vga=current quiet splash" --menus="install:Wipe and Install:systemd.unit=pc-installer.service:test" + +repo --name=pc --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc/ia32/packages/ --ssl_verify=no --includepkgs=wrt-devel +repo --name=pc-wrt --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc-wrt/ia32/packages/ --ssl_verify=no --includepkgs=wrt-installer +repo --name=pc-internal --baseurl=http://linux-ftp.fi.intel.com/repo-tizen-pc_20130716.3/repos/pc-internal/ia32/packages/ --ssl_verify=no + +%packages +wrt +kernel-adaptation-pc +wrt-devel +wrt-installer +wrt-plugins-tizen +%end + +%post + +# Migrate /etc/sysconfig/i18n until MIC is fixed to handle locale.conf +# +if [ -e /etc/sysconfig/i18n -a ! -e /etc/locale.conf ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_PAPER + unset LC_NAME + unset LC_ADDRESS + unset LC_TELEPHONE + unset LC_MEASUREMENT + unset LC_IDENTIFICATION + . /etc/sysconfig/i18n >/dev/null 2>&1 || : + [ -n "$LANG" ] && echo LANG=$LANG > /etc/locale.conf 2>&1 || : + [ -n "$LC_CTYPE" ] && echo LC_CTYPE=$LC_CTYPE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_NUMERIC" ] && echo LC_NUMERIC=$LC_NUMERIC >> /etc/locale.conf 2>&1 || : + [ -n "$LC_TIME" ] && echo LC_TIME=$LC_TIME >> /etc/locale.conf 2>&1 || : + [ -n "$LC_COLLATE" ] && echo LC_COLLATE=$LC_COLLATE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MONETARY" ] && echo LC_MONETARY=$LC_MONETARY >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MESSAGES" ] && echo LC_MESSAGES=$LC_MESSAGES >> /etc/locale.conf 2>&1 || : + [ -n "$LC_PAPER" ] && echo LC_PAPER=$LC_PAPER >> /etc/locale.conf 2>&1 || : + [ -n "$LC_NAME" ] && echo LC_NAME=$LC_NAME >> /etc/locale.conf 2>&1 || : + [ -n "$LC_ADDRESS" ] && echo LC_ADDRESS=$LC_ADDRESS >> /etc/locale.conf 2>&1 || : + [ -n "$LC_TELEPHONE" ] && echo LC_TELEPHONE=$LC_TELEPHONE >> /etc/locale.conf 2>&1 || : + [ -n "$LC_MEASUREMENT" ] && echo LC_MEASUREMENT=$LC_MEASUREMENT >> /etc/locale.conf 2>&1 || : + [ -n "$LC_IDENTIFICATION" ] && echo LC_IDENTIFICATION=$LC_IDENTIFICATION >> /etc/locale.conf 2>&1 || : +fi +rm -f /etc/sysconfig/i18n >/dev/null 2>&1 || : + + + + +cat >> /etc/zypp/repos.d/tizen-pc-daily.repo << EOF +[pc] +name=pc +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/releases/daily/trunk/pc/latest/repos/pc/x86_64/packages/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +cat >> /etc/zypp/repos.d/tizen-pc-daily-internal.repo << EOF +[pc-internal] +name=pc-internal +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/releases/daily/trunk/pc/latest/repos/pc-internal/x86_64/packages/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +cat >> /etc/zypp/repos.d/tizen-pc-daily-wrt.repo << EOF +[pc-wrt] +name=pc-wrt +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/releases/daily/trunk/pc/latest/repos/pc-wrt/x86_64/packages/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +cat >> /etc/zypp/repos.d/google.repo << EOF +[google] +name=google +enabled=1 +autorefresh=0 +baseurl=https://download.tz.otcshare.org/3rdparty/repos/pc/google/?ssl_verify=no +type=rpm-md +gpgcheck=0 +EOF + +ln -sf /proc/self/mounts /etc/mtab + + +rm -rf /root/.zypp + +cat >> /etc/os-release << EOF +BUILD_ID=@BUILD_ID@ +EOF + +ln -sf /usr/share/plymouth/themes/tizen/tizen-installer.script /usr/share/plymouth/themes/tizen/tizen.script + +passwd -l root + + +%end + +%post --nochroot + +%end diff --git a/fixtures/ks_files/handset_blackbay.ks b/fixtures/ks_files/handset_blackbay.ks new file mode 100644 index 0000000..37c97e8 --- /dev/null +++ b/fixtures/ks_files/handset_blackbay.ks @@ -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 + +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://linux-ftp.fi.intel.com/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://linux-ftp.fi.intel.com/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://linux-ftp.fi.intel.com/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://linux-ftp.fi.intel.com/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 < /etc/sysconfig/launchpad < /etc/sysconfig/launchpad < /etc/sysconfig/launchpad < /etc/sysconfig/launchpad < /etc/sysconfig/launchpad < /etc/sysconfig/launchpad < /etc/sysconfig/launchpad <> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi-mbr-i586-with-proxy.ks b/fixtures/ks_files/ivi-mbr-i586-with-proxy.ks new file mode 100644 index 0000000..efa8034 --- /dev/null +++ b/fixtures/ks_files/ivi-mbr-i586-with-proxy.ks @@ -0,0 +1,112 @@ +# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part /boot --size 64 --ondisk sdb --fstype=ext4 --label boot --active --align 1024 --fsoptions=noatime +part / --size 3748 --ondisk sdb --fstype=ext4 --label platform --align 1024 --fsoptions=noatime + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" --ptable=gpt + +desktop --autologinuser=tizen +user --name tizen --groups audio,video,weston-launch --password 'tizen' + +installerfw_plugins "bootloader,fstab" + +repo --name=ivi --baseurl=http://download.tizen.org/snapshots/tizen/ivi/latest/repos/atom/packages/ --proxy=http://proxy-mu.intel.com:911 + +%packages + +coreutils +bash +tzdata +kernel* + +%end + + + +%post +# base-general.post + +ln -sf /proc/self/mounts /etc/mtab + +rm -rf /root/.zypp + + +#Hack to temporarily disable net-config, which collides with settingsd. Related to TIVI-2569 + +rm /usr/lib/systemd/system/multi-user.target.wants/net-config.service + +# rpm.post +rm -f /var/lib/rpm/__db* +rpmdb --rebuilddb + +# Initialize the native application database +pkg_initdb + +# Add 'app' user to the weston-launch group +/usr/sbin/groupmod -A app weston-launch + +# Temporary work around for bug in filesystem package resulting in the 'app' user home +# directory being only readable by root +chown -R app:app /opt/home/app + +# Since weston-launch runs with the "User" label, the app +# home dir must have the same label +chsmack -a User /opt/home/app + +# Enable a logind session for 'app' user on seat0 (the default seat for +# graphical sessions) +mkdir -p /usr/lib/systemd/system/graphical.target.wants +ln -s ../user-session-launch@.service /usr/lib/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service +ln -sf weston.target /usr/lib/systemd/user/default.target + +# Add over-riding environment to enable the web runtime to +# run on an IVI image as a different user then the tizen user +# Some notes on some of the variables: +# - ELM_THEME is needed in order for the wrt to have visible content +# - WRT_PROCESS_POOL_DISABLE is a work around for TIVI-2062 +cat > /etc/sysconfig/wrt < /etc/udev/rules.d/99-dri.rules <> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi + + +%end diff --git a/fixtures/ks_files/ivi-mbr-i586.ks b/fixtures/ks_files/ivi-mbr-i586.ks new file mode 100644 index 0000000..31dfadd --- /dev/null +++ b/fixtures/ks_files/ivi-mbr-i586.ks @@ -0,0 +1,112 @@ +# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part /boot --size 64 --ondisk sdb --fstype=ext4 --label boot --active --align 1024 --fsoptions=noatime +part / --size 3748 --ondisk sdb --fstype=ext4 --label platform --align 1024 --fsoptions=noatime + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" --ptable=gpt + +desktop --autologinuser=tizen +user --name tizen --groups audio,video,weston-launch --password 'tizen' + +installerfw_plugins "bootloader,fstab" + +repo --name=ivi --baseurl=http://download.tizen.org/snapshots/tizen/ivi/latest/repos/atom/packages/ + +%packages + +coreutils +bash +tzdata +kernel* + +%end + + + +%post +# base-general.post + +ln -sf /proc/self/mounts /etc/mtab + +rm -rf /root/.zypp + + +#Hack to temporarily disable net-config, which collides with settingsd. Related to TIVI-2569 + +rm /usr/lib/systemd/system/multi-user.target.wants/net-config.service + +# rpm.post +rm -f /var/lib/rpm/__db* +rpmdb --rebuilddb + +# Initialize the native application database +pkg_initdb + +# Add 'app' user to the weston-launch group +/usr/sbin/groupmod -A app weston-launch + +# Temporary work around for bug in filesystem package resulting in the 'app' user home +# directory being only readable by root +chown -R app:app /opt/home/app + +# Since weston-launch runs with the "User" label, the app +# home dir must have the same label +chsmack -a User /opt/home/app + +# Enable a logind session for 'app' user on seat0 (the default seat for +# graphical sessions) +mkdir -p /usr/lib/systemd/system/graphical.target.wants +ln -s ../user-session-launch@.service /usr/lib/systemd/system/graphical.target.wants/user-session-launch@seat0-5000.service +ln -sf weston.target /usr/lib/systemd/user/default.target + +# Add over-riding environment to enable the web runtime to +# run on an IVI image as a different user then the tizen user +# Some notes on some of the variables: +# - ELM_THEME is needed in order for the wrt to have visible content +# - WRT_PROCESS_POOL_DISABLE is a work around for TIVI-2062 +cat > /etc/sysconfig/wrt < /etc/udev/rules.d/99-dri.rules <> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi + + +%end diff --git a/fixtures/ks_files/ivi.ks b/fixtures/ks_files/ivi.ks new file mode 100644 index 0000000..d36a7d9 --- /dev/null +++ b/fixtures/ks_files/ivi.ks @@ -0,0 +1,39 @@ +# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot +part / --size 968 --ondisk sdb --fstype=ext4 --label platform + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +tzdata +kernel* +rpm +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_624.ks b/fixtures/ks_files/ivi_624.ks new file mode 100644 index 0000000..c779288 --- /dev/null +++ b/fixtures/ks_files/ivi_624.ks @@ -0,0 +1,38 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --align=1024 +part / --size 768 --ondisk sdb --fstype=ext4 --label platform + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_broken_content_bootstrap.ks b/fixtures/ks_files/ivi_broken_content_bootstrap.ks new file mode 100644 index 0000000..77be117 --- /dev/null +++ b/fixtures/ks_files/ivi_broken_content_bootstrap.ks @@ -0,0 +1,25 @@ +# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --active --align 1024 +part / --size 768 --ondisk sdb --fstype=ext4 --label platform --align 1024 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-ivi-new --baseurl=http://linux-ftp.fi.intel.com/repo-ivi-broken-content-bootstrap/ia32/packages/ --ssl_verify=no --gpgkey=0 + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end diff --git a/fixtures/ks_files/ivi_four_partition_gpt.ks b/fixtures/ks_files/ivi_four_partition_gpt.ks new file mode 100644 index 0000000..42988eb --- /dev/null +++ b/fixtures/ks_files/ivi_four_partition_gpt.ks @@ -0,0 +1,40 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /test1 --size 64 --ondisk sdb --fstype=ext4 --label test1 --align 1024 +part /test2 --size 64 --ondisk sdb --fstype=ext4 --label test2 --align 1024 +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --align 1024 +part / --size 768 --ondisk sdb --fstype=ext4 --label platform --align 1024 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" --ptable=gpt + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_four_partition_mbr.ks b/fixtures/ks_files/ivi_four_partition_mbr.ks new file mode 100644 index 0000000..dce851a --- /dev/null +++ b/fixtures/ks_files/ivi_four_partition_mbr.ks @@ -0,0 +1,40 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /test1 --size 64 --ondisk sdb --fstype=ext4 --label test1 --align 1024 +part /test2 --size 64 --ondisk sdb --fstype=ext4 --label test2 --align 1024 +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --align 1024 +part / --size 768 --ondisk sdb --fstype=ext4 --label platform --align 1024 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_gpt_with_part-type.ks b/fixtures/ks_files/ivi_gpt_with_part-type.ks new file mode 100644 index 0000000..6b73916 --- /dev/null +++ b/fixtures/ks_files/ivi_gpt_with_part-type.ks @@ -0,0 +1,41 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part /boot --size 64 --ondisk sdb --fstype=ext4 --label boot --active --align 1024 +part / --size 672 --ondisk sdb --fstype=ext4 --label platform --align 1024 --part-type=0FC63DAF-8483-4772-8E79-3D69D8477DE4 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4" --ptable=gpt + +desktop --autologinuser=tizen +user --name tizen --groups audio,video,weston-launch --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +tzdata +kernel* +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_invalid_content_mic-bootstrap.ks b/fixtures/ks_files/ivi_invalid_content_mic-bootstrap.ks new file mode 100644 index 0000000..c22c36b --- /dev/null +++ b/fixtures/ks_files/ivi_invalid_content_mic-bootstrap.ks @@ -0,0 +1,25 @@ +# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --active --align 1024 +part / --size 768 --ondisk sdb --fstype=ext4 --label platform --align 1024 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-ivi-new --baseurl=http://linux-ftp.fi.intel.com/repo/download.tizen.org/ivi/tizen-2.0_20130311.2/repos/ivi-bootstrap-problem-bootstrap/ia32/packages/ --ssl_verify=no --gpgkey=0 + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end diff --git a/fixtures/ks_files/ivi_no_mountpoint.ks b/fixtures/ks_files/ivi_no_mountpoint.ks new file mode 100644 index 0000000..4fe5f6d --- /dev/null +++ b/fixtures/ks_files/ivi_no_mountpoint.ks @@ -0,0 +1,39 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part --size 32 --ondisk sdb --fstype=ext4 --label boot +part --size 768 --ondisk sdb --fstype=ext4 --label platform + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +tzdata +kernel* +rpm +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_no_partition.ks b/fixtures/ks_files/ivi_no_partition.ks new file mode 100644 index 0000000..326b415 --- /dev/null +++ b/fixtures/ks_files/ivi_no_partition.ks @@ -0,0 +1,37 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +tzdata +kernel* +rpm +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_packages.ks b/fixtures/ks_files/ivi_packages.ks new file mode 100644 index 0000000..f7acfb9 --- /dev/null +++ b/fixtures/ks_files/ivi_packages.ks @@ -0,0 +1,45 @@ +# -*-mic2-options-*- -f raw --fstab=uuid --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot +part / --size 968 --ondisk sdb --fstype=ext4 --label platform + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +#@Base System +@generic-base-micro +kernel* +#-util-linux +-bluez +bash.i686 +python-setuptools +*desktop* +*mozilla +grep +rpm +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_syslinux_problem.ks b/fixtures/ks_files/ivi_syslinux_problem.ks new file mode 100644 index 0000000..f47d5bb --- /dev/null +++ b/fixtures/ks_files/ivi_syslinux_problem.ks @@ -0,0 +1,25 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot +part / --size 768 --ondisk sdb --fstype=ext4 --label platform + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-ivi --baseurl=http://linux-ftp.fi.intel.com/repo/download.tizen.org/ivi/syslinux_problem_rep/repos/tizen/ia32/packages/ --ssl_verify=no --gpgkey=0 + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end diff --git a/fixtures/ks_files/ivi_with_active_partition.ks b/fixtures/ks_files/ivi_with_active_partition.ks new file mode 100644 index 0000000..39721f1 --- /dev/null +++ b/fixtures/ks_files/ivi_with_active_partition.ks @@ -0,0 +1,39 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part / --size 768 --ondisk sdb --fstype=ext4 --label platform +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --active + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +tzdata +kernel* +rpm +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/ivi_with_active_partition_gpt.ks b/fixtures/ks_files/ivi_with_active_partition_gpt.ks new file mode 100644 index 0000000..7f6c27c --- /dev/null +++ b/fixtures/ks_files/ivi_with_active_partition_gpt.ks @@ -0,0 +1,25 @@ +# -*-mic2-options-*- -f raw --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +#Partitions: size unit is MB +part / --size 768 --ondisk sdb --fstype=ext4 --label platform +part /boot --size 32 --ondisk sdb --fstype=ext4 --label boot --active + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --ptable=gpt --append="rootwait rootfstype=ext4 quiet" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages --ignoremissing +coreutils +bash +tzdata +kernel* +%end diff --git a/fixtures/ks_files/ivi_with_installerfw.ks b/fixtures/ks_files/ivi_with_installerfw.ks new file mode 100644 index 0000000..903ed7c --- /dev/null +++ b/fixtures/ks_files/ivi_with_installerfw.ks @@ -0,0 +1,44 @@ +# -*-mic2-options-*- -f raw --fstab=name --copy-kernel --compress-disk-image=bz2 --generate-bmap -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part /boot --size 64 --ondisk sdb --fstype=ext3 --label boot --active --align 1024 --part-type C12A7328-F81F-11D2-BA4B-00A0C93EC93B +part / --size 748 --ondisk sdb --fstype=ext4 --label platform --align 1024 + +rootpw tizen +xconfig --startxonboot +bootloader --timeout=0 --append="rootwait rootfstype=ext4" --ptable=gpt + +desktop --autologinuser=tizen +user --name tizen --groups audio,video,weston-launch --password 'tizen' + +installerfw_plugins "bootloader" + +repo --name=base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/ivi/latest/repos/atom/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +tzdata +kernel* +rpm +%end + +%post +rm -rf /root/.zypp +mkdir -p /usr/lib/systemd/system/graphical.target.wants +%end + +%post --nochroot +# buildname.nochroot +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release +fi +%end diff --git a/fixtures/ks_files/obsolete_test_one.ks b/fixtures/ks_files/obsolete_test_one.ks new file mode 100644 index 0000000..c018639 --- /dev/null +++ b/fixtures/ks_files/obsolete_test_one.ks @@ -0,0 +1,21 @@ +# -*-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 + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5 security=none" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-main --baseurl=http://linux-ftp.fi.intel.com/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=base2 --baseurl=file:///home/build/tmp_repo2/ +%packages +A +AAA +%end + diff --git a/fixtures/ks_files/obsolete_test_two.ks b/fixtures/ks_files/obsolete_test_two.ks new file mode 100644 index 0000000..8bfee15 --- /dev/null +++ b/fixtures/ks_files/obsolete_test_two.ks @@ -0,0 +1,21 @@ +# -*-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 + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5 security=none" + +desktop --autologinuser=tizen +user --name tizen --groups audio,video --password 'tizen' + +repo --name=Tizen-main --baseurl=http://linux-ftp.fi.intel.com/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=base2 --baseurl=file:///home/build/tmp_repo1/ +%packages +A +AA +%end + diff --git a/fixtures/ks_files/qcow_image.ks b/fixtures/ks_files/qcow_image.ks new file mode 100644 index 0000000..6b7fb49 --- /dev/null +++ b/fixtures/ks_files/qcow_image.ks @@ -0,0 +1,417 @@ +# -*-mic2-options-*- -f qcow --copy-kernel -*-mic2-options-*- + +# +# Do not Edit! Generated by: +# kickstarter.py +# + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles +part / --fstype="ext4" --size=3584 --ondisk=sda --active --label emulimg-3.0 --fsoptions=defaults,noatime + +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=common-emulator-wayland_i586 --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/daily/tizen/common/latest/repos/emulator32-wayland/packages/ --ssl_verify=no + +%packages + +@Generic Base +@Common Base +@Generic Console Tools +@Generic Packaging +@Common Packaging +@Generic Adaptation +@Generic Wayland +@Common Wayland +@Generic Middleware +@Common Middleware +@Generic Applications +@Generic Bluetooth +@Generic Multimedia +@Generic Desktop Applications +@Common Desktop Applications +@Generic Crosswalk +@Common Crosswalk +@Generic Qt5 +@Common Qt5 +@Generic Multimedia Intel + +kernel-profile-common + +sdbd +system-plugin-emulator +%end + + + +%post +#!/bin/sh +echo "#################### generic-base.post ####################" + +# setup systemd default target for user session +cat <<'EOF' >>/lib/systemd/user/default.target +[Unit] +Description=User session default target +EOF +mkdir -p /lib/systemd/user/default.target.wants + +# start dbus session +ln -s ../dbus.service /lib/systemd/user/default.target.wants/ + +# Run prelink to speed up dynamic binary/library loading +/usr/sbin/prelink --all + +ln -sf /proc/self/mounts /etc/mtab + +# sdx: fix smack labels on /var/log +chsmack -a '*' /var/log + +# workaround for bug PTREL-763 +patch -b -p1 -d/ <<'EOF' +--- bad/etc/pam.d/systemd-user 2014-03-20 10:01:36.657843073 +0100 ++++ good/etc/pam.d/systemd-user 2014-03-20 10:06:51.586121696 +0100 +@@ -4,5 +4,6 @@ + + account include system-auth + session include system-auth ++session required pam_systemd.so + auth required pam_deny.so + password required pam_deny.so +EOF + +# create appfw dirs inside homes +function generic_base_user_exists() { + user=$1 + getent passwd | grep -q ^${user}: +} + +function generic_base_user_home() { + user=$1 + getent passwd | grep ^${user}: | cut -f6 -d':' +} + +function generic_base_fix_user_homedir() { + user=$1 + generic_base_user_exists $user || return 1 + + homedir=$(generic_base_user_home $user) + mkdir -p $homedir/app_rw + for appdir in desktop manifest dbspace; do + mkdir -p $homedir/.applications/$appdir + done + find $homedir -type d -exec chsmack -a User {} \; + chown -R $user:users $homedir + return 0 +} + +#!/bin/sh +echo "############### common-base.post ################" + +######### multiuser mode: create additional users and fix their homedirs +tizen_crypted_pass=$(perl -e 'print crypt("tizen", "aa")') +uid=5001 + +for user in alice bob carol guest; do + if ! generic_base_user_exists $user; then + useradd -u $uid -d /home/$user -g users -G audio,video,users,display -m --password "$tizen_crypted_pass" $user + uid=$(( $uid + 1 )) + fi + + generic_base_fix_user_homedir $user +done + + + + +#!/bin/sh +echo "#################### generic-console-tools.post ####################" + +# customize bash prompt +cat >/etc/profile.d/bash_prompt_custom.sh <<'EOF' +if [ "$PS1" ]; then + + function proml { + # set a fancy prompt (overwrite the one in /etc/profile) + local default="\[\e[0m\]" + local usercol='\[\e[1;34m\]' # blue + local hostcol='\[\e[1;32m\]' # green + local pathcol='\[\e[1;33m\]' # yellow + local gitcol='\[\e[1;31m\]' # light red + local termcmd='' + local _p="$"; + + if [ "`id -u`" -eq 0 ]; then + usercol='\[\e[1;31m\]' + _p="#" + fi + + PS1="${usercol}\u${default}@${hostcol}\h${default}:${pathcol}\w${default}${gitcol}${default}${_p} ${termcmd}" + } + + proml + + function rcd () { + [ "${1:0:1}" == "/" ] && { cd $1; } || { cd $(pwd -P)/$1; } + } + + alias ll="ls -lZ" + alias lr="ls -ltrZ" + alias la="ls -alZ" + + function get_manifest () { + rpm -qa --queryformat="%{name} %{Version} %{Release} %{VCS}\n" | sort + } +fi +EOF + + +#!/bin/sh +echo "#################### generic-packaging.post ####################" + +rm -rf /root/.zypp + +# was: rpm.post +rm -f /var/lib/rpm/__db* +rpmdb --rebuilddb + + +#!/bin/sh +echo "############### common-packaging.post ################" + +# generate repo files for zypper +function genrepo() { + local url=$1 + local reponame=$2 + local filename=${3:-$2} + local enabled=${4:-0} + + local prefix=${TZ_BUILD_VENDOR}-${TZ_BUILD_PROFILE}-${TZ_BUILD_REPO} + + # remove double slashes if any + url=$(sed -e 's|/\+|/|g' -e 's|:/|://|' <<<$url) + + cat >> /etc/zypp/repos.d/$prefix-${filename}.repo << EOF +[$prefix-${reponame}] +name=$prefix-${reponame} +enabled=$enabled +autorefresh=0 +baseurl=${url}?ssl_verify=no +type=rpm-md +gpgcheck=0 + +EOF +} + +# source /etc/tizen-build.conf to get more infos about project, repos etc. +. /etc/tizen-build.conf + +# adjust build_id if this scripts executes before the replacement in /etc/tizen-build.conf +TZ_BUILD_ID=$(echo $TZ_BUILD_ID | sed 's|@BUILD_ID[@]|tizen-common_20141118.1|') + +# snapshot repo +genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/packages snapshot snapshot 1 +genrepo ${TZ_BUILD_SNAPSHOT_URL}/${TZ_BUILD_ID}/repos/${TZ_BUILD_REPO}/debug snapshot-debug snapshot 1 + +# latest repo +genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/packages update update 0 +genrepo ${TZ_BUILD_SNAPSHOT_URL}/latest/repos/${TZ_BUILD_REPO}/debug update-debug update 0 + +# daily repo +genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/packages daily daily 0 +genrepo ${TZ_BUILD_DAILY_URL}/latest/repos/${TZ_BUILD_REPO}/debug daily-debug daily 0 + +# weekly repo +genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/packages weekly weekly 0 +genrepo ${TZ_BUILD_WEEKLY_URL}/latest/repos/${TZ_BUILD_REPO}/debug weekly-debug weekly 0 + + +#!/bin/sh +echo "#################### generic-adaptation.post ####################" + +# fix TIVI-2291 +sed -ri "s/(^blacklist i8042.*$)/#fix from base-general.post \1/" /etc/modprobe.d/blacklist.conf + + +#!/bin/sh +echo "#################### generic-wayland.post ####################" + + +#!/bin/sh +echo "#################### common-wayland.post ##################" + +# add users to display group +for user in alice bob carol guest; do + if generic_base_user_exists $user; then + /usr/sbin/groupmod -A $user display + fi +done + +# Enable a logind session for users on seat0 (the default seat for +# graphical sessions) +unitdir=/usr/lib/systemd/system +mkdir -p $unitdir/graphical.target.wants +for user in alice bob carol guest; do + generic_base_user_exists $user || continue + uid=$(getent passwd $user|cut -f3 -d':') + ln -s ../user-session-launch@.service $unitdir/graphical.target.wants/user-session-launch@seat0-$uid.service +done + +# user sessions must start after graphical target +patch -b -p1 -d/ <<'EOF' +--- /lib/systemd/system/user-session-launch@.service.orig 2014-03-17 17:50:18.000000000 -0700 ++++ /lib/systemd/system/user-session-launch@.service 2014-04-15 06:03:45.555682575 -0700 +@@ -1,7 +1,7 @@ + [Unit] + Description=User Session Launcher +-After=systemd-user-sessions.service systemd-logind.service +-Requires=systemd-logind.service ++After=systemd-user-sessions.service systemd-logind.service display-manager.path ++Requires=systemd-logind.service display-manager.path + + [Service] + ExecStart=/usr/bin/user-session-launch %i +EOF + +# clean weston target inside user session (installed by weston) +rm -f /usr/lib/systemd/user/weston.target + + +#{ Add installed apps for tizen to launcher if not present +dst="/usr/share/applications/tizen/launcher.conf" + +if [ -w "$dst" ] ; then + ls /usr/share/applications/tizen/*.desktop \ + | while read src; do + grep "$src" "$dst" \ + || { [ ! -r "$src" ] || echo "$src" >> "$dst" ; } + + done +fi + +#} + +# tag the background image with the current snapshot id +arch=$(rpm -qa | grep kernel-common | awk -F- '{printf("%s %s",$3,$4);}') +/usr/bin/mark_image.py /usr/share/backgrounds/tizen/current "Tizen Common: tizen-common_20141118.1 $arch" ffffff 50 90 95 95 + + +#!/bin/sh +echo "#################### generic-middleware.post ####################" + + +#!/bin/sh +echo "############### common-middleware.post ################" + + +#!/bin/sh +echo "#################### generic-applications.post ####################" + + +#!/bin/sh +echo "#################### generic-bluetooth.post ####################" + + +#!/bin/sh +echo "#################### generic-multimedia.post ####################" + + +#!/bin/sh +echo "#################### generic-desktop-applications.post ####################" + +# temp workaround to fill each user app_info database with global db infos +. /etc/tizen-platform.conf +ail_initdb +pkg_initdb + +# depends on generic-base functions +function generic_desktop_applications_fix_userhome() { + user=$1 + + generic_base_user_exists $user || return 1 + homedir=$(generic_base_user_home $user) + + echo "Fix app_info.db of $user" + chown -R $user:users $homedir/.applications/dbspace/ +} + + + +#!/bin/sh +echo "############### common-desktop-applications.post ################" + +# call function defined in meta-generic +for user in alice bob carol guest; do + generic_desktop_applications_fix_userhome $user +done + + + +#!/bin/sh +echo "#################### generic-crosswalk.post ####################" + +# make crosswak start in user session (default target) +mkdir -p /lib/systemd/user/default.target.wants/ +ln -s ../xwalk.service /lib/systemd/user/default.target.wants/ + + + +#!/bin/sh +echo "############### common-crosswalk.post ################" + +# start wrt widgets preinstall +prepare_widgets.sh + + +#!/bin/sh +echo "#################### generic-qt5.post ####################" + + +#!/bin/sh +echo "############### common-qt5.post ################" + +list=' +qt5-qtdeclarative-examples +qt5-cinematic-experience +' + +dst="/usr/share/applications/tizen/launcher.conf" + +if [ -w "$dst" ] ; then + for app in $list ; do + src="/usr/share/applications/$app.desktop" + + grep "$src" "$dst" \ + || { [ ! -r "$src" ] || echo "$src" >> "$dst" ; } + + done +fi + +#!/bin/sh +echo "#################### generic-multimedia-intel.post ####################" + + + +%end + +%post --nochroot +####################### buildname.nochroot ####################### +if [ -n "$IMG_NAME" ]; then + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/tizen-release + echo "BUILD_ID=$IMG_NAME" >> $INSTALL_ROOT/etc/os-release + echo "$IMG_NAME tizen-common_20141118.1" >>$INSTALL_ROOT/etc/tizen-snapshot + + sed -ri \ + -e 's|@BUILD_ID[@]|tizen-common_20141118.1|g' \ + -e "s|@BUILD_DATE[@]|$(date +%Y%m%d_%H%M%S)|g" \ + $INSTALL_ROOT/etc/tizen-build.conf +fi + + +%end diff --git a/fixtures/ks_files/strict_mode.ks b/fixtures/ks_files/strict_mode.ks new file mode 100644 index 0000000..c139313 --- /dev/null +++ b/fixtures/ks_files/strict_mode.ks @@ -0,0 +1,21 @@ +# -*-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 + +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://linux-ftp.fi.intel.com/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://linux-ftp.fi.intel.com/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=myrepo --baseurl=file:///home/build/strict_mode + +%packages +hello +%end diff --git a/fixtures/ks_files/whole_rd_210.ks b/fixtures/ks_files/whole_rd_210.ks new file mode 100644 index 0000000..6ddd444 --- /dev/null +++ b/fixtures/ks_files/whole_rd_210.ks @@ -0,0 +1,64 @@ +# -*-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 America/Los_Angeles +# ROOT fs partition +part / --size=800 --ondisk mmcblk0p --fstype=ext4 --label=platform +# DATA partition +part /opt/ --size=200 --ondisk mmcblk0p --fstype=ext4 --label=data +# UMS partition +part /opt/usr/ --size=300 --ondisk mmcblk0p --fstype=ext4 --label=ums + +rootpw tizen +bootloader --timeout=0 --append="rootdelay=5" + +desktop --autologinuser=root +user --name root --groups audio,video --password '' + +repo --name=Tizen-base --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.0/latest/repos/base/ia32/packages/ --save --gpgkey=0 --ssl_verify=no +repo --name=Tizen-main --baseurl=http://linux-ftp.fi.intel.com/pub/mirrors/tizen/releases/2.0/latest/repos/main/ia32/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +shadow-utils +coreutils +bash +kernel* +%end + +%prepackages +eglibc +libgcc +libudev +libattr +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end +%post +echo 'kickstart post script start' +if [ -d /etc/init.d ]; then + cp /etc/init.d/* /etc/rc.d/init.d/ -rdf +fi +rm -rf /etc/init.d* +ln -sf /etc/rc.d/init.d /etc/init.d +%end + +%post --nochroot +if [ -f /etc/device-sec-policy ]; then + cp -fp /etc/device-sec-policy $INSTALL_ROOT/etc/ +fi + +if [ -d /etc/smack/accesses.d ]; then + mkdir -p $INSTALL_ROOT/opt/etc/smack/accesses.d + cp -rfp /etc/smack/accesses.d/* $INSTALL_ROOT/opt/etc/smack/accesses.d/ +fi +%end diff --git a/fixtures/py_scripts/test_logging.py b/fixtures/py_scripts/test_logging.py new file mode 100644 index 0000000..0c7332c --- /dev/null +++ b/fixtures/py_scripts/test_logging.py @@ -0,0 +1,11 @@ +import logging +from mic import msger +import os + +logging.basicConfig() +main = logging.getLogger('mic') +first_output = main.info('hello') +raw = logging.getLogger('mic.raw') +two_level_output = raw.info('raw') +imager = logging.getLogger('mic.raw.imager') +three_level_output = raw.info('imager') diff --git a/fixtures/rpm/A-2.0-1.x86_64.rpm b/fixtures/rpm/A-2.0-1.x86_64.rpm new file mode 100644 index 0000000..3e87465 Binary files /dev/null and b/fixtures/rpm/A-2.0-1.x86_64.rpm differ diff --git a/fixtures/rpm/AA-1.0-1.x86_64.rpm b/fixtures/rpm/AA-1.0-1.x86_64.rpm new file mode 100644 index 0000000..7716583 Binary files /dev/null and b/fixtures/rpm/AA-1.0-1.x86_64.rpm differ diff --git a/fixtures/rpm/AAA-1.0-1.x86_64.rpm b/fixtures/rpm/AAA-1.0-1.x86_64.rpm new file mode 100644 index 0000000..69a07de Binary files /dev/null and b/fixtures/rpm/AAA-1.0-1.x86_64.rpm differ diff --git a/fixtures/rpm/pri_rpm/fake-1.0-1.i586.rpm b/fixtures/rpm/pri_rpm/fake-1.0-1.i586.rpm new file mode 100644 index 0000000..e75aea3 Binary files /dev/null and b/fixtures/rpm/pri_rpm/fake-1.0-1.i586.rpm differ diff --git a/fixtures/rpm/pri_rpm/fake-2.0-1.i586.rpm b/fixtures/rpm/pri_rpm/fake-2.0-1.i586.rpm new file mode 100644 index 0000000..b0f3fb4 Binary files /dev/null and b/fixtures/rpm/pri_rpm/fake-2.0-1.i586.rpm differ diff --git a/fixtures/rpm/sed-4.1.5-2.2.armv7l.rpm b/fixtures/rpm/sed-4.1.5-2.2.armv7l.rpm new file mode 100644 index 0000000..a0c9cd2 Binary files /dev/null and b/fixtures/rpm/sed-4.1.5-2.2.armv7l.rpm differ diff --git a/fixtures/rpm/sed-4.2.1-1.3.i686.rpm b/fixtures/rpm/sed-4.2.1-1.3.i686.rpm new file mode 100644 index 0000000..888eca2 Binary files /dev/null and b/fixtures/rpm/sed-4.2.1-1.3.i686.rpm differ diff --git a/fixtures/rpm/strict_mode_rpm/hello-1.0-1.x86_64.rpm b/fixtures/rpm/strict_mode_rpm/hello-1.0-1.x86_64.rpm new file mode 100644 index 0000000..22acece Binary files /dev/null and b/fixtures/rpm/strict_mode_rpm/hello-1.0-1.x86_64.rpm differ diff --git a/fixtures/scripts/compute_space.sh b/fixtures/scripts/compute_space.sh new file mode 100644 index 0000000..bdc2349 --- /dev/null +++ b/fixtures/scripts/compute_space.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +compute_space(){ +left_space=`df -h | grep '/$' | awk '{print $4}'` +if echo $left_space | grep -q 'G' + then + space_number=`echo $left_space | awk -F 'G' '{print $1}'` + int_value=`awk "BEGIN{print int($space_number)}"` + if [ $int_value -lt 2 ] + then + echo 'space not enough' + fi +else + echo 'space not enough' +fi +echo 'continue run' +} +compute_space \ No newline at end of file diff --git a/fixtures/scripts/compute_volume.sh b/fixtures/scripts/compute_volume.sh new file mode 100644 index 0000000..90e943f --- /dev/null +++ b/fixtures/scripts/compute_volume.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +compute_volume(){ + + volume=`du $1 -sh | awk '{print $1}'` + if echo $volume | grep -q 'G' + then + original_value=`echo $volume | awk -F 'G' '{print $1}'` + m_value=`echo $original_value \* 1000 | bc` + m_value=`awk "BEGIN{print int($m_value)}"` + elif echo $volume | grep -q 'M' + then + m_value=`echo $volume | awk -F 'M' '{print $1}'` + fi + echo $m_value +} + +#result=`compute_volume /home/lhh/testspace/running/b6e402d31bcd42f8bbb94929c1d83fea/out1/platform.img` +#echo $result \ No newline at end of file diff --git a/packaging/.gitignore b/packaging/.gitignore new file mode 100644 index 0000000..8f8a7ab --- /dev/null +++ b/packaging/.gitignore @@ -0,0 +1,2 @@ +.osc/ +itest-cases-mic*.tar.gz diff --git a/packaging/Makefile b/packaging/Makefile new file mode 100644 index 0000000..4d69ab4 --- /dev/null +++ b/packaging/Makefile @@ -0,0 +1,19 @@ +PKG_NAME := itest-cases-mic +SPECFILE = $(addsuffix .spec, $(PKG_NAME)) +PKG_VERSION := $(shell grep '^Version: ' $(SPECFILE)|awk '{print $$2}') + +TARBALL := $(PKG_NAME)_$(PKG_VERSION).tar.gz + +dsc: tarball + $(eval MD5=$(shell md5sum $(TARBALL) | sed "s/ / $(shell stat -c '%s' $(TARBALL)) /")) + sed -i 's/^Version:.*/Version: $(PKG_VERSION)/' $(PKG_NAME).dsc + sed -i 's/ [a-f0-9]\+ [0-9]\+ $(PKG_NAME).*tar.*/ $(MD5)/' $(PKG_NAME).dsc + +tarball: + cd .. && git archive --prefix $(PKG_NAME)-$(PKG_VERSION)/ HEAD \ + | gzip > packaging/$(TARBALL) + +clean: + rm -f $(PKG_NAME)*tar* + +all: tarball dsc diff --git a/packaging/itest-cases-mic.changes b/packaging/itest-cases-mic.changes new file mode 100644 index 0000000..0a6f8b4 --- /dev/null +++ b/packaging/itest-cases-mic.changes @@ -0,0 +1,5 @@ +* Wed Sep 26 2013 Huang Hao a7c12c5 +- Add packaging files +- Adding changelog cases and corresponding fixtures +- Initial commit + diff --git a/packaging/itest-cases-mic.dsc b/packaging/itest-cases-mic.dsc new file mode 100644 index 0000000..f534176 --- /dev/null +++ b/packaging/itest-cases-mic.dsc @@ -0,0 +1,10 @@ +Format: 1.0 +Source: itest-cases-mic +Version: 0.1 +Binary: itest-cases-mic +Maintainer: Huanhuan Li +Architecture: all +Standards-Version: 1.0 +Build-Depends: debhelper (>= 4.0.0) +Files: + 29502675ffc3d433d10df2a99a4bf4fc 13019 itest-cases-mic_0.1.tar.gz diff --git a/packaging/itest-cases-mic.spec b/packaging/itest-cases-mic.spec new file mode 100644 index 0000000..acb0531 --- /dev/null +++ b/packaging/itest-cases-mic.spec @@ -0,0 +1,34 @@ +Name: itest-cases-mic +Summary: Cases for mic functional testing +Version: 0.1 +Release: 1 +Group: Development/Tools/Other +License: GPLv2 +Source0: %{name}_%{version}.tar.gz + +BuildArch: noarch +%if 0%{?suse_version} +BuildRequires: sudo +%endif + +Requires: tar +Requires: man +Requires: unzip +Requires: createrepo + +%description +mic functional test cases in format of itest + +%prep +%setup -q -n %{name}-%{version} + +%build +make build + +%install +make PREFIX=%{buildroot} install + +%files +%defattr(-,root,root,-) +/srv/itest/ +%{_sysconfdir}/sudoers.d/itest_cases_mic diff --git a/report.html b/report.html new file mode 100644 index 0000000..a8b7de8 --- /dev/null +++ b/report.html @@ -0,0 +1,18 @@ +<%inherit file="base.html" /> + +<%block name="after_overview"> + + +

Dependencies

+ +%for pkg, ver in status.deps: + + + + +%endfor +
${pkg}${ver}
+ + + + diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..3bf825c --- /dev/null +++ b/settings.py @@ -0,0 +1,73 @@ +import re +import os +import random +import platform +import subprocess + +from itest.utils import check_output + + +CWD = os.path.dirname(os.path.abspath(__file__)) + +SUDO_PASSWD = os.environ.get('ITEST_SUDO_PASSWD', '123456') +RUN_CASE_TIMEOUT=60*60*3 +HANGING_TIMEOUT = 15 * 60 # 15 minutes +TZ = 'Asia/Shanghai' + +def sample_files(path, k, predict=None): + def find_files(top): + for dirpath, _dirnames, filenames in os.walk(top): + for name in filenames: + path = os.path.join(dirpath, name) + if not predict or predict(path): + yield path + + files = list(find_files(path)) + idx = random.sample(range(0, len(files)), min(k, len(files))) + return [ files[i] for i in idx ] + +def is_bootstrap_file(case_path): + cases = subprocess.Popen('grep native %s' % (case_path), shell=True, stdout=subprocess.PIPE).communicate()[0] + return cases == '' + +def random_tests(predict=None): + path = os.path.join(CWD, 'cases') + def squrash(a, b): + a.extend(b) + return a + return reduce(squrash, [ sample_files(os.path.join(path, comp), 2, predict) + for comp in os.listdir(path) ]) + + +def get_specific_cases(type): + if type == 'native': + cmd = "grep 'runtime=native' cases/create/ -rl" + elif type == 'bootstrap': + cmd = "grep 'runtime=native' cases/create/ -rL" + elif type == 'fast': + cases = [ 'cases/create/func_cases/mic_cr_auto_raw.case', + 'cases/create/func_cases/mic_cr_auto_loop.case' ] + for case in cases: + full_path = os.path.join(CWD, case) + cases[cases.index(case)] = full_path + return cases + proc = subprocess.Popen(cmd, + shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = proc.communicate() + cases = stdout.split() + for case in cases: + full_path = os.path.join(CWD, case) + cases[cases.index(case)] = full_path + return cases + +SUITES = { + 'random': random_tests(), + 'fast': random_tests(is_bootstrap_file), + #'ref-updated': 'fast', + #'patchset-created': 'fast', + 'ref-updated': get_specific_cases('fast'), + 'patchset-created': get_specific_cases('fast'), + 'bootstrap': get_specific_cases('bootstrap'), + 'native': get_specific_cases('native') +} diff --git a/sudoers.itest_cases_mic b/sudoers.itest_cases_mic new file mode 100644 index 0000000..66f46f9 --- /dev/null +++ b/sudoers.itest_cases_mic @@ -0,0 +1,37 @@ +Cmnd_Alias RM = /bin/rm +Cmnd_Alias MIC = /bin/mic, /usr/bin/mic, /usr/local/bin/mic +Cmnd_Alias TEST = /bin/test, /usr/bin/test +Cmnd_Alias SETENFORCE = /bin/setenforce, /usr/sbin/setenforce +Cmnd_Alias TAR = /bin/tar, /usr/bin/tar +Cmnd_Alias BUNZIP2 = /bin/bunzip2, /usr/bin/bunzip2 +Cmnd_Alias MKDIR = /usr/bin/mkdir, /bin/mkdir +Cmnd_Alias WHICH = /usr/bin/which +Cmnd_Alias KPARTX = /sbin/kpartx, /usr/sbin/kpartx +Cmnd_Alias UMOUNT = /bin/umount, /usr/bin/umount +Cmnd_Alias MOUNT = /bin/mount, /usr/bin/mount +Cmnd_Alias LOSETUP = /sbin/losetup, /usr/sbin/losetup +Cmnd_Alias PARTED = /sbin/parted, /usr/sbin/parted +Cmnd_Alias BLKID = /sbin/blkid, /usr/sbin/blkid +Cmnd_Alias CHROOT = /usr/sbin/chroot, /usr/bin/chroot +Cmnd_Alias CREATEREPO = /usr/bin/createrepo +Cmnd_Alias XARGS = /usr/bin/xargs +Cmnd_Alias GUNZIP = /bin/gunzip, /usr/bin/gunzip +Cmnd_Alias UNZIP = /usr/bin/unzip +Cmnd_Alias EGREP = /bin/egrep, /usr/bin/egrep +Cmnd_Alias MV = /usr/bin/mv, /bin/mv +Cmnd_Alias SPM = /usr/bin/spm +Cmnd_Alias CP = /bin/cp, /usr/bin/cp +Cmnd_Alias SED = /bin/sed, /usr/bin/sed +Cmnd_Alias FDISK = /sbin/fdisk, /usr/sbin/fdisk +Cmnd_Alias LZOP = /usr/bin/lzop +Cmnd_Alias PYTHON = /usr/bin/python +Cmnd_Alias LS = /bin/ls +Cmnd_Alias MD5SUM = /usr/bin/md5sum +Cmnd_Alias SHA1SUM = /usr/bin/sha1sum +Cmnd_Alias SHA256SUM = /usr/bin/sha256sum +Cmnd_Alias YUM = /usr/bin/yum +Cmnd_Alias ZYPPER = /usr/bin/zypper +Cmnd_Alias APTGET = /usr/bin/apt-get +Cmnd_Alias RPM = /usr/bin/rpm, /bin/rpm +build ALL=(ALL) NOPASSWD: MIC, TEST, RM, SETENFORCE, TAR, BUNZIP2, MKDIR, CHROOT, WHICH, KPARTX, UMOUNT, MOUNT, LOSETUP, PARTED, CREATEREPO, XARGS, BLKID, EGREP, GUNZIP, UNZIP, MV, CP, SED, FDISK, SPM, LZOP, PYTHON, LS, MD5SUM, SHA1SUM, SHA256SUM, YUM, ZYPPER, APTGET, RPM +Defaults env_keep+="http_proxy https_proxy no_proxy" diff --git a/tmp_ignore/mic_cr_livecd_native_check_chroot.case b/tmp_ignore/mic_cr_livecd_native_check_chroot.case new file mode 100644 index 0000000..63ea20f --- /dev/null +++ b/tmp_ignore/mic_cr_livecd_native_check_chroot.case @@ -0,0 +1,24 @@ + + 1.0 + Test whether it is ok to chroot into the image + + + + + + diff --git a/tmp_ignore/mic_cr_liveusb_native_check_chroot.case b/tmp_ignore/mic_cr_liveusb_native_check_chroot.case new file mode 100644 index 0000000..eeeccf0 --- /dev/null +++ b/tmp_ignore/mic_cr_liveusb_native_check_chroot.case @@ -0,0 +1,24 @@ + + 1.0 + Test whether it is ok to chroot into the image + + + + + + diff --git a/tmp_ignore/mic_cr_loop_conf_not_current_dir_ia32.case b/tmp_ignore/mic_cr_loop_conf_not_current_dir_ia32.case new file mode 100644 index 0000000..178b3b3 --- /dev/null +++ b/tmp_ignore/mic_cr_loop_conf_not_current_dir_ia32.case @@ -0,0 +1,21 @@ + + Test whether mic find the conf which is not under current dir or 'ks' dir when running in bootstrap mode. + + + + + + +