43.0 The Emperor and the Golem¶
The Avocado team is proud to present another release: Avocado version 43.0, aka, “The Emperor and the Golem”, is now available!
Release documentation: Avocado 43.0
The major changes introduced on this version are listed below, roughly categorized into major topics and intended audience:
--remote-no-copyoption has been removed. The reason is that the copying of tests to the remote hosts (as set with
--remote-hostname) was also removed. That feature, while useful to some, had a lot of corner cases. Instead of keeping a feature with a lot of known caveats, it was decided that users should setup the remote machines so that tests are available before Avocado attempts to run them.
avocado.utils.processlibrary, one of the most complex pieces of utility code that Avocado ships, now makes it possible to ignore background processes that never finish (while Avocado is reading from their file descriptors to properly return their output to the caller). The reason for such a feature is that if a command spawn many processes, specially daemon-like ones that never finish, the
avocado.utils.process.run()function would hang indefinitely. Since waiting for all the children processes to finish is the right thing to do, users need to set the
Trueto request this newly added behavior.
- When discovering tests on a directory, that is, when running
avocado list /path/to/tests/directoryor
avocado run /path/to/tests/directory, Avocado would return tests in a non predictable way, based on
os.walk(). Now, the result is a properly alphabetically ordered list of tests.
- The ZIP Archive feature (AKA as
-z) feature, which allows to archive job results is now a proper plugin.
- Plugins can now be setup to run at a specific order. This is a response to a user issue/request, where the
--archivefeature would run before some other results would be generated. This feature is not limited to plugins of type result. It allows any ordering on the enabled set of plugins of a given plugin type.
- A contrib script that looks for a job result directory based on a partial (or complete) job ID is now available at
contrib/scripts/avocado-get-job-results-dir.py. This should be useful inside automation scripts or even for interactive users.
- Users landing on http://avocado-framework.readthedocs.io would previously be redirect to the “latest” documentation, which tracks the development master branch. This could be confusing since the page titles would contain a version notice with the latest released version. Users will now be redirected by default to the latest released version, matching the page title, although the version tracking the master branch will still be available at the http://avocado-framework.readthedocs.io/en/latest URL.
- During the previous development cycle, a bug where
journalctlwould receive KeyboardInterrupt received an workaround by using the
subprocesslibrary instead of Avocado’s own
avocado.utils.process, which was missing a default handler for SIGINT. With the misbehavior of Avocado’s library now properly addressed, and consequently, we’ve reverted the workaround applied previously.
- The TAP plugin would fail at the end_test event with certain inputs. This has now been fixed, and in the event of errors, a better error message will be presented.
test_utils_partition.pyselftest module now makes use of the
avocado.core.utils.process.can_sudo()function, and will only be run when the user is either running as root or has sudo correctly configured.
- Avocado itself preaches that tests should not attempt to skip themselves during their own execution. The idea is that, once a test started executing, you can’t say it wasn’t executed (skipped). This is actually enforced in
avocado.Testbased tests. But since Avocado’s own selftests are based on
unittest.TestCase, some of them were using skip at the “wrong” place. This is now fixed.
avocado.core.job.Jobclass received changes that make it more closer to be usable as a formally announced and supported API. This is another set of changes towards the so-called “Job API” support.
- There is now a new plugin type, named result_events. This replaces the previous implementation that used
avocado.core.result.Resultas a base class. There’s now a single
avocado.core.result.Resultinstance in a given job, which tracks the results, while the plugins that act on result events (such as test has started, test has finished, etc) are based on the
- A new
humannow replaces the old HumanResult implementation.
- Ported versions of the TAP and journal plugins to the new
For more information, please check out the complete Avocado changelog.
The Avocado release meetings are now open to the community via Hangouts on Air. The meetings are recorded and made available on the Avocado Test Framework YouTube channel.
For this release, you can watch the meeting on this link.