[Freeipa-devel] [PATCHES] 0227-0229 freeipa-tests package & Beaker integration plugin

Petr Viktorin pviktori at redhat.com
Tue May 28 15:55:28 UTC 2013


Patch 0227 creates the freeipa-tests package.
As a system package, it needs a more unique name than "tests", so I 
renamed it to "ipatests". I also changed imports and references to it.
Sorry to everyone developing tests right now ­– there will be conflicts, 
but hopefully they'll be straightforward.
Note that the test suite does not yet pass when run outside the Git 
tree. Work on that is ongoing but not a priority right now (it's more 
important to get some integration tests running). Help would be 
appreciated :)

Patch 0228 adds a wrapper based on make-test which runs the 
system-installed test suite. freeipa-tests installs it as 
As I said above the tests currently fail when run this way.

Patch 0229 adds a Nose plugin for integration with BeakerLib[1]. When 
the plugin is loaded (ipa-run-tests does that) and enabled (using the 
--with-beakerlib option), it hooks into Nose and runs rlPhase*, rlPass, 
rlFail and rlLog* Bash functions at appropriate events.

To test, I do this:
On Fedora 19, modify /etc/fedora-release to remove the ö and ’ 
characters, otherwise you'll get an UnicodeDecodeError from BeakerLib's 
XML journal backend (BZ#700525).

sudo yum install beakerlib

. /usr/share/beakerlib/beakerlib.sh
( rlJournalStart;
   ipa-run-tests --with-beakerlib test_ipalib/test_backend.py;
   python -c 'print "="*100'
   rlJournalPrintText --full-journal;

You can run any other test, of course, but test_backend should be fairly 
portable, and one of the tests shows off the logging integration.

[1] https://fedorahosted.org/beakerlib/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0227-Make-an-ipa-tests-package.patch
Type: text/x-patch
Size: 71146 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130528/b6a7a7fd/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0228-Add-ipa-run-tests-command.patch
Type: text/x-patch
Size: 2517 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130528/b6a7a7fd/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-pviktori-0229-Add-Nose-plugin-for-BeakerLib-integration.patch
Type: text/x-patch
Size: 11056 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130528/b6a7a7fd/attachment-0002.bin>

More information about the Freeipa-devel mailing list