From bb1390b926b577c469eb1b4447f27d5ab8d45538 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 23 Sep 2016 18:24:35 +0800 Subject: [PATCH] Add subcommand option parameters(-v, -d, -i) in ks file --- cases/create/func_cases/mic_cr_auto_fs_d_v_i.case | 41 +++++++++++++++++++++++ fixtures/ks_files/handset_blackbay_fs_d_v_i.ks | 40 ++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 cases/create/func_cases/mic_cr_auto_fs_d_v_i.case create mode 100644 fixtures/ks_files/handset_blackbay_fs_d_v_i.ks diff --git a/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case b/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case new file mode 100644 index 0000000..f251626 --- /dev/null +++ b/cases/create/func_cases/mic_cr_auto_fs_d_v_i.case @@ -0,0 +1,41 @@ + + test 'mic cr auto ks' for fs type with -d -v -i in ks file + 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-*- -d -v -i -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/fixtures/ks_files/handset_blackbay_fs_d_v_i.ks b/fixtures/ks_files/handset_blackbay_fs_d_v_i.ks new file mode 100644 index 0000000..f13300c --- /dev/null +++ b/fixtures/ks_files/handset_blackbay_fs_d_v_i.ks @@ -0,0 +1,40 @@ +# -*-mic2-options-*- -d -v -i -f fs --pack-to=@NAME@-rs.tar.gz -*-mic2-options-*- + +lang en_US.UTF-8 +keyboard us +timezone --utc America/Los_Angeles + +part / --size 448 --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://109.123.123.185/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://109.123.123.185/repo/download.tizen.org/releases/2.2/tizen-2.2_20130719.3/repos/tizen-main/ia32/packages/ --save --gpgkey=0 --ssl_verify=no + +%packages +coreutils +bash +kernel* +%end + +%attachment +preos-runtime +bootstub-bb +/boot/cmdline +/boot/vmlinuz-* +%end + +%post +# Set environment for launchpad daemon. Fix TDIST-264 +cat > /etc/sysconfig/launchpad <