diff options
author | Shuangquan Zhou <shuangquan.zhou@intel.com> | 2011-08-19 17:19:18 +0800 |
---|---|---|
committer | Shuangquan Zhou <shuangquan.zhou@intel.com> | 2011-08-19 17:19:18 +0800 |
commit | a8dd5ded120dc8e9cca7b0455209e7ba463b29e7 (patch) | |
tree | a871222b3f27bdd3852bf649c503a6c91fb35167 /tests | |
parent | 299629eca997b30c11fef0b709ce7548ca0f3484 (diff) | |
download | mic-a8dd5ded120dc8e9cca7b0455209e7ba463b29e7.tar.gz mic-a8dd5ded120dc8e9cca7b0455209e7ba463b29e7.tar.bz2 mic-a8dd5ded120dc8e9cca7b0455209e7ba463b29e7.zip |
Updated MIC autotest framework
Signed-off-by: Shuangquan Zhou <shuangquan.zhou@intel.com>
Diffstat (limited to 'tests')
34 files changed, 113 insertions, 782 deletions
diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..3bd0751 --- /dev/null +++ b/tests/README @@ -0,0 +1,23 @@ +---------------------- +MIC autotest framework +---------------------- + +Included testcase: +=================== +* check image creation +* check root permission +* check availability of ks file + +Basic usage description: +======================== +- add testcase + * customize your own testcase, meet your own needs + run the shell script named "addcase", follow its usage: + ./addcase.sh <casename> <caseks>. <casename> represents the name of + your testcase, <caseks> represents your ks file + +- run mic-test + * test MIC with all testcases + run "make test" or "python mic-test.py", you will get the result of + the sanity test(included testcase + custom testcase). The format of + the result looks like this: testcase name ... FAIL | ok diff --git a/tests/mic_cases/base/test.ks b/tests/mic_cases/base/test.ks index fc43108..6297591 100644 --- a/tests/mic_cases/base/test.ks +++ b/tests/mic_cases/base/test.ks @@ -1,61 +1,53 @@ -# +# # Do not Edit! Generated by: # kickstarter.py # lang en_US.UTF-8 keyboard us -timezone --utc America/New_York -auth --useshadow --enablemd5 +timezone --utc America/Los_Angeles part / --size 3000 --ondisk sda --fstype=ext3 rootpw meego xconfig --startxonboot bootloader --timeout=0 --append="quiet" -desktop --autologinuser=meego +desktop --autologinuser=meego user --name meego --groups audio,video --password meego -repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego +repo --name=1.2-oss --baseurl=http://download.meego.com/snapshots/1.2.0.90.12.20110808.80/repos/oss/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego +repo --name=1.2-non-oss --baseurl=http://download.meego.com/snapshots/1.2.0.90.12.20110808.80/repos/non-oss/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego %packages -@MeeGo Core -@MeeGo Netbook Desktop -@X for Netbooks + +@MeeGo Base Development +@Base Double Byte IME Support @MeeGo Compliance +@MeeGo Core @MeeGo X Window System -@Virtual Machine Support -@Games +@X for Netbooks +@MeeGo Netbook +@MeeGo Netbook Desktop @Printing -@Base Double Byte IME Support -@MeeGo Base Development +@Games + +kernel-adaptation-pinetrail -kernel -chromium +chromium +-adobe-release +-flash-plugin %end %post - # save a little bit of space at least... rm -f /boot/initrd* -# make sure there aren't core files lying around -rm -f /core* - - - # Prelink can reduce boot time if [ -x /usr/sbin/prelink ]; then /usr/sbin/prelink -aRqm fi - -# work around for poor key import UI in PackageKit rm -f /var/lib/rpm/__db* rpm --rebuilddb -if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-meego ]; then - rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-meego -fi - %end @@ -63,4 +55,6 @@ fi if [ -n "$IMG_NAME" ]; then echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release fi + + %end diff --git a/tests/mic_cases/test-bootstrap/expect b/tests/mic_cases/test-bootstrap/expect deleted file mode 100644 index c785ffa..0000000 --- a/tests/mic_cases/test-bootstrap/expect +++ /dev/null @@ -1 +0,0 @@ -Please use -b | --build-bootstrap with -B | --bootstrap together diff --git a/tests/mic_cases/test-bootstrap/options b/tests/mic_cases/test-bootstrap/options deleted file mode 100644 index 013c204..0000000 --- a/tests/mic_cases/test-bootstrap/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f livecd -b diff --git a/tests/mic_cases/test-creatprc/expect b/tests/mic_cases/test-creatprc/expect deleted file mode 100644 index 4033a56..0000000 --- a/tests/mic_cases/test-creatprc/expect +++ /dev/null @@ -1 +0,0 @@ -Unable to set unencrypted password due to lack of /usr/sbin/chpasswd diff --git a/tests/mic_cases/test-creatprc/ks.p b/tests/mic_cases/test-creatprc/ks.p deleted file mode 100644 index a7b200d..0000000 --- a/tests/mic_cases/test-creatprc/ks.p +++ /dev/null @@ -1,41 +0,0 @@ ---- ./mic_cases/base/test.ks 2011-02-25 09:21:41.778621925 +0800 -+++ /home/zhou/Code/min_nb.ks 2011-02-23 12:19:12.453405953 +0800 -@@ -1,4 +1,4 @@ --# -+# - # Do not Edit! Generated by: - # kickstarter.py - # -@@ -15,25 +15,17 @@ desktop --autologinuser=meego - user --name meego --groups audio,video --password meego - - repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -+repo --name=oss-source --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/source/ --source - --%packages --@MeeGo Core --@MeeGo Netbook Desktop --@X for Netbooks --@MeeGo Compliance --@MeeGo X Window System --@Virtual Machine Support --@Games --@Printing --@Base Double Byte IME Support --@MeeGo Base Development -- --kernel --chromium -+%packages --ignoremissing -+libacl -+alsa-lib -+libattr -+basesystem -+bash - %end - - %post -- - # save a little bit of space at least... - rm -f /boot/initrd* - diff --git a/tests/mic_cases/test-creatprc/options b/tests/mic_cases/test-creatprc/options deleted file mode 100644 index 9620766..0000000 --- a/tests/mic_cases/test-creatprc/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f livecd diff --git a/tests/mic_cases/test-genimg/ks.p b/tests/mic_cases/test-genimg/ks.p index a5d57ea..e69de29 100644 --- a/tests/mic_cases/test-genimg/ks.p +++ b/tests/mic_cases/test-genimg/ks.p @@ -1,376 +0,0 @@ ---- ./mic_cases/base/test.ks 2011-02-25 09:21:41.778621925 +0800 -+++ /home/zhou/Code/minimal.ks 2011-02-25 15:22:26.878620886 +0800 -@@ -1,66 +1,322 @@ --# --# Do not Edit! Generated by: --# kickstarter.py --# -+# kickstart file for MeeGo minimal compliance image -+# Usage: $ sudo mic-image-creator --run-mode=0 --cache=mycachedir --format=fs --config=<meego-minimal-compliance-xxxx.ks> --package=tar.bz2 --include-source - - lang en_US.UTF-8 - keyboard us --timezone --utc America/New_York -+timezone --utc America/Los_Angeles - auth --useshadow --enablemd5 --part / --size 3000 --ondisk sda --fstype=ext3 --rootpw meego --xconfig --startxonboot -+part / --size 1600 --ondisk sda --fstype=ext3 -+rootpw meego - bootloader --timeout=0 --append="quiet" --desktop --autologinuser=meego --user --name meego --groups audio,video --password meego -+user --name meego --groups audio,video --password meego - -+repo --name=non-oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/non-oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///eetc/pki/rpm-gpg/RPM-GPG-KEY-meego - repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego - --%packages --@MeeGo Core --@MeeGo Netbook Desktop --@X for Netbooks --@MeeGo Compliance --@MeeGo X Window System --@Virtual Machine Support --@Games --@Printing --@Base Double Byte IME Support --@MeeGo Base Development -- --kernel --chromium -+%packages --ignoremissing -+libacl -+alsa-lib -+libattr -+basesystem -+bash -+bluez -+bluez-libs -+buteo-mtp -+buteo-syncfw -+buteo-syncml -+buteo-sync-plugins -+bzip2-libs -+cairo -+chkconfig -+connman -+ConsoleKit -+ConsoleKit-libs -+contextkit -+coreutils -+cryptsetup-luks -+curl -+libcurl -+cyrus-sasl-lib -+db4 -+db4-utils -+dbus -+dbus-libs -+dbus-x11 -+dbus-glib -+desktop-file-utils -+device-mapper-libs -+dsme -+libiphb -+e2fsprogs -+e2fsprogs-libs -+libcom_err -+libss -+eggdbus -+elfutils-libelf -+exempi -+expat -+farsight2 -+file-libs -+filesystem -+flac -+fontconfig -+freetype -+gamin -+libgcc -+libstdc++ -+GConf-dbus -+gdbm -+giflib -+glib2 -+glibc -+glibc-common -+gmime -+gnupg2 -+gnutls -+grep -+gssdp -+gst-plugins-base -+gst-plugins-good -+gstreamer -+gtk2 -+gupnp -+gupnp-igd -+hwdata -+libicu -+jasper -+jasper-libs -+kcalcore -+kernel>=2.6.35 -+keyutils-libs -+krb5-libs -+lcms -+lcms-libs -+libaccounts-glib -+libaccounts-qt -+libarchive -+libatasmart -+libcap -+libcreds2 -+libdaemon -+libdres -+ohm-plugin-resolver -+libdrm -+libdsme -+libexif -+libffi -+libfontenc -+libgcrypt -+libgdbus -+libgee -+libgnome-keyring -+libgpg-error -+libgsf -+libical -+libICE -+libidn -+libiodata -+libjpeg -+libmng -+libnice -+libnl -+libogg -+libpng -+libprolog -+libqmlog -+libqttracker -+libresource -+libresource-client -+satsolver-tools -+libsignon -+libsignon-passwordplugin -+libsignon-saslplugin -+libSM -+libsndfile -+libsoup -+libtasn1 -+libtelepathy -+libthai -+libtheora -+libtiff -+libtool-ltdl -+libtrace -+libusb -+libuser -+libvisual -+libvorbis -+libX11 -+libXau -+libXaw -+libxcb -+libXcomposite -+libXcursor -+libXdamage -+libXext -+libXfixes -+libXfont -+libXft -+libXi -+libXinerama -+libxkbfile -+libxml2 -+libXmu -+libXpm -+libXrandr -+libXrender -+libXt -+libXtst -+libXv -+libXxf86vm -+libzypp -+/usr/lib/libGL.so.1 -+/usr/lib/libEGL.so.1 -+mesa-libGLUT -+mesa-libOSMesa -+mingetty -+ncurses -+ncurses-base -+ncurses-libs -+nspr -+nss -+nss-softokn-freebl -+nss-sysinit -+o3read -+obexd -+ofono -+ohm -+ohm-config -+ohm-plugin-core -+ohm-plugins-misc -+openjpeg-libs -+openobex -+openssl -+orc -+PackageKit -+PackageKit-glib -+PackageKit-gtk-module -+PackageKit-qt -+PackageKit-zypp -+pam -+pango -+passwd -+pciutils -+pcre -+libphonon4 -+pixman -+pm-utils -+polkit -+poppler -+poppler-utils -+popt -+pulseaudio -+python -+python-libs -+qjson -+libqtcore4 -+libqtdbus4 -+libqtdeclarative4 -+libqtdeclarative4-folderlistmodel -+libqtdeclarative4-gestures -+libqtdeclarative4-particles -+libqtdesigner4 -+libqtgui4 -+libqtnetwork4 -+libqtopengl4 -+libqtscript4 -+libqtsql4 -+libqtsql4-sqlite -+libqtsvg4 -+libqttest4 -+libqtxml4 -+libqtxmlpatterns4 -+qtcontacts-tracker -+libdeclarative-contacts -+libdeclarative-multimedia -+libdeclarative-publishsubscribe -+libdeclarative-sensors -+libdeclarative-serviceframework -+libqtcontacts1 -+libqtlocation1 -+libqtmessaging1 -+libqtmultimediakit1 -+libqtpublishsubscribe1 -+libqtsensors1 -+libqtserviceframework1 -+libqtsysteminfo1 -+libqtversit1 -+qt-mobility -+servicefw -+libqtwebkit4 -+libqtwebkit-qmlwebkitplugin -+readline -+rpm -+rpm-libs -+rtkit -+sed -+sensorfw -+setup -+sg3_utils-libs -+shadow-utils -+shared-mime-info -+sofia-sip -+sofia-sip-glib -+speex -+sqlite -+swi-prolog -+swi-prolog-library -+swi-prolog-library-core -+sysvinit -+sysvinit-tools -+taglib -+telepathy-farsight -+telepathy-gabble -+telepathy-glib -+telepathy-mission-control -+telepathy-qt4 -+telepathy-qt4-farsight -+telepathy-ring -+telepathy-sofiasip -+telepathy-stream-engine -+timed -+tinycdb -+totem-pl-parser -+tracker -+tzdata -+libgudev1 -+libudev -+udev -+udisks -+upower -+usermode -+libblkid -+libuuid -+util-linux-ng -+wpa_supplicant -+xcb-util -+xorg-x11-font-utils -+xorg-x11-server -+xorg-x11-server-common -+xorg-x11-utils -+xorg-x11-utils-xdpyinfo -+xorg-x11-utils-xdriinfo -+xorg-x11-utils-xev -+xorg-x11-utils-xfd -+xorg-x11-utils-xfontsel -+xorg-x11-utils-xlsatoms -+xorg-x11-utils-xlsclients -+xorg-x11-utils-xlsfonts -+xorg-x11-utils-xprop -+xorg-x11-utils-xrandr -+xorg-x11-utils-xvinfo -+xorg-x11-utils-xwininfo -+xorg-x11-xauth -+xorg-x11-xkb-utils -+xz-libs -+zlib - %end - - %post -- --# save a little bit of space at least... --rm -f /boot/initrd* -- - # make sure there aren't core files lying around - rm -f /core* -- -- -- --# Prelink can reduce boot time --if [ -x /usr/sbin/prelink ]; then -- /usr/sbin/prelink -aRqm --fi -- -- --# work around for poor key import UI in PackageKit --rm -f /var/lib/rpm/__db* - rpm --rebuilddb -- --if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-meego ]; then -- rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-meego --fi -- -- --%end -- --%post --nochroot --if [ -n "$IMG_NAME" ]; then -- echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release --fi - %end diff --git a/tests/mic_cases/test-genimg/options b/tests/mic_cases/test-genimg/options index fe7c479..9d493ad 100644 --- a/tests/mic_cases/test-genimg/options +++ b/tests/mic_cases/test-genimg/options @@ -1 +1 @@ -sudo mic-image-creator -f fs +sudo mic cr livecd diff --git a/tests/mic_cases/test-imageformat/expect b/tests/mic_cases/test-imageformat/expect deleted file mode 100644 index c07440b..0000000 --- a/tests/mic_cases/test-imageformat/expect +++ /dev/null @@ -1 +0,0 @@ -Image format 'tar' isn't supported diff --git a/tests/mic_cases/test-imageformat/ks.p b/tests/mic_cases/test-imageformat/ks.p deleted file mode 100644 index 5b68493..0000000 --- a/tests/mic_cases/test-imageformat/ks.p +++ /dev/null @@ -1,108 +0,0 @@ ---- ./mic_cases/base/test.ks 2011-02-25 09:21:41.778621925 +0800 -+++ /home/zhou/Code/handset.ks 2011-02-22 18:05:32.693146002 +0800 -@@ -1,62 +1,80 @@ --# -+# - # Do not Edit! Generated by: - # kickstarter.py - # - - lang en_US.UTF-8 - keyboard us --timezone --utc America/New_York -+timezone --utc America/Los_Angeles - auth --useshadow --enablemd5 --part / --size 3000 --ondisk sda --fstype=ext3 -+part / --size 1700 --ondisk sda --fstype=ext3 - rootpw meego - xconfig --startxonboot --bootloader --timeout=0 --append="quiet" --desktop --autologinuser=meego -+bootloader --timeout=2 --append="ro pci=noearly console=tty1 console=ttyS0 console=ttyMFD2 earlyprintk=mrst loglevel=8 s0ix_latency=160" -+desktop --autologinuser=meego --defaultdesktop=DUI --session="/usr/bin/mcompositor" - user --name meego --groups audio,video --password meego - --repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -+repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -+repo --name=non-oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/non-oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -+repo --name=oss-source --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/source/ --source -+repo --name=non-oss-source --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/non-oss/repos/source/ --source -+ -+%packages - --%packages - @MeeGo Core --@MeeGo Netbook Desktop --@X for Netbooks -+@Minimal MeeGo X Window System -+@X for Handsets - @MeeGo Compliance --@MeeGo X Window System --@Virtual Machine Support --@Games --@Printing --@Base Double Byte IME Support -+@MeeGo Handset Desktop -+@MeeGo Handset Applications -+@Moorestown Support - @MeeGo Base Development - --kernel --chromium -+kernel-adaptation-medfield -+#pulseaudio-modules-mfld -+ - %end - - %post - --# save a little bit of space at least... --rm -f /boot/initrd* -+#Create Initrd if it does not exist and create symlinks for bzImage and initrd for kboot autoboot -+echo "ro pci=noearly console=tty1 console=ttyS0 console=ttyMFD2 earlyprintk=mrst loglevel=8 s0ix_latency=160" > /boot/kboot.cmdline -+ -+echo "Checking for kernel......." -+Kernel_Name=`ls /boot | grep vmlinuz` -+if [ -f /boot/$Kernel_Name ]; then -+ Kernel_Ver=`echo $Kernel_Name | sed s/vmlinuz-//` -+ if [ -f /boot/initrd* ]; then -+ echo "Initrd exists" > /dev/null -+ else -+ /usr/libexec/mkmrstinitrd /boot/initrd-$Kernel_Ver.img $Kernel_Ver -+ fi -+ #Create Symlinks -+ cd /boot -+ ln -s $Kernel_Name bzImage -+ ln -s initrd-$Kernel_Ver.img initrd -+ ln -s kboot.cmdline cmdline -+else -+ echo "No Kernels were found" -+fi - - # make sure there aren't core files lying around - rm -f /core* - -- -- - # Prelink can reduce boot time - if [ -x /usr/sbin/prelink ]; then - /usr/sbin/prelink -aRqm - fi - -+# open serial line console for embedded system -+echo "s0:235:respawn:/sbin/agetty -L 115200 ttyS0 vt100" >> /etc/inittab -+echo "s1:235:respawn:/sbin/agetty -L 115200 ttyMFD2 vt100" >> /etc/inittab -+echo "ttyMFD2" >> /etc/securetty - - # work around for poor key import UI in PackageKit - rm -f /var/lib/rpm/__db* - rpm --rebuilddb - --if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-meego ]; then -- rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-meego --fi -- -- - %end - - %post --nochroot diff --git a/tests/mic_cases/test-imageformat/options b/tests/mic_cases/test-imageformat/options deleted file mode 100644 index a1c0b2b..0000000 --- a/tests/mic_cases/test-imageformat/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f tar diff --git a/tests/mic_cases/test-invalidrepostr/expect b/tests/mic_cases/test-invalidrepostr/expect deleted file mode 100644 index 3ee4fbf..0000000 --- a/tests/mic_cases/test-invalidrepostr/expect +++ /dev/null @@ -1 +0,0 @@ -unable to load kickstart file diff --git a/tests/mic_cases/test-invalidrepostr/ks.p b/tests/mic_cases/test-invalidrepostr/ks.p deleted file mode 100644 index 38c6578..0000000 --- a/tests/mic_cases/test-invalidrepostr/ks.p +++ /dev/null @@ -1,86 +0,0 @@ ---- ./mic_cases/base/test.ks 2011-02-25 09:21:41.778621925 +0800 -+++ ../tools/invalidrepo.ks 2011-02-21 17:04:40.663145997 +0800 -@@ -1,4 +1,4 @@ --# -+# - # Do not Edit! Generated by: - # kickstarter.py - # -@@ -7,47 +7,45 @@ lang en_US.UTF-8 - keyboard us - timezone --utc America/New_York - auth --useshadow --enablemd5 --part / --size 3000 --ondisk sda --fstype=ext3 -+part / --size 2200 --ondisk sda --fstype=ext3 - rootpw meego - xconfig --startxonboot - bootloader --timeout=0 --append="quiet" --desktop --autologinuser=meego -+desktop --autologinuser=meego --defaultdesktop=X-IVI --session=/usr/bin/startivi - user --name meego --groups audio,video --password meego - --repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -- --%packages -+repo --save=0 --debuginfo --source --name=core --baseurl=http://xxx.com --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -+%packages - @MeeGo Core --@MeeGo Netbook Desktop --@X for Netbooks - @MeeGo Compliance -+@X for IVI -+@IVI Desktop - @MeeGo X Window System --@Virtual Machine Support --@Games --@Printing --@Base Double Byte IME Support -+@MeeGo IVI Applications - @MeeGo Base Development -+@Development Tools -+ -+kernel-adaptation-intel-automotive -+ -+# forced for compliance... -+mesa-libEGL - --kernel --chromium - %end - - %post - -+ - # save a little bit of space at least... - rm -f /boot/initrd* - - # make sure there aren't core files lying around - rm -f /core* - -- -- - # Prelink can reduce boot time - if [ -x /usr/sbin/prelink ]; then - /usr/sbin/prelink -aRqm - fi - -- - # work around for poor key import UI in PackageKit - rm -f /var/lib/rpm/__db* - rpm --rebuilddb -@@ -56,7 +54,6 @@ if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-mee - rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-meego - fi - -- - %end - - %post --nochroot -@@ -64,3 +61,7 @@ if [ -n "$IMG_NAME" ]; then - echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release - fi - %end -+ -+ -+ -+ diff --git a/tests/mic_cases/test-invalidrepostr/options b/tests/mic_cases/test-invalidrepostr/options deleted file mode 100644 index 9620766..0000000 --- a/tests/mic_cases/test-invalidrepostr/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f livecd diff --git a/tests/mic_cases/test-ksck/expect b/tests/mic_cases/test-ksck/expect new file mode 100644 index 0000000..ad44fc2 --- /dev/null +++ b/tests/mic_cases/test-ksck/expect @@ -0,0 +1 @@ +Unable to load kickstart file diff --git a/tests/mic_cases/test-ksck/ks.p b/tests/mic_cases/test-ksck/ks.p new file mode 100644 index 0000000..7837ff5 --- /dev/null +++ b/tests/mic_cases/test-ksck/ks.p @@ -0,0 +1,63 @@ +--- ./mic_cases/base/test.ks 2011-08-19 16:10:40.552093465 +0800 ++++ error.ks 1970-01-01 08:00:00.000000000 +0800 +@@ -1,60 +0,0 @@ +-# +-# Do not Edit! Generated by: +-# kickstarter.py +-# +- +-lang en_US.UTF-8 +-keyboard us +-timezone --utc America/Los_Angeles +-part / --size 3000 --ondisk sda --fstype=ext3 +-rootpw meego +-xconfig --startxonboot +-bootloader --timeout=0 --append="quiet" +-desktop --autologinuser=meego +-user --name meego --groups audio,video --password meego +- +-repo --name=1.2-oss --baseurl=http://download.meego.com/snapshots/1.2.0.90.12.20110808.80/repos/oss/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego +-repo --name=1.2-non-oss --baseurl=http://download.meego.com/snapshots/1.2.0.90.12.20110808.80/repos/non-oss/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego +- +-%packages +- +-@MeeGo Base Development +-@Base Double Byte IME Support +-@MeeGo Compliance +-@MeeGo Core +-@MeeGo X Window System +-@X for Netbooks +-@MeeGo Netbook +-@MeeGo Netbook Desktop +-@Printing +-@Games +- +-kernel-adaptation-pinetrail +- +-chromium +--adobe-release +--flash-plugin +-%end +- +-%post +-# save a little bit of space at least... +-rm -f /boot/initrd* +- +-# Prelink can reduce boot time +-if [ -x /usr/sbin/prelink ]; then +- /usr/sbin/prelink -aRqm +-fi +- +-rm -f /var/lib/rpm/__db* +-rpm --rebuilddb +- +- +-%end +- +-%post --nochroot +-if [ -n "$IMG_NAME" ]; then +- echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release +-fi +- +- +-%end diff --git a/tests/mic_cases/test-ksck/options b/tests/mic_cases/test-ksck/options new file mode 100644 index 0000000..9d493ad --- /dev/null +++ b/tests/mic_cases/test-ksck/options @@ -0,0 +1 @@ +sudo mic cr livecd diff --git a/tests/mic_cases/test-misspkgs/expect b/tests/mic_cases/test-misspkgs/expect deleted file mode 100644 index b0b7d7f..0000000 --- a/tests/mic_cases/test-misspkgs/expect +++ /dev/null @@ -1 +0,0 @@ -Failed to find package 'zhou' diff --git a/tests/mic_cases/test-misspkgs/ks.p b/tests/mic_cases/test-misspkgs/ks.p deleted file mode 100644 index 9c75428..0000000 --- a/tests/mic_cases/test-misspkgs/ks.p +++ /dev/null @@ -1,41 +0,0 @@ ---- ./mic_cases/base/test.ks 2011-02-25 09:21:41.778621925 +0800 -+++ losepkg.ks 2011-02-25 15:10:02.358622001 +0800 -@@ -1,4 +1,4 @@ --# -+# - # Do not Edit! Generated by: - # kickstarter.py - # -@@ -15,25 +15,18 @@ desktop --autologinuser=meego - user --name meego --groups audio,video --password meego - - repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -+repo --name=oss-source --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/source/ --source - - %packages --@MeeGo Core --@MeeGo Netbook Desktop --@X for Netbooks --@MeeGo Compliance --@MeeGo X Window System --@Virtual Machine Support --@Games --@Printing --@Base Double Byte IME Support --@MeeGo Base Development -- --kernel --chromium -+libacl -+alsa-lib -+libattr -+basesystem -+bash -+zhou - %end - - %post -- - # save a little bit of space at least... - rm -f /boot/initrd* - diff --git a/tests/mic_cases/test-misspkgs/options b/tests/mic_cases/test-misspkgs/options deleted file mode 100644 index 9620766..0000000 --- a/tests/mic_cases/test-misspkgs/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f livecd diff --git a/tests/mic_cases/test-norepo/expect b/tests/mic_cases/test-norepo/expect deleted file mode 100644 index 636d818..0000000 --- a/tests/mic_cases/test-norepo/expect +++ /dev/null @@ -1 +0,0 @@ -No repositories found diff --git a/tests/mic_cases/test-norepo/ks.p b/tests/mic_cases/test-norepo/ks.p deleted file mode 100644 index 9eff66a..0000000 --- a/tests/mic_cases/test-norepo/ks.p +++ /dev/null @@ -1,85 +0,0 @@ ---- ./mic_cases/base/test.ks 2011-02-25 09:21:41.778621925 +0800 -+++ ../tools/norepo.ks 2011-02-21 16:29:29.933146021 +0800 -@@ -1,4 +1,4 @@ --# -+# - # Do not Edit! Generated by: - # kickstarter.py - # -@@ -7,47 +7,44 @@ lang en_US.UTF-8 - keyboard us - timezone --utc America/New_York - auth --useshadow --enablemd5 --part / --size 3000 --ondisk sda --fstype=ext3 -+part / --size 2200 --ondisk sda --fstype=ext3 - rootpw meego - xconfig --startxonboot - bootloader --timeout=0 --append="quiet" --desktop --autologinuser=meego -+desktop --autologinuser=meego --defaultdesktop=X-IVI --session=/usr/bin/startivi - user --name meego --groups audio,video --password meego - --repo --name=oss --baseurl=http://linux-ftp.jf.intel.com/pub/mirrors/MeeGo-other/trunk-daily/builds/trunk/1.1.90.3.20110214.2/oss/repos/ia32/packages/ --save --debuginfo --source --gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego -- --%packages -+%packages - @MeeGo Core --@MeeGo Netbook Desktop --@X for Netbooks - @MeeGo Compliance -+@X for IVI -+@IVI Desktop - @MeeGo X Window System --@Virtual Machine Support --@Games --@Printing --@Base Double Byte IME Support -+@MeeGo IVI Applications - @MeeGo Base Development -+@Development Tools -+ -+kernel-adaptation-intel-automotive -+ -+# forced for compliance... -+mesa-libEGL - --kernel --chromium - %end - - %post - -+ - # save a little bit of space at least... - rm -f /boot/initrd* - - # make sure there aren't core files lying around - rm -f /core* - -- -- - # Prelink can reduce boot time - if [ -x /usr/sbin/prelink ]; then - /usr/sbin/prelink -aRqm - fi - -- - # work around for poor key import UI in PackageKit - rm -f /var/lib/rpm/__db* - rpm --rebuilddb -@@ -56,7 +53,6 @@ if [ -f /etc/pki/rpm-gpg/RPM-GPG-KEY-mee - rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-meego - fi - -- - %end - - %post --nochroot -@@ -64,3 +60,7 @@ if [ -n "$IMG_NAME" ]; then - echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release - fi - %end -+ -+ -+ -+ diff --git a/tests/mic_cases/test-norepo/options b/tests/mic_cases/test-norepo/options deleted file mode 100644 index 9620766..0000000 --- a/tests/mic_cases/test-norepo/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f livecd diff --git a/tests/mic_cases/test-root/expect b/tests/mic_cases/test-root/expect deleted file mode 100644 index b21a32e..0000000 --- a/tests/mic_cases/test-root/expect +++ /dev/null @@ -1 +0,0 @@ -You must run mic-image-creator as root diff --git a/tests/mic_cases/test-root/ks.p b/tests/mic_cases/test-root/ks.p deleted file mode 100644 index e69de29..0000000 --- a/tests/mic_cases/test-root/ks.p +++ /dev/null diff --git a/tests/mic_cases/test-root/options b/tests/mic_cases/test-root/options deleted file mode 100644 index b2de23a..0000000 --- a/tests/mic_cases/test-root/options +++ /dev/null @@ -1 +0,0 @@ -mic-image-creator -f livecd diff --git a/tests/mic_cases/test-rootck/expect b/tests/mic_cases/test-rootck/expect new file mode 100644 index 0000000..16678c6 --- /dev/null +++ b/tests/mic_cases/test-rootck/expect @@ -0,0 +1 @@ +You must run as root diff --git a/tests/mic_cases/test-bootstrap/ks.p b/tests/mic_cases/test-rootck/ks.p index e69de29..e69de29 100644 --- a/tests/mic_cases/test-bootstrap/ks.p +++ b/tests/mic_cases/test-rootck/ks.p diff --git a/tests/mic_cases/test-rootck/options b/tests/mic_cases/test-rootck/options new file mode 100644 index 0000000..dafef75 --- /dev/null +++ b/tests/mic_cases/test-rootck/options @@ -0,0 +1 @@ +mic cr livecd diff --git a/tests/mic_cases/test-runmode/expect b/tests/mic_cases/test-runmode/expect deleted file mode 100644 index 78355bb..0000000 --- a/tests/mic_cases/test-runmode/expect +++ /dev/null @@ -1 +0,0 @@ -invalid run mode diff --git a/tests/mic_cases/test-runmode/ks.p b/tests/mic_cases/test-runmode/ks.p deleted file mode 100644 index e69de29..0000000 --- a/tests/mic_cases/test-runmode/ks.p +++ /dev/null diff --git a/tests/mic_cases/test-runmode/options b/tests/mic_cases/test-runmode/options deleted file mode 100644 index ef8fa9d..0000000 --- a/tests/mic_cases/test-runmode/options +++ /dev/null @@ -1 +0,0 @@ -sudo mic-image-creator -f livecd --run-mode=2 diff --git a/tests/testbase.py b/tests/testbase.py index 098a02c..f9f8568 100644 --- a/tests/testbase.py +++ b/tests/testbase.py @@ -18,7 +18,7 @@ def ImgCheck(work_env): """check image generate""" genImage = False for file in os.listdir(work_env): - m = re.match('^meego-.*', file) + m = re.match(r'.*\.(img|raw|iso|usbimg)', file) if m: genImage = True break @@ -40,7 +40,7 @@ def RunandCheck(object, work_env): expect = exp.strip() #set cmdline opt_f = open('options','r') - args = opt_f.read().strip()+' -c test.ks' + args = opt_f.read().strip()+' test.ks' dev_null = os.open('/dev/null',os.O_WRONLY) proc = subprocess.Popen(args,stdout = dev_null,stderr=subprocess.PIPE,shell=True) |