Description

TULIP purpose is to drive upgrade tests of various linux distributions to ensure both fine grained QA at the package level and testing the reliability of the upgrade result.

An in-depth description of TULIP can be found at: http://www.edos-project.org/xwiki/bin/view/Main/TULIP

Licence

TULIP is available under the General Public Licence.

Download

Latest version:

SVN repository

The source code is available in the EDOS SVN repository at https://protactinium.pps.jussieu.fr:12345/svn/edos/software/qa/tulip

Installation

Prerequisites

Tulip is designed to work under Linux

engine

reporting

the actual reporting uses eclipse BIRT tool

Installation & Parameters

Tulip is based on projects that need to be defined. It also have some global parmareters that can be found in parameters.py file See HowTo

Packages

HowTo

Tulip is provided with some helpers for creating an initial project. First the parameters of a project are collected, leading to a workable tulip process. Then, post-ugrade test suites can be added and the associated to the project

Create the database

Creating a Postgresql database

Before creating the database tables, you need to create the Postgresql account:

[root]# su - postgres
[postgres]# createuser -A -d -E -P tulip
and enter the password for the user.

then create the database as user tulip:

[root]# su - tulip
[tulip]# createdb tulip

Of course, if you want to use a different account name and/or a different database name, you must replace 'tulip' in the above lines by the name of your choice.

Create the database tables

The script create_database creates all the needed tables of the database. The already supported engines are sqlite and postgresql. The database has to already exists, this scripts only creates tables and fields. The parameters.py has to give the following informations

DATABASE_ENGINE = 'postgres' #(postgres, sqlite)
DATABASE_NAME = 'tulip.db'

Create a new project

A project is based on a qemu image of a working linux installation allowed to access the network and having a running ssh deamon at start-up. Some additional prerequisites may be neede depending on tests associated to this project

A project is created by running create_project. The following paraleters are mandatory

$  python ./create_project.py
--name is mandatory
--base-filename is mandatory
--work_directory is mandatory
--image-password is mandatory.

The available options are

$ python ./create_project.py --help
usage: create_project.py [options]

options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --name                Project Name - Mandatory,please avoid spaces and special characters
  --virtual-engine      Virtual machine comamnd line ['qemu', 'qemu-system-x86_64'], default [qemu]
  --scheduling          Test periodicity ['daily', 'weekly', 'monthly'], default [daily]
  --installer           Installer type ['urpmi', 'apt-get', 'apt-get-rpm'], default [urpmi]
  --base-filename       Path to read-only base image
  --work-directory      Working directory for images.
  --ssh-port            Used ssh port - Default is 10000
  --image-account       Image account allowing upgrades
  --image-password      Image account password
  --logfile-directory   Image Log files archiving directory. default --work-directory
  --report-server       Target server for the TestRunner Reporter - default mandriva.edos-project.org
  --logging-level       Logging level, typically info or debug - default is 'info'
  --fixed-image         Do not update the image - always restart from the origin - default is 'no'
All the path have to be valid and will be changed to absolute paths

Once run, the ouptut looks like

$ python ./create_project.py --name test --base-filename ../images/MandrivaCooker-base.img --work-directory images/ --ssh-port 2022 --image-account root --image-password lalala

{'work_directory': '/edos/tulip/images', 'name': 'test', 'periodicity': 'daily', 'ssh_port': 2022, 'vm': 'qemu', 'report_server': 'mandriva.edos-project.org', 'base_filename': '/edos/images/MandrivaCooker-base.img', 'root_password': 'lalala', 'root_account': 'root', 'installer': 'urpmi','logging_level': 'info', 'logfile_location': '/edos/tulip/images'}

qemu-img create -b /edos/images/MandrivaCooker-base.img -f qcow /edos/tulip/images/40_daily_test_MandrivaCooker-base.img
Formating '/edos/tulip/images/40_daily_test_MandrivaCooker-base.img', fmt=qcow, backing_file=/edos/images/MandrivaCooker-base.img, size=31457280 kB
tar -C "/edos/tulip/images" -zcf "/edos/tulip/images/40_daily_1_test_MandrivaCooker-base.img.000.tgz" "40_daily_test_MandrivaCooker-base.img"

The project will then be known by tulip by its ID

done created project 40

Define a new test

Before being associated to any proiject, some globalb parameters on the test have to be defined and stored This is done by launching the create_test

$ python ./create_test.py
Register Test project to TULIP:
Name --> myNewTest
Give a name, only informative

Need all the TEST stuff
the whole directory will be copied in the ~/tests of the image user
this path is relative to /edos/tulip/tests/

Path to source directory --> cetooo
The path of the directory containing the tests is relative to the current one.

the command line will be launched from the home
can be a script located in ~/tests/<source directory>

Test command line --> python cetooo.py
in case of multiple lines, it is advisable to point on a shell script so that it can be modified without editing any database field

result file containing the list of faulty packages

Faulty packages result file --> faulty.txt
This is the main result of teh test : the file containing the tested packages that led to an error of the test (see find_packages.py for helper)

enumerate extra result files to be retreived
empty line to end
located in ~/tests/<source directory>

test result to retreive --> file1.txt
test result to retreive --> file2.txt
test result to retreive -->
any additional file that the test produces abnd that may be kept for deeper analysis

New test id : 11

The new id is given. The test will be known though this code

Associates a Test to a project

A test can be associated to as many as desired projects. This is done with add_test_projects

$ python add_tests_project.py
add tests to project
Test ID --> 11
Project ID (empty to finish) --> 40
Project ID (empty to finish) -->

First give the Test ID and then enumerates the projects that will perform this test

Freeing a project

To avoid multiple simultaneous runs of the same image, a locker is set in the project table (field is_ready containing the datetime of the current run start). The tool make_project_ready resets this marker to make a blocked project ready to run. No check is performed

Launching

The project can be launched using a crontab or a buildbot-like framework the command line to be used

python perform_test.py <project ID>
Version 1.42 last modified by LaurentGodard on 23/01/2007 at 15:17

Comments 0

No comments for this document

Attachments 0

No attachments for this document

Creator: FrancoisDechelle on 2006/12/14 16:18
Copyright EDOS Consortium
1.1.1