[Avocado-devel] Avocado 0.23.0 released!
Lucas Meneghel Rodrigues
lmr at redhat.com
Wed Apr 22 14:07:41 UTC 2015
Hello everyone! I'm here to announce the new Avocado 0.23.0 release,
code named 'Mad Max: Fury Road'! This time around, we have a few
changes worth of note:
Now avocado looks more like nose and other unittest based test runners:
You can define a number of test methods prefixed with test, and the
runner will simply run them. Also, for compatibility with the base
unittest class, now setup and cleanup are setUp andtearDown.
Let's see how an old avocado test looked like:
#!/usr/bin/python
from avocado import test
from avocado import job
class OldTest(test.Test):
def setup(self):
self.hello = "Hi there!"
def action(self):
self.assertEqual(self.hello, "Hi there!")
def cleanup(self):
self.log.debug('Cleanup')
if __name__ == '__main__':
job.main()
The new avocado tests look like this:
#!/usr/bin/python
from avocado import test
from avocado import job
class MultipleTests(test.Test):
def setUp(self):
self.hello = "Hi there!"
def test_hello(self):
self.assertEqual(self.hello, "Hi there!")
def testIdentity(self):
self.assertTrue(1, 1)
def tearDown(self):
self.log.debug('Cleanup')
if __name__ == '__main__':
job.main()
avocado run: Simplified command line options, cutting off a number of
rarely used options and moving them to config file entries
avocado run: Added the --job-timeout option, that allows users to
specify the maximum time an avocado test job might take.
avocado run: Consolidated the options --remote-timeout and --vm-timeout
into --job-timeout.
Sysinfo feature: The sysinfo feature went through refactoring and
simplification - Now it is possible to specify what information from
the system is to be collected through config files
See how to configure your collectibles:
[sysinfo.collectibles]
# File with list of commands that will be executed and have their
output collected
commands = /etc/avocado/sysinfo/commands
# File with list of files that will be collected verbatim
files = /etc/avocado/sysinfo/files
# File with list of commands that will run alongside the job/test
profilers = /etc/avocado/sysinfo/profilers
The default commands file looks like:
df -mP
dmesg -c
uname -a
lspci -vvnn
gcc --version
ld --version
mount
hostname
uptime
dmidecode
ifconfig -a
brctl show
ip link
numactl --hardware show
lscpu
fdisk -l
Multiplexer: A new params retrieval system is in place. Now, instead of
self.params.keyyou must use the self.params.get(key, path, default)
API. A compatibility layer with the old dict structure was made, but we
encourage you to migrate your param retrieval calls from
self.params.key or self.params['key'] toself.params.get('key').
The full list of commits can be seen here:
0.21.0...0.23.0
Happy testing!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150422/4d9048bb/attachment.htm>
More information about the Avocado-devel
mailing list