The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)
Quality/Tutorials/Testing with SDK to VM
(Setting up VM and SDK for QA) |
|||
| (11 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | See .ks file at bottom of page | + | See the .ks file at bottom of page. |
In .ks file following lines add repositories for QA packages : | In .ks file following lines add repositories for QA packages : | ||
| + | repo --name=mer-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ --save | ||
| + | repo --name=qa-tools --baseurl=http://repo.pub.meego.com/Mer:/QA:/Tests/Mer_Core_i486/ --save | ||
| − | + | These packages needs to be installed on VM to enable automated testing : | |
| − | + | ||
| − | + | ||
| + | testrunner-lite | ||
| + | eat-device | ||
| + | testrunner-lite-hwinfo-meego | ||
| − | + | and this package will enable X11 blts tests : | |
| − | + | blts-x11-tests | |
| − | + | ||
| − | + | ||
| − | + | In %post section, following lines install device test enablers for both user and root : | |
| + | su -c /usr/bin/eat-add-device-key root | ||
| + | su -c /usr/bin/eat-add-device-key nemo | ||
| − | + | Save the file at end of this page as nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.ks and execute : | |
| + | sudo mic cr liveusb -A i486 nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.ks | ||
| − | in | + | Above command will generate nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.usbimg in mic-output directory. Now execute : |
| − | + | cd mic-output | |
| − | + | and boot the VM with Qemu | |
| − | + | sudo qemu -m 512 -hda nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.usbimg -smp 2 -net nic -net user,hostfwd=tcp:127.0.0.1:5555-:22 -vnc :2 -k en-gb -serial stdio | |
| − | + | ||
| + | Now from any other machine which has vncviewer (or any other vnc client installed), connect to port 5902 (screen :2) of host running nemo image, and boot nemo handset image from Grub menu. | ||
| − | + | On SDK: | |
Add following repositories with zypper : | Add following repositories with zypper : | ||
| − | sudo zypper addrepo http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ mer-tools | + | sudo zypper addrepo http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ mer-tools |
| − | + | sudo zypper addrepo http://repo.pub.meego.com/Mer:/QA:/Tests/Mer_Core_i486/ qa-tests | |
| − | sudo zypper addrepo http://repo.pub.meego.com/Mer:/QA:/Tests | + | |
Update package list : | Update package list : | ||
| − | sudo zypper ref | + | sudo zypper ref |
| − | Now install | + | Now install ''eat-host'' and ''testrunner-lite'' with zypper : |
| − | eat-host | + | |
| − | testrunner-lite | + | |
| − | + | sudo zypper install eat-host testrunner-lite | |
| − | + | ||
| − | ssh | + | Enable execute permissions for /usr/bin/eat-install-host-key and execute eat-install-host-key. This will generate ~/.ssh/id_eat_dsa : |
| − | + | # first step might not be needed?! | |
| + | sudo chmod 755 /usr/bin/eat-install-host-key | ||
| + | /usr/bin/eat-install-host-key | ||
| − | + | ssh to localhost 5555 to check whether it's working | |
| + | ssh -i ~/.ssh/id_eat_dsa -p 5555 nemo@localhost | ||
| − | + | Install fonts required by testrunner-ui application with : | |
| − | + | sudo zypper in liberation*fonts* | |
| − | + | Start testrunner with : | |
| − | + | testrunner-ui | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | test run -> | + | go into test run -> settings and set : |
| + | username=nemo | ||
| + | host=127.0.0.1:5555 ssh private key = ~/.ssh/id_eat_dsa | ||
| − | + | Save the settings | |
| + | Execute testrunner-ui and execute : | ||
| − | + | file -> open test definition, find /usr/share/blts-x11-tests/ and tests.xml there | |
| − | + | and | |
| − | + | test run -> run all tests | |
| − | + | ||
| − | + | ||
| − | + | Alternatively you can test from commandline with testrunner-lite by executing : | |
| − | + | scp -P 5555 -i ~/.ssh/id_eat_dsa root@localhost:/usr/share/blts-x11-tests/tests.xml . | |
| − | + | testrunner-lite -f ./tests.xml -o tests.out -t nemo@localhost:5555 -k $HOME/.ssh/id_eat_dsa -v | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | repo --name=mer-core --baseurl=http://releases.merproject.org/releases/next/builds/i486/packages --save --debuginfo | + | .ks file to generate testable image : |
| − | repo --name=ce-adaptation-x86-generic --baseurl=http://repo.pub.meego.com/CE:/Adaptation:/x86-generic/Mer_Core-next_i486/ --save | + | # -*-mic2-options-*- -f livecd --record-pkgs=name --pkgmgr=yum --arch=i486 -*-mic2-options-*- |
| − | repo --name=ce-apps --baseurl=http://repo.pub.meego.com/CE:/Apps/Mer_Core-next_CE_MW_Shared_i486/ --save | + | # |
| − | repo --name=ce-mw-shared --baseurl=http://repo.pub.meego.com/CE:/MW:/Shared/Mer_Core-next_i486/ --save | + | # Do not Edit! Generated by: |
| − | repo --name=ce-ux-mtf --baseurl=http://repo.pub.meego.com/CE:/UX:/MTF/Mer_Core-next_CE_MW_MTF_i486/ --save | + | # kickstarter.py |
| − | repo --name=mer-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ --save | + | # |
| − | repo --name=testing-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools:/Testing/Mer_Core_i486/ --save | + | lang en_US.UTF-8 |
| − | repo --name=qa-tools --baseurl=http://repo.pub.meego.com/Mer:/QA:/Tests:/Testing/Mer_Core_i486/ --save | + | keyboard us |
| − | + | timezone --utc UTC | |
| − | %packages | + | part / --size 3000 --ondisk sda --fstype=ext3 |
| − | @Intel x86 VM Support | + | rootpw nemo |
| − | @Mer Minimal Xorg | + | xconfig --startxonboot |
| − | @Nemo Middleware Shared | + | bootloader --timeout=0 --append="console=ttyS0,115200n8" |
| − | @Nemo Apps | + | user --name nemo --groups audio,video --password nemo |
| − | @MTF Handset UX | + | repo --name=mer-core --baseurl=http://releases.merproject.org/releases/next/builds/i486/packages --save --debuginfo |
| − | @Mer Graphics Common | + | repo --name=ce-adaptation-x86-generic --baseurl=http://repo.pub.meego.com/CE:/Adaptation:/x86-generic/Mer_Core-next_i486/ --save |
| − | @Mer Minimal Xorg | + | repo --name=ce-apps --baseurl=http://repo.pub.meego.com/CE:/Apps/Mer_Core-next_CE_MW_Shared_i486/ --save |
| − | @Mer Connectivity | + | repo --name=ce-mw-shared --baseurl=http://repo.pub.meego.com/CE:/MW:/Shared/Mer_Core-next_i486/ --save |
| − | @Mer Core | + | repo --name=ce-ux-mtf --baseurl=http://repo.pub.meego.com/CE:/UX:/MTF/Mer_Core-next_CE_MW_MTF_i486/ --save |
| − | + | repo --name=mer-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ --save | |
| − | kernel-adaptation-pc | + | repo --name=testing-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools:/Testing/Mer_Core_i486/ --save |
| − | + | repo --name=qa-tools --baseurl=http://repo.pub.meego.com/Mer:/QA:/Tests:/Testing/Mer_Core_i486/ --save | |
| − | openssh-clients | + | %packages |
| − | openssh-server | + | @Intel x86 VM Support |
| − | ce-backgrounds | + | @Mer Minimal Xorg |
| − | plymouth-lite | + | @Nemo Middleware Shared |
| − | vim-enhanced | + | @Nemo Apps |
| − | xorg-x11-drv-vesa | + | @MTF Handset UX |
| − | testrunner-lite | + | @Mer Graphics Common |
| − | testrunner-lite-hwinfo-meego | + | @Mer Minimal Xorg |
| − | eat-device | + | @Mer Connectivity |
| − | blts-x11-tests | + | @Mer Core |
| − | %end | + | kernel-adaptation-pc |
| − | + | openssh-clients | |
| − | %post | + | openssh-server |
| − | # Hack to fix the plymouth based splash screen on N900 | + | ce-backgrounds |
| − | mv /usr/bin/ply-image /usr/bin/ply-image-real | + | plymouth-lite |
| − | cat > /usr/bin/ply-image << EOF | + | vim-enhanced |
| − | #!/bin/sh | + | xorg-x11-drv-vesa |
| − | echo 32 > /sys/class/graphics/fb0/bits_per_pixel | + | testrunner-lite |
| − | exec /usr/bin/ply-image-real $@ | + | testrunner-lite-hwinfo-meego |
| − | EOF | + | eat-device |
| − | chmod +x /usr/bin/ply-image | + | blts-x11-tests |
| − | # Set symlink pointing to .desktop file | + | %end |
| − | ln -sf X-MEEGO-HS.desktop /usr/share/xsessions/default.desktop | + | %post |
| − | ## rpm-rebuilddb.post from mer-kickstarter-configs package | + | # Hack to fix the plymouth based splash screen on N900 |
| − | # Rebuild db using target's rpm | + | mv /usr/bin/ply-image /usr/bin/ply-image-real |
| − | echo -n "Rebuilding db using target rpm.." | + | cat > /usr/bin/ply-image << EOF |
| − | rm -f /var/lib/rpm/__db* | + | #!/bin/sh |
| − | rpm --rebuilddb | + | echo 32 > /sys/class/graphics/fb0/bits_per_pixel |
| − | echo "done" | + | exec /usr/bin/ply-image-real $@ |
| − | ## end rpm-rebuilddb.post | + | EOF |
| − | + | chmod +x /usr/bin/ply-image | |
| − | ## prelink.post from mer-kickstarter-configs package | + | # Set symlink pointing to .desktop file |
| − | # Prelink can reduce boot time | + | ln -sf X-MEEGO-HS.desktop /usr/share/xsessions/default.desktop |
| − | if [ -x /usr/sbin/prelink ]; then | + | ## rpm-rebuilddb.post from mer-kickstarter-configs package |
| − | + | # Rebuild db using target's rpm | |
| − | + | echo -n "Rebuilding db using target rpm.." | |
| − | + | rm -f /var/lib/rpm/__db* | |
| − | fi | + | rpm --rebuilddb |
| − | ## end prelink.post | + | echo "done" |
| − | + | ## end rpm-rebuilddb.post | |
| − | su -c /usr/bin/eat-add-device-key root | + | ## prelink.post from mer-kickstarter-configs package |
| − | su -c /usr/bin/eat-add-device-key nemo | + | # Prelink can reduce boot time |
| − | %end | + | if [ -x /usr/sbin/prelink ]; then |
| − | + | echo -n "Running prelink.." | |
| − | %post --nochroot | + | /usr/sbin/prelink -aRqm |
| − | if [ -n "$IMG_NAME" ]; then | + | echo "done" |
| − | + | fi | |
| − | fi | + | ## end prelink.post |
| − | + | su -c /usr/bin/eat-add-device-key root | |
| − | + | su -c /usr/bin/eat-add-device-key nemo | |
| − | %end | + | %end |
| + | %post --nochroot | ||
| + | if [ -n "$IMG_NAME" ]; then | ||
| + | echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release | ||
| + | fi | ||
| + | %end | ||
Latest revision as of 11:57, 16 October 2012
See the .ks file at bottom of page.
In .ks file following lines add repositories for QA packages :
repo --name=mer-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ --save repo --name=qa-tools --baseurl=http://repo.pub.meego.com/Mer:/QA:/Tests/Mer_Core_i486/ --save
These packages needs to be installed on VM to enable automated testing :
testrunner-lite eat-device testrunner-lite-hwinfo-meego
and this package will enable X11 blts tests :
blts-x11-tests
In %post section, following lines install device test enablers for both user and root :
su -c /usr/bin/eat-add-device-key root su -c /usr/bin/eat-add-device-key nemo
Save the file at end of this page as nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.ks and execute :
sudo mic cr liveusb -A i486 nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.ks
Above command will generate nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.usbimg in mic-output directory. Now execute :
cd mic-output
and boot the VM with Qemu
sudo qemu -m 512 -hda nemo-handset-i486-vm-0.20120920.0.2.NEMO.2012-10-02.1.usbimg -smp 2 -net nic -net user,hostfwd=tcp:127.0.0.1:5555-:22 -vnc :2 -k en-gb -serial stdio
Now from any other machine which has vncviewer (or any other vnc client installed), connect to port 5902 (screen :2) of host running nemo image, and boot nemo handset image from Grub menu.
On SDK:
Add following repositories with zypper :
sudo zypper addrepo http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ mer-tools sudo zypper addrepo http://repo.pub.meego.com/Mer:/QA:/Tests/Mer_Core_i486/ qa-tests
Update package list :
sudo zypper ref
Now install eat-host and testrunner-lite with zypper :
sudo zypper install eat-host testrunner-lite
Enable execute permissions for /usr/bin/eat-install-host-key and execute eat-install-host-key. This will generate ~/.ssh/id_eat_dsa :
# first step might not be needed?! sudo chmod 755 /usr/bin/eat-install-host-key /usr/bin/eat-install-host-key
ssh to localhost 5555 to check whether it's working
ssh -i ~/.ssh/id_eat_dsa -p 5555 nemo@localhost
Install fonts required by testrunner-ui application with :
sudo zypper in liberation*fonts*
Start testrunner with :
testrunner-ui
go into test run -> settings and set : username=nemo host=127.0.0.1:5555 ssh private key = ~/.ssh/id_eat_dsa
Save the settings Execute testrunner-ui and execute :
file -> open test definition, find /usr/share/blts-x11-tests/ and tests.xml there
and
test run -> run all tests
Alternatively you can test from commandline with testrunner-lite by executing :
scp -P 5555 -i ~/.ssh/id_eat_dsa root@localhost:/usr/share/blts-x11-tests/tests.xml . testrunner-lite -f ./tests.xml -o tests.out -t nemo@localhost:5555 -k $HOME/.ssh/id_eat_dsa -v
.ks file to generate testable image :
# -*-mic2-options-*- -f livecd --record-pkgs=name --pkgmgr=yum --arch=i486 -*-mic2-options-*- # # Do not Edit! Generated by: # kickstarter.py # lang en_US.UTF-8 keyboard us timezone --utc UTC part / --size 3000 --ondisk sda --fstype=ext3 rootpw nemo xconfig --startxonboot bootloader --timeout=0 --append="console=ttyS0,115200n8" user --name nemo --groups audio,video --password nemo repo --name=mer-core --baseurl=http://releases.merproject.org/releases/next/builds/i486/packages --save --debuginfo repo --name=ce-adaptation-x86-generic --baseurl=http://repo.pub.meego.com/CE:/Adaptation:/x86-generic/Mer_Core-next_i486/ --save repo --name=ce-apps --baseurl=http://repo.pub.meego.com/CE:/Apps/Mer_Core-next_CE_MW_Shared_i486/ --save repo --name=ce-mw-shared --baseurl=http://repo.pub.meego.com/CE:/MW:/Shared/Mer_Core-next_i486/ --save repo --name=ce-ux-mtf --baseurl=http://repo.pub.meego.com/CE:/UX:/MTF/Mer_Core-next_CE_MW_MTF_i486/ --save repo --name=mer-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools/Mer_Core_i486/ --save repo --name=testing-tools --baseurl=http://repo.pub.meego.com/Mer:/Tools:/Testing/Mer_Core_i486/ --save repo --name=qa-tools --baseurl=http://repo.pub.meego.com/Mer:/QA:/Tests:/Testing/Mer_Core_i486/ --save %packages @Intel x86 VM Support @Mer Minimal Xorg @Nemo Middleware Shared @Nemo Apps @MTF Handset UX @Mer Graphics Common @Mer Minimal Xorg @Mer Connectivity @Mer Core kernel-adaptation-pc openssh-clients openssh-server ce-backgrounds plymouth-lite vim-enhanced xorg-x11-drv-vesa testrunner-lite testrunner-lite-hwinfo-meego eat-device blts-x11-tests %end %post # Hack to fix the plymouth based splash screen on N900 mv /usr/bin/ply-image /usr/bin/ply-image-real cat > /usr/bin/ply-image << EOF #!/bin/sh echo 32 > /sys/class/graphics/fb0/bits_per_pixel exec /usr/bin/ply-image-real $@ EOF chmod +x /usr/bin/ply-image # Set symlink pointing to .desktop file ln -sf X-MEEGO-HS.desktop /usr/share/xsessions/default.desktop ## rpm-rebuilddb.post from mer-kickstarter-configs package # Rebuild db using target's rpm echo -n "Rebuilding db using target rpm.." rm -f /var/lib/rpm/__db* rpm --rebuilddb echo "done" ## end rpm-rebuilddb.post ## prelink.post from mer-kickstarter-configs package # Prelink can reduce boot time if [ -x /usr/sbin/prelink ]; then echo -n "Running prelink.." /usr/sbin/prelink -aRqm echo "done" fi ## end prelink.post su -c /usr/bin/eat-add-device-key root su -c /usr/bin/eat-add-device-key nemo %end %post --nochroot if [ -n "$IMG_NAME" ]; then echo "BUILD: $IMG_NAME" >> $INSTALL_ROOT/etc/meego-release fi %end