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/TULIPLicence
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/tulipInstallation
Prerequisites
Tulip is designed to work under Linuxengine
- Python
- database engine (has been tested on postgresql and sqlite)
- python packages
- SQLAlchemy 0.1.x branch
- pexpect
- python bindings for the database engine
- qemu (has been tested on 0.8.1+) - kqemu is a plus
- ssh & scp (also defined and working in any image)
reporting
the actual reporting uses eclipse BIRT tool- tomcat
- BIRT
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 HowToPackages
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 projectCreate 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.[root]# su - tulip [tulip]# createdb tulip
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 informationsDATABASE_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.
$ 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'
$ 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"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
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 --> cetooothe command line will be launched from the home can be a script located in ~/tests/<source directory> Test command line --> python cetooo.py
result file containing the list of faulty packages Faulty packages result file --> faulty.txt
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 -->
New test id : 11
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) -->
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 performedLaunching
The project can be launched using a crontab or a buildbot-like framework the command line to be usedpython perform_test.py <project ID>
Version 1.42 last modified by LaurentGodard on 23/01/2007 at 15:17
Document data
Attachments:
No attachments for this document
Comments: 0