Meego Wiki
Views

Quality/QA-tools/OTS/UserDocumentation/Installation

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
m (OTS server installation)
m (How to install N900 automation tools to OTS worker)
Line 146: Line 146:
  SUBSYSTEMS=="usb", ATTR{idVendor}=="0421", ATTR{idProduct}=="0105", GROUP="<group>", MODE="0664"
  SUBSYSTEMS=="usb", ATTR{idVendor}=="0421", ATTR{idProduct}=="0105", GROUP="<group>", MODE="0664"
-
* Create a power_cycle.sh script for turning N900 on/off. This requires external accessory, like [http://wiki.meego.com/Quality/QA-tools/hat-control HAT]  
+
* Create a power_cycle.sh script for turning N900 on/off. This requires external accessory, like [[Quality/QA-tools/hat-control|HAT]]  
  sudo nano /usr/bin/power_cycle.sh
  sudo nano /usr/bin/power_cycle.sh

Revision as of 12:32, 7 March 2011

Contents

OTS 0.8.x installation Ubuntu

If using 0.1.x version, see migration from 0.1.x to 0.8.x document.

Used hardware

1 x Server (Ubuntu 10.10)
1 x Client (Ubuntu 10.10)
1 x HAT controller
1 x Power cable
1 x Power supply
2 x USB A-B cable
1 x USB A-microB cable
1 x N900

Network Setup

Using static IP addresses on all OTS machines is strongly recommended. It is possible to setup the system also with dynamic IP addresses but it might cause problems every now and then because IP's and hostnames change.

All OTS machines need to be able to access other OTS machines based on their hostname.

Preparation

There are two ways of getting OTS binary packages: from the source code or from the MeeGo Tools:Testing repository. From the repository you can get the stable version and from the source code the development version.

  • Add Tools:Testing apt source to /etc/apt/sources.list
sudo nano /etc/apt/sources.list
deb http://download.meego.com/live/Tools:/Testing/xUbuntu_10.10/ /

Notice that if you are using Ubuntu 10.04, change the path.

  • Add repository keys
gpg --keyserver subkeys.pgp.net --recv-keys 0BC7BEC479FC1F8A
gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
  • Update the repositories
sudo apt-get update

Build packages from source (optional)

  • Install git core
sudo apt-get install git-core
  • Get sources
git clone git://gitorious.org/meego-quality-assurance/ots.git
  • Get building tools
sudo apt-get install dpkg-dev debhelper python-setuptools
  • Build packages
cd ots
dpkg-buildpackage -rfakeroot

OTS server installation

  • Install dependencies
sudo apt-get install python-django python-amqplib python-configobj rabbitmq-server test-definition
  • Install OTS server components
sudo apt-get install python-ots-common python-ots-results python-ots-server

Or if you are using own built packages

sudo dpkg -i ...
  • Configure OTS server settings
sudo nano /etc/ots_server.ini

Recommended to change following:

'example_sw_product', example to 'meego_product'
'devicegroup', example to 'meego_n900'
  • Install OTS server plug-ins
Logger plug-in (recommended)
Email plug-in (recommended)

See more plug-ins from OTS Plug-ins

  • If logger plug-in is installed
Change permissions to logging directory
sudo chown www-data:www-data /var/log/ots

Now the OTS server can be used via apache (django_xmlrpc).

  • If logger plug-in is not installed
Change user permissions to logging directory
sudo chown <user>:<group> /var/log/ots
  • Start rabbitmq-server
 /etc/init.d/rabbitmq-server start
ots_server

OTS worker installation

  • Install dependencies
sudo apt-get install python-amqplib testrunner-lite
  • Install OTS worker packages
sudo apt-get install python-ots-common python-ots-worker
  • Configure OTS worker settings
sudo nano /etc/ots.ini

Change 'devicegroup', example meego_n900

Change 'host' to server's address

  • Change permissions to OTS worker log
sudo chown <user>:<group> /var/log/ots.log
  • Start OTS worker
ots_worker

OTS tools

Tools are used for triggering test runs from the command line.

  • Install OTS tools
sudo apt-get install python-ots-tools
  • Trigger a test run
ots_trigger -s localhost/xmlrpc -b test_build -i http://url_to_image -p example_sw_product -e test@man.com
  • Kickstart file for automation can be found from
http://meego.gitorious.org/meego-quality-assurance/enables-automated-testing/blobs/ks/meego-n900-autotest.ks
  • You need to build the image with mic-image-creator with parameters:
--save-kernel --package=tar.gz

How to install N900 automation tools to OTS worker

  • Remove network-manager, because it breaks the USB connection. See more information from autotest-guide.
  • Install dependencies
sudo apt-get install meego-ai-flasher eat-host-ubuntu

  • Get N900 flasher from the Nokia's tablets-dev portal
http://tablets-dev.nokia.com/maemo-dev-env-downloads.php?f=maemo_flasher-3.5_2.5.2.2_i386.deb
sudo dpkg -i maemo_flasher-3.5_2.5.2.2_i386.deb
  • Configure conductor to use rpm and fetch /var/log/messages
sudo nano /etc/conductor.conf
  • If you want run ots_worker as user, copy SSH keys to the user and make udev rule for n900
install-eat-key.sh
sudo nano /etc/udev/rules.d/meego-n900.rules
SUBSYSTEMS=="usb", ATTR{idVendor}=="0421", ATTR{idProduct}=="0105", GROUP="<group>", MODE="0664"
  • Create a power_cycle.sh script for turning N900 on/off. This requires external accessory, like HAT
sudo nano /usr/bin/power_cycle.sh
#!/bin/bash

hat_drv &
hat_ctrl -pwr1=off
hat_ctrl -usb1data=off
hat_ctrl -usb1pwr=off
sleep 2;
hat_ctrl -usb1pwr=on
hat_ctrl -usb1data=on
hat_ctrl -pwr1=on
killall hat_drv
  • Test manually that everything is OK, this is executed in the worker
conductor -u <image url>
  • Start OTS worker
ots_worker
Personal tools