[Avocado-devel] Avocado on Windows Report

Lukáš Doktor ldoktor at redhat.com
Thu Mar 12 09:36:11 UTC 2015


Dne 11.3.2015 v 20:13 Cleber Rosa napsal(a):
> 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.
>
Well when I think about this, probably we can rename the plugin to 
libvirt plugin and on windows someone can implement eg. vmware plugin to 
do similar. If not they can always use remote 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
>
Well obviously paths needs to be os-dependent :-) (including result and 
other paths)

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

Thank you for the report, I'm wondering how many hidden troubles are 
still waiting early_status we pipe between test and the runner... Anyway 
python is OS independent, so it should be doable to make it work on 
windows. It might also force us to clean-up nasty solutions...

Regards,
Lukáš




More information about the Avocado-devel mailing list