Skip to content
Lucas Meneghel Rodrigues edited this page Sep 22, 2011 · 3 revisions

Autotest Unittest suite

The unittest suite module is the main entry point used to run all the autotest unit tests. It is important to keep this module running on the autotest code base to ensure we are not breaking the test coverage we already got.

Setting up dependencies

This documentation was written for a F15 development box, if you are running other OS to develop autotest, feel free to add the relevant bits for your distro.

First, install all dependencies:

yum install Django MySQL-python python-sqlite2.x86_64 python-matplotlib

Google protocol buffers are still not packaged for Fedora, we'll try to fix this for F16. Now, you can go to the downloads page of google protocol buffers:

http://code.google.com/p/protobuf/downloads/list

Download the latest version, that at the time of this writing was

http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.bz2

Uncompress the protobuf tarball, then configure it

[lmr@freedom protobuf-2.4.1]$ ./configure --prefix=/usr

Compile it

[lmr@freedom protobuf-2.4.1]$ make

Install it

[lmr@freedom protobuf-2.4.1]$ sudo make install

Move all the produced libraries to /usr/lib64, if you are running on a 64 bit system

[lmr@freedom protobuf-2.4.1]$ sudo mv /usr/lib/libprotoc* /usr/lib64
[lmr@freedom protobuf-2.4.1]$ sudo mv /usr/lib/libprotobuf* /usr/lib64

You have now to install the python libraries. First, execute the unittests of the py libraries:

[lmr@freedom protobuf-2.4.1]$ cd python
[lmr@freedom python]$ python setup.py test
... lots of output ...
----------------------------------------------------------------------
Ran 193 tests in 0.649s

OK

Then install them

[lmr@freedom python]$ sudo ./setup.py install

Then you can run the unittest suite

utils/unittest_suite.py

Now, if you want to run the entire set of unittests, you have to pass the flag --full:

utils/unittest_suite.py --full
Clone this wiki locally