[Avocado-devel] Avocado on Windows Report

Lucas Meneghel Rodrigues lookkas at gmail.com
Thu Mar 12 17:26:38 UTC 2015


On Wed, Mar 11, 2015 at 4:14 PM Cleber Rosa <crosa at redhat.com> wrote:

> 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.


I was re-reading your e-mail and pondering about it - the issue you saw
seems to be related to PYTHONPATH. Of course, that's just a hunch, but I
wish I had time to play with it :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150312/4354489f/attachment.htm>


More information about the Avocado-devel mailing list