Contents |
MeeGo Fast Feedback Testing (MeeGo-FFT) intends for automatically testing of source code changes on the target device running MeeGo and getting results of it before these changes will be integrated.
MeeGo-FFT represents a specific fast reactions on changes in version control system (now only GIT is supported). Fast in this context refers to 2-10 minutes delay. After source code is committed or/and tagged, such actions can be performed:
Results of these actions can be viewed in web browser.
Commits and tags are different version control system states for MeeGo-FFT. It allows to execute different sets of actions with various parameters depending on new commit or new tag. For example, it's possible to build for Intel architecture when new commit appears and for ARM when sources are tagged. For more details see further information about execute condition.
MeeGo Fast Feedback Testing is realized as Hudson plugin, therefore Hudson is needed to be installed on developer workstation as well as QEMU, OSC and Testrunner-lite.
Below is placed instructions about Fast Feedback Testing environment setup for Ubuntu 10.04 and user manual for MeeGo-FFT Hudson plugin.
~$ deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.04/ /
Install needed keys:
~$ gpg --keyserver subkeys.pgp.net --recv 0BC7BEC479FC1F8A ~$ gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
Update repository information:
~$ sudo apt-get update
Run following command:
~$ sudo apt-get install osc meego-osc-plugins build qemu-arm-static
OSC is used for local and remote building by means of MeeGo OBS server using specified OBS repository that represents needed content. Usually Trunk:Testing is used as default OBS repository for MeeGo-FFT.
So add needed repository to your OBS home project:
Build Service -> Projects -> home:<your_obs_username> -> Repositories -> Add repositories -> MeeGo distributions -> MeeGo Trunk:Testing
Now new "Trunk_Testing" item appears in Repository Configuration section:
If you already have had needed OBS repository in this section, it can be possible to use it instead, but don't forget to change default name in configuring of MeeGo-FFT plugin build parameters.
Also it's needed to create empty auxiliary package in OBS home project:
Build Service -> Projects -> home:<your_obs_username> -> Packages -> Add a new package
Names of specified OBS repository and empty auxiliary OBS package will be needed during setting up of MeeGo-FFT plugin build parameters.
After that checkout home project somewhere before using Hudson and choose “trust the server certificate permanently”:
~$ osc co home:<your_obs_username>
Then edit the ~/.oscrc file:
~$ gedit ~/.oscrc
and do these changes:
su-wrapper = sudo
user = <your_obs_username> pass = <your_obs_password>
trusted_prj=Trunk:Testing
Append the following to the end of the sudoers config file (/etc/sudoers):
<your_linux_username> ALL=NOPASSWD: /usr/bin/build
Remember to edit sudoers with root rights.
~$ wget -O /tmp/key http://hudson-ci.org/debian/hudson-ci.org.key ~$ sudo apt-key add /tmp/key ~$ wget -O /tmp/hudson.deb http://hudson-ci.org/latest/debian/hudson.deb ~$ sudo dpkg --install /tmp/hudson.deb
If hudson didn't installed because not all depended packages are installed you can use next commannd for resolve dependences.
~$ sudo apt-get -f install
Stop the hudson server:
~$ sudo /etc/init.d/hudson stop
Change user for hudson:
~$ gedit /etc/default/hudson change line: HUDSON_USER=<your_linux_user_name>
Give access rights of hudson home directory to user. It can be done in two ways:
~$ sudo chown <your_user_name> /var/lib/hudson/ -R
or
~$ gedit /etc/default/hudson change line: HUDSON_HOME=/home/<your_linux_user_name>/hudson
Start the hudson server:
~$ sudo /etc/init.d/hudson start
Open Hudson in browser:
http://localhost:8080
Install GIT plugin to Hudson:
Go to Manage Hudson -> Manage Plugins menu, find GIT plugin in "Available" tab of Hudson Plugin Manager, choose it and press install button
Create new job in Hudson UI, choose free-style software project and configure:
This condition defines the case when current MeeGo-FFT step is executed. If execute condition isn't matched, this MeeGo-FFT step does nothing. There are three possible conditions:
It's possible to add several MeeGo-FFT steps with different execute conditions and various build, deploy and test parameters. It will allow perform different actions for new commits, new tags and in both cases.
These parameters intend for setup building on MeeGo OBS server. OBS allows to build for different architectures locally or remotely against various contents.
Setup of deploying and/or running application on device through SSH connection.
Setup of running Testrunner-lite for testing.
These parameters intend for setting up SSH connection to the remote device or local host where application will be deployed and tested.
Log of MeeGo-FFT processing can be found at "Console Output" Hudson web page that can be reached from certain build status Hudson web page.
Only if build has been succeeded, link to "Meego Fast Feedback Testing" special web page will appear at the build status web page:
Meego Fast Feedback Testing web page contains list of created RPM packages in "Build result" section and test results in "Test-runner output" section:
These test results are generated by Testrunner-lite depending on test plan.