[Avocado-devel] Avocado on Windows Report

Cleber Rosa crosa at redhat.com
Wed Mar 11 19:13:35 UTC 2015


Hello all,

Here follows my report from the experimentation with Avocado on Windows.

Environment:

============

* Microsoft Windows XP SP2 32bits

* Python 2.7.9

* Avocado:

   - Initially at commit 4b3669f37d4b5f05b97d90b121b59535d82be9c3

   - Then a number of workarounds were applied on branch "windows_port" (http://github.com/clebergnu/avocado/tree/windows_port)

   - Then branch "windows_port" was rebase on top of d9efd4ea03f89bf3a8d6a0f1d41669ed0940b4e5.

The following series of steps were used to verify how much of avocado can run on Microsoft Windows and how much effort could actually go into making it fully supported.

Requirements:

=============

Since pip is builtin on Python 2.7.9, it was used to (try to) install all dependencies. First try was avocado's selftest requirements:

$ python -m pip install -r requirements-selftests.txt

nose>=1.3.0: OK

Sphinx>=1.3b1: OK

flexmock>=0.9.7: OK

inspektor>=0.1.12: OK

Now from requirements.txt:

$ python -m pip install fabric>=1.7.0

Installation seemed OK. It was possible to import fabric module from Python. Pycrypto C module "Crypto.Random.OSRNG.winrandom" could not be built as it depends on MS Visual C++ 9.0. The easier (but manual) solution was to download a prebuilt version of pycrypto from:

http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe

This, together with failure to install some depencies on Linux with pip alone, further supports the idea of a custom installation script.

$ python -m pip install libvirt-python

This was attempted, but failure was certain. libvirt (the client part) is known to work on Windows, but for avocado's need we'd need to compile the python binding also, which was *not* attempted. This BLOCKS the "vm" plugin.

$ python -m pip install pyliblzma

Fails with "ValueError: close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr". So, pyliblzma should be optional. A patch that does just that has just been merged on master (491effcd1492328f77365b40e22a18467f866841).

Other less problematic modules:

PyYAML>=3.11: OK (C extension skipped)

pystache>=0.5.3: OK

requests>=1.2.3: OK

Workarounds:

============

After this point, a number of code workarounds were performed. These are available for reference at:

http://github.com/clebergnu/avocado/tree/windows_port

Example of changes include modules (non plugins) make use of Unix specific modules (fcntl) or even definitions (signal.SIGKILL).

One workaround that has not made into the branch above, was a patch to argpase.py itself (failure to locate function named argpase.identity()), that manifested within the test runner itself at places such as multiprocessing.Process(), subprocess.Popen() and at various pickling times.

Configuration:

==============

Avocado failed to find a proper configuration file. The quick and dirt workaround was to copy:

$ cp -ruv etc C:\Python27\Lib\site-packages

Functional tests:

=================

Since Avocado itself could still not run properly, functional tests were eliminated completely from the source tree.

Unittests:

==========

Running unittests was tried at this stage, resulting in:

Ran 93 tests in 2.703s
FAILED (SKIP=2, errors=14, failures=15)

Avocado Rest Client CLI App

===========================

avocado-rest-client behaved without major surprises (once the configuration was forced, there seems to be an issue here).

Please refer to the attached image avocado-rest-client.jpg.

Avocado CLI App

===============

Avocado itself failed to locate and run a test. The errors related to processes and pickling seem to be the major causes.

Please refer to the other attached images.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: avocado-config-plugins.jpg
Type: image/jpeg
Size: 97414 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150311/febd6e0a/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avocado-noargs.jpg
Type: image/jpeg
Size: 60973 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150311/febd6e0a/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avocado-run-sleeptest.jpg
Type: image/jpeg
Size: 107047 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150311/febd6e0a/attachment-0002.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avocado-run-sleeptest-2.jpg
Type: image/jpeg
Size: 92943 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150311/febd6e0a/attachment-0003.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avocado-rest-client.jpg
Type: image/jpeg
Size: 38233 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150311/febd6e0a/attachment-0004.jpg>


More information about the Avocado-devel mailing list